Commit graph

1137041 commits

Author SHA1 Message Date
Jami Kettunen
246f4d6148 drm/panel: Add panel driver for Samsung S6E3FC1
The S6E3FC1 is 6" 1080x2160 MIPI DSI command mode AMOLED LCD display
found on OnePlus 5T (2017) smartphones.

The panel needs to be enabled from a device tree using the
"samsung,s6e3fc1" compatible.

This driver was generated using the following & includes some minor
cleanup (such as s/to_s6e3fc1/to_s6e3fc1_panel/g):
$ python3 lmdpdg.py dumpling.dtb -r vddio
2022-10-31 02:02:59 +02:00
Jami Kettunen
8b90216819 drm/panel: samsung-s6e3fa5: Implement .get_orientation callback
Other drivers supporting this were already changed as a part of the
following series: https://patchwork.freedesktop.org/series/104807/
2022-10-31 02:02:55 +02:00
Jami Kettunen
7cca9eb36d [SQUASHME?] drm/panel: s6e3fa5: Read panel orientation
The panel is mounted upside down on the OnePlus 5, so we need to handle
this in the driver.
2022-10-31 02:02:41 +02:00
Jami Kettunen
3ea414062d dt-bindings: display: panel: Document Samsung S6E3FA5 display panel 2022-10-31 02:02:37 +02:00
Jami Kettunen
73e0c82858 drm/panel: Add panel driver for Samsung S6E3FA5
The S6E3FA5 is 5.5" 1080x1920 MIPI DSI command mode AMOLED LCD display
found on OnePlus 5 (2017) smartphones.

The panel needs to be enabled from a device tree using the
"samsung,s6e3fa5" compatible.

This driver was generated using the following & includes some minor
cleanup (such as s/to_s6e3fa5/to_s6e3fa5_panel/g):
$ python3 lmdpdg.py cheeseburger.dtb -r vddio

Signed-off-by: Jami Kettunen <jami.kettunen@protonmail.com>
2022-10-31 02:02:37 +02:00
Jami Kettunen
39cd6b976d arm64: dts: qcom: msm8998-oneplus-common: Enable PMI8998 LPG leds
Now the RGB notification LEDs can each be controlled individually :)
2022-10-31 02:02:34 +02:00
Jami Kettunen
b408f19a4f arm64: dts: qcom: msm8998-oneplus-common: Enable PMI8998 haptics
The OnePlus 5 and 5T both have a haptics engine connected to PMI8998.

Signed-off-by: Jami Kettunen <jami.kettunen@somainline.org>
Signed-off-by: Caleb Connolly <caleb@connolly.tech>
2022-10-31 02:02:34 +02:00
Jami Kettunen
35d1ed29cc [ANNOTATION] Apply some F(x)tec Pro1 patches 2022-10-31 02:02:34 +02:00
Danct12
158d9831bf arm64: dts: msm8998-fxtec-pro1: Add remoteproc configuration 2022-10-31 02:02:34 +02:00
Danct12
8535dcd7c2 arm64: dts: msm8998-fxtec-pro1: Enable PMI8998 haptics 2022-10-31 02:02:33 +02:00
Danct12
fdd5838e2b arm64: dts: msm8998-fxtec-pro1: Configure PMI8998 fuel gauge
This will account for battery statistics reporting on the Fxtec Pro1 (QX1000)
2022-10-31 02:02:33 +02:00
Jami Kettunen
b5da4afe50 pinctrl: Fix compilation of Awinic AW9523/B I2C GPIO Expander
Fixes the following link-time error:

    LD      .tmp_vmlinux.kallsyms1
  aarch64-linux-gnu-ld: Unexpected GOT/PLT entries detected!
  aarch64-linux-gnu-ld: Unexpected run-time procedure linkages detected!
  aarch64-linux-gnu-ld: drivers/pinctrl/pinctrl-aw9523.o: in function `aw9523_probe':
  .../drivers/pinctrl/pinctrl-aw9523.c:1004: undefined reference to `__devm_regmap_init_i2c'
  make[1]: *** [.../Makefile:1155: vmlinux] Error 1

Fixes: 96e86abbb4 ("pinctrl: Add driver for Awinic AW9523/B I2C GPIO Expander")
2022-10-31 02:02:33 +02:00
Jami Kettunen
bca8458787 [HACK] pinctrl: aw9523: Add workaround for F(x)tec Pro1 keyboard
This is a hack because the correct interrupt type(s) should should be
defined in msm8998-fxtec-pro1.dts instead of the driver.

(originally from Danct12)

This is a workaround for keyboard not working on Fxtec Pro1.

  genirq: Setting trigger mode 12 for irq 123 failed (aw9523_gpio_irq_type+0x0/0x20)
  gpio-fastmatrix-keyboard gpio-keyboard: Cannot get IRQ for gpio302
2022-10-31 02:02:33 +02:00
Jami Kettunen
c974cc82e4 [ANNOTATION] Apply miscellaneous hacks and patches 2022-10-31 02:02:33 +02:00
Jami Kettunen
37d1583665 [HACK] drm/msm: Always report CTL status as started for MSM8998
This register always appears to read 0 on <SDM845 generations so simply
ignore it to avoid refreshing at ~3 Hz as seen on OnePlus 5 with a
command-mode panel with the following spammed in dmesg every time the
screen refreshes:

  [drm:_dpu_encoder_phys_cmd_wait_for_ctl_start:660] [dpu error]enc31 intf1 ctl start interrupt wait failed
  [drm:dpu_kms_wait_for_commit_done:525] [dpu error]wait for commit done returned -22
  ...
2022-10-31 02:02:33 +02:00
Jami Kettunen
5cdf191d57 module: demote invalid ELF header magic error message to pr_debug
This happens anytime busybox modprobe loads a compressed module and
looks especially ugly on postmarketOS for example (or basically any
initramfs); this error is rather pointless since the module is loaded
anyway afterwards.

Upstream (busybox) has no plans to do anything about this error getting
spammed:
https://www.mail-archive.com/busybox@busybox.net/msg27078.html
2022-10-31 02:02:33 +02:00
Jami Kettunen
b7e8630c76 Input: synaptics-rmi4 - add support for F1A
RMI4 F1A supports the simple capacitive buttons function, it's used for
example on embedded devices such as smartphones for capacitive Android
back and recents buttons.
2022-10-31 02:02:30 +02:00
Jami Kettunen
37df9e8b9c arm64: dts: qcom: msm8998: add IPA information
Add support for the MSM8998 SoC, which includes IPA version 3.1.
2022-10-31 02:02:30 +02:00
Jami Kettunen
f639e1729f [HACK] net: ipa: Disable automatic suspend
1aac309d32 ("net: ipa: use autosuspend") currently causes my device to
enter 900E crashdump mode as soon as IPA is probed :/

With this we at least can run ModemManager once again...
2022-10-31 02:02:30 +02:00
Jami Kettunen
019ec6d0a5 [HACK] ath10k: Fake MSA ready event after event server arrival
This finally allowed me to get past the 2 ath10k_info()'s in qmi.c!

However, this doesn't fix everything; it seems you *have* to run
diag-router from https://github.com/andersson/diag to calm the firmware
down and stop constantly crashing; need to look into a way to get Wi-Fi
working later without needing this debug crap to be running.

This should possible be submitted as a quirk to the ath10k driver as
modem on mainline 8998 should be running now as well...
2022-10-31 02:02:25 +02:00
Jami Kettunen
46f0bbbca4 drm/msm: add missing a540 MODULE_FIRMWARE declarations 2022-10-31 02:02:19 +02:00
Jami Kettunen
4d927cb2d9 drm/msm: Mention DSI 10nm PHY support for MSM8998 2022-10-31 02:02:15 +02:00
Jami Kettunen
72ffd69b45 [HACK] scripts: Stop appending "+" to localversion
This always gets added and doesn't look nice in the version string, so
it's purely for aesthetic reasons :p
2022-10-31 02:02:15 +02:00
Caleb Connolly
dae71dc9a5 arm64: dts: qcom: pmi8998: add charger node
Add a node for the smb2 charger hardware found on the pmi8998.

Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2022-10-31 02:02:14 +02:00
Caleb Connolly
119430dc18 arm64: dts: qcom: pmi8998: add rradc node
Add a DT node for the Round Robin ADC found in the PMI8998 PMIC.

Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2022-10-31 02:02:14 +02:00
Caleb Connolly
e2c631ebcf arm64: dts: qcom: pmi8998: introduce spmi haptics
Add bindings for Qualcomm SPMI haptics on platforms using pmi8998.

Signed-off-by: Caleb Connolly <caleb@connolly.tech>
(JAMI: fixup for v6.0-rc2 & v7 of driver patches)
2022-10-31 02:02:14 +02:00
Jami Kettunen
4b341bc463 [ANNOTATION] Import WIP "Qualcomm SPMI Fuel Gauge" driver
https://gitlab.com/sdm845-mainline/linux/-/commits/driver/pmi8998_fg/
+ drop pmi8994 DTS changes though.
+ random pieces from https://gitlab.com/sdm845-mainline/linux/-/commits/sdm845/5.19-release :/
2022-10-31 02:02:14 +02:00
Jami Kettunen
1918745f5f power: supply: qcom_fg: Report online property 2022-10-31 02:02:14 +02:00
Yassine Oudjana
f96cfaff29 power: pmi8998_fg: Rename to qcom_fg and add support for PMI8994/6
This adds support for accessing SRAM. That includes requesting and releasing
access to SRAM by setting some registers and handling the mem-avail IRQ,
configuring access, and reading from/writing to it.

Pre-gen3 fuel gauges require reading from SRAM to get voltage, current
and temperature data. Getting capacity is identical to gen3.

Tested on Xiaomi Mi Note 2 with PMI8996.
2022-10-31 02:02:14 +02:00
Yassine Oudjana
cf062a5c35 power: pmi8998_fg: Remove some trailing spaces and tabs
This should be squashed.
2022-10-31 02:02:14 +02:00
Joel Selvaraj
6ab2aa8358 fg: clean and read charge full and max voltage from dts 2022-10-31 02:02:14 +02:00
Joel Selvaraj
e5f8763d74 power: supply: add battery charging status feature 2022-10-31 02:02:14 +02:00
Caleb Connolly
7214b14a7b arm64: dts: qcom: pmi8998: Add fuel gauge
Add a node for qcom,pmi8998-fg.
2022-10-31 02:02:14 +02:00
Joel Selvaraj
f74131008a power: supply: introduce pmi8998 fuel guage driver 2022-10-31 02:02:14 +02:00
Jami Kettunen
aadef46ad8 [ANNOTATION] Import Qualcomm smb2 charger driver v6 (2022-10-09)
Link: https://patchwork.kernel.org/project/linux-arm-msm/cover/20221008183753.249514-1-caleb.connolly@linaro.org/
2022-10-31 02:02:14 +02:00
Caleb Connolly
ea0538d030 dt-bindings: power: supply: qcom,pmi8998-charger: add bindings for smb2 driver
Add devicetree bindings for the Qualcomm PMI8998/PM660 SMB2 charger
driver.

Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2022-10-31 02:02:14 +02:00
Caleb Connolly
15864e39c0 power: supply: add Qualcomm PMI8998 SMB2 Charger driver
Add a driver for the SMB2 charger block found in the Qualcomm PMI8998
and PM660.
This driver adds initial support for detecting USB cables and managing
basic battery charging.

Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2022-10-31 02:02:14 +02:00
Jami Kettunen
e5788ea5dd [ANNOTATION] Import SPMI haptics driver v7 (2022-10-18)
Link: https://patchwork.kernel.org/project/linux-arm-msm/cover/20221015172915.1436236-1-caleb@connolly.tech/
2022-10-31 02:02:14 +02:00
Caleb Connolly
80b7e7d1a0 input: add Qualcomm SPMI haptics driver
Add support for the haptics found in pmi8998 and related PMICs.
Based on the ff-memless interface. Currently this driver provides
a partial implementation of hardware features.

This driver only supports LRAs (Linear Resonant Actuators) in the "buffer"
mode with a single wave pattern.

Signed-off-by: Caleb Connolly <caleb@connolly.tech>
2022-10-31 02:02:14 +02:00
Caleb Connolly
cd56ff1567 dt-bindings: input: document Qualcomm PMI8998 haptics driver
Add bindings for qcom PMIC PMI8998 haptics driver.

Signed-off-by: Caleb Connolly <caleb@connolly.tech>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2022-10-31 02:02:14 +02:00
Jami Kettunen
6a627ac6b7 [ANNOTATION] Base @ angelo/5.14-msm8998-audio-working
I also rebased this tree on the linus/v5.18-rc1 tag and while at it
finally dropped changes irrelevant to msm8998.
2022-10-31 02:02:13 +02:00
AngeloGioacchino Del Regno
b1953b7b81 adreno 5xx: TTBR1 extravaganza on MSM8998
(JAMI: fixup for 5.16)
2022-10-31 02:02:13 +02:00
Jami Kettunen
2c83fb4bc9 arm64: dts: qcom: msm8998-xperia: various tests
Originally from: c215a022
2022-10-31 02:02:13 +02:00
Jami Kettunen
a3e55d753a ASoC: wcd9335: various tests
Originally from: c215a022
2022-10-31 02:02:13 +02:00
AngeloGioacchino Del Regno
8720300aa3 iommu/arm-smmu-qcom: Add MSM8998 and SDM660 mss compatibles for identity
Add MSM8998 and SDM660's mss-pil compatibles to switch the default
iommu domain type to IDENTITY, as similarly required by SDM845 and
others.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>
(JAMI: fixup for 6.0-rc2)
2022-10-31 02:02:13 +02:00
AngeloGioacchino Del Regno
1d7018b903 iommu/arm-smmu-qcom: Skip the TTBR1 quirk for MSM8998 and SDM630
Similarly to MSM8996 DragonBoard 820c, MSM8998 and SDM630 are equipped
with Adreno 5xx series, which doesn't have separate pagetables support
at the moment of writing.
Skip the TTBR1 quirk for these two SoCs as to get Adreno in a usable
state.
2022-10-31 02:02:13 +02:00
AngeloGioacchino Del Regno
f2e1fd09d4 arm64: dts: qcom: AUDIO WORKS oon MSM8998 Sony Yoshino platform!!! 2022-10-31 02:02:13 +02:00
AngeloGioacchino Del Regno
e0bb18b783 ASoC: codecs: wcd9335: Fix headphone jack commit for new upstream kernel 2022-10-31 02:02:13 +02:00
Srinivas Kandagatla
c97a787623 ASoC: wcd9335: add mbhc support
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
2022-10-31 02:02:13 +02:00
Jami Kettunen
6944fd8b93 arm64: dts: qcom: Enable audio on MSM8998 Sony Yoshino platform
Originally from: d95b982a
(JAMI: fixup for 6.0-rc2)
2022-10-31 02:02:13 +02:00