Commit graph

1137062 commits

Author SHA1 Message Date
Jami Kettunen
4f782f4c3f [WIP] arm64: msm8998-oneplus-common: fix node names for reserved mem 2022-10-31 02:05:05 +02:00
Jami Kettunen
d23c7879c3 msm8998-oneplus-common: Drop GPU down to 257 MHz for better stability 2022-10-31 02:03:17 +02:00
Jami Kettunen
ae7254d494 arm64: msm8998_defconfig: Add for 6.1
Based on allnoconfig msm8998.config pmos.config cleanup.config.
2022-10-31 02:03:17 +02:00
Jami Kettunen
38feeb3074 arm64: oneplus5_defconfig: Add for 6.1
Based on allnoconfig msm8998.config oneplus5.config pmos.config cleanup.config.
2022-10-31 02:03:17 +02:00
Dzmitry Sankouski
a8eef75016 arm64: dts: qcom: sagit: add initial device tree for sagit
New device support - Xiaomi Mi6 phone

Signed-off-by: Degdag Mohamed <degdagmohamed@gmail.com>
2022-10-31 02:03:17 +02:00
Konrad Dybcio
9479a999eb arm64: dts: qcom: msm8998*: Keep MMCC & MMSS_SMMU enabled by default
MMCC is a component of the SoC that should always be configured. It was kept
off due to misconfiguration on clamshell machines. Keep it disabled on these
ones and enable it by default on all the others.

Exactly the same story applies to MMSS_SMMU, which directly depends on MMCC.

Do note, that if a platform doesn't use neither EFIFB (only applies to WoA
devices in this case) or simplefb (applies to precisely 2 msm8998 devices
as of this commit), this will not cause any harm.

Signed-off-by: Konrad Dybcio <konrad.dybcio@somainline.org>
2022-10-31 02:03:17 +02:00
Konrad Dybcio
7b4df030bf arm64: dts: qcom: msm8998-yoshino: Fix up SMD regulators formatting
Add a new line between each subnode and make the { } consistent.

Signed-off-by: Konrad Dybcio <konrad.dybcio@somainline.org>
2022-10-31 02:03:17 +02:00
Jami Kettunen
48f3cc5f01 arm64: dts: msm8998-oneplus-common: enable SMB2 2022-10-31 02:03:17 +02:00
Jami Kettunen
a106139665 arm64: dts: qcom: msm8998-oneplus-common: enable RRADC 2022-10-31 02:03:17 +02:00
Jami Kettunen
007c711d46 arm64: dts: qcom: msm8998-oneplus-common: add simple-battery 2022-10-31 02:03:14 +02:00
Jami Kettunen
31fcc8d96d arm64: dts: qcom: msm8998-oneplus-common: Add fuel gauge
The OnePlus 5/5T feature a BQ27411 fuel gauge for reading the battery
stats.
2022-10-31 02:03:11 +02:00
Jami Kettunen
fa3def2129 [TEMP] oneplus5: disable all speaker amp stuff
We don't want to blow this up while messing around with audio stuff
early on...
2022-10-31 02:03:11 +02:00
Jami Kettunen
f2922a7943 arm64: dts: msm8998-oneplus-common: Add TFA9890 speaker amp bindings 2022-10-31 02:03:11 +02:00
Jami Kettunen
43f9c1b6df msm8998-oneplus-common: Configure Adreno 540 GPU 2022-10-31 02:03:07 +02:00
Jami Kettunen
705df38a9e arm64: dts: msm8998-oneplus-*: Configure S6E3FA5 & S6E3FC1 panels
These Samsung DSI panels are used on the OnePlus 5/5T respectively.
Additionally disable simplefb until a proper handoff solution can be
found to avoid conflicts between it and the MSM DRM driver.
2022-10-31 02:03:05 +02:00
Jami Kettunen
324c137044 msm8998-oneplus-common: Configure IPA for cellular data 2022-10-31 02:03:05 +02:00
Jami Kettunen
fbfe0bb714 msm8998-oneplus-common: Configure CPUfreq scaling hardware 2022-10-31 02:03:05 +02:00
Jami Kettunen
5c0b2f4545 arm64: dts: msm8998-oneplus-cheeseburger: Configure RMI4 F1A buttons
This allows the capacitive buttons below the touchscreen to be used on
e.g. Android normally :)
2022-10-31 02:03:04 +02:00
Jami Kettunen
3e22a6e8a3 msm8998-oneplus-common: Add remoteproc configuration & enable WLAN 2022-10-31 02:03:02 +02:00
Jami Kettunen
ab047e6597 [DROPME?] msm8998-oneplus-common: Configure blsp1_i2c5_sleep (TS) as no-pull 2022-10-31 02:03:02 +02:00
Jami Kettunen
53da3375c4 dt-bindings: display: panel: Document Samsung S6E3FC1 display panel 2022-10-31 02:02:59 +02:00
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