Skip to contentSkip to conversation

arm64: qcom: Add initial support for LG V60 ThinQ 5G (timelm)

PATCH Superseded rofikkerneldev 2 participants 23 messages Nov 17

Subsystems (8)

v1 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

cover arm64: qcom: Add initial support for LG V60 ThinQ 5G (timelm)

This series adds initial mainline support for the LG V60 ThinQ 5G (timelm), an SM8250-based flagship smartphone released in 2020.

The series enables:
- DT binding and SoC board description for LG V60 ThinQ 5G (timelm)
- Memory reservations for bootloader and firmware log regions
- DRM panel driver and binding for the 1080x2460 SW43103 AMOLED display
- Touchscreen driver and binding for the Silicon Works SW42902 controller
- USB Type-C TCPM sink mode on PM8150B
- Bluetooth HCI on GENI UART6 with QCA6390 power sequencing
- Storage (UFS), SD card, volume keys, and thermal management
- Entries in MAINTAINERS for timelm platform, panel, and touchscreen

All patches pass checkpatch.pl --strict with 0 errors and 0 warnings, and the device tree builds cleanly against Linux 7.4-rc3.

The series is also available on GitHub:
https://github.com/rofikkerneldev/linux_timelm/tree/timelm-v74-stage1

rofikkerneldev (11):
dt-bindings: arm: qcom: add LG V60 ThinQ 5G (timelm)
arm64: dts: qcom: add LG V60 ThinQ 5G (timelm) support
arm64: dts: qcom: sm8250-lge-timelm: add reserved memory regions
dt-bindings: display: panel: add LG SW43103 drm/panel: add LG SW43103 panel driver
dt-bindings: input: touchscreen: add Silicon Works SW42902
Input: touchscreen: add Silicon Works SW42902 support
arm64: dts: qcom: sm8250-lge-timelm: enable SW43103 panel
arm64: dts: qcom: sm8250-lge-timelm: add SW42902 touchscreen
arm64: dts: qcom: sm8250-lge-timelm: enable USB Type-C
arm64: dts: qcom: sm8250-lge-timelm: add QCA6390 Bluetooth

 .../devicetree/bindings/arm/qcom.yaml         |   1 +
 .../bindings/display/panel/lg,sw43103.yaml    |  70 ++
 .../input/touchscreen/lg,sw42902.yaml         |  74 ++
 .../devicetree/bindings/vendor-prefixes.yaml  |   2 +
 MAINTAINERS                                   |  19 +
 arch/arm64/boot/dts/qcom/Makefile             |   1 +
 .../arm64/boot/dts/qcom/sm8250-lge-timelm.dts | 744 ++++++++++++++++++
 drivers/gpu/drm/panel/Kconfig                 |  13 +
 drivers/gpu/drm/panel/Makefile                |   1 +
 drivers/gpu/drm/panel/panel-lg-sw43103.c      | 594 ++++++++++++++
 drivers/input/touchscreen/Kconfig             |  11 +
 drivers/input/touchscreen/Makefile            |   1 +
 drivers/input/touchscreen/sw42902.c           | 315 ++++++++
 13 files changed, 1846 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/display/panel/lg,sw43103.yaml
 create mode 100644 Documentation/devicetree/bindings/input/touchscreen/lg,sw42902.yaml
 create mode 100644 arch/arm64/boot/dts/qcom/sm8250-lge-timelm.dts
 create mode 100644 drivers/gpu/drm/panel/panel-lg-sw43103.c
 create mode 100644 drivers/input/touchscreen/sw42902.c
Signature · 1 line
2.39.5
#1 lore raw

PATCH 1/11 dt-bindings: arm: qcom: add LG V60 ThinQ 5G (timelm)

Document the compatible for the LG V60 ThinQ 5G (timelm), based on SM8250, and register the LG Electronics vendor prefix.

---
 Documentation/devicetree/bindings/arm/qcom.yaml        | 1 +
 Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
 2 files changed, 3 insertions(+)
Documentation/devicetree/bindings/arm/qcom.yaml +1 -0
index 121ca557ce1ef..f8b34109171d0 100644
@@ -1139,6 +1139,7 @@ properties:
 
       - items:
           - enum:
+              - lge,timelm
               - qcom,qrb5165-rb5
               - qcom,sm8250-hdk
               - qcom,sm8250-mtp
Documentation/devicetree/bindings/vendor-prefixes.yaml +2 -0
index 5471a06f93f10..fa50a81880f0b 100644
@@ -971,6 +971,8 @@ patternProperties:
     description: Lenovo Group Ltd.
   "^lg,.*":
     description: LG Corporation
+  "^lge,.*":
+    description: LG Electronics
   "^lgphilips,.*":
     description: LG Display
   "^libretech,.*":
Signature · 1 line
2.39.5
#2 lore raw

Re: [PATCH v1 01/11] dt-bindings: arm: qcom: add LG V60 ThinQ 5G (timelm)

Thank you for your contribution! Sashiko AI review found 2 potential issues to consider: - [High] dt-bindings: arm: qcom: username in Signed-off-by instead of real name - [Low] dt-bindings: arm…

Thank you for your contribution! Sashiko AI review found 2 potential issues to consider:
- [High] dt-bindings: arm: qcom: username in Signed-off-by instead of real name
- [Low] dt-bindings: arm: qcom: duplicate lge vendor prefix instead of lg
--

commit 3057431969983ea736dadadbf8f06be7752765b6
Author: rofikkerneldev <[email protected]>

Quoted 6 lines

dt-bindings: arm: qcom: add LG V60 ThinQ 5G (timelm)

Document the compatible for the LG V60 ThinQ 5G (timelm), based on SM8250, and register the LG Electronics vendor prefix.

[Severity: High]
The Author header and Signed-off-by trailer use a handle (rofikkerneldev) instead of a known real human name, which is required by the Developer's Certificate of Origin in Documentation/process/submitting-patches.rst.

Quoted 17 lines
Documentation/devicetree/bindings/arm/qcom.yaml +1 -0
index 121ca557ce1ef..f8b34109171d0 100644
@@ -1139,6 +1139,7 @@ properties:
 
       - items:
           - enum:
+              - lge,timelm
               - qcom,qrb5165-rb5
               - qcom,sm8250-hdk
               - qcom,sm8250-mtp
Documentation/devicetree/bindings/vendor-prefixes.yaml +0 -0
index 5471a06f93f10..fa50a81880f0b 100644

Documentation/devicetree/bindings/vendor-prefixes.yaml patternProperties: · line 978

Quoted 8 lines
Documentation/devicetree/bindings/vendor-prefixes.yaml +2 -0
@@ -971,6 +971,8 @@ patternProperties:
     description: Lenovo Group Ltd.
   "^lg,.*":
     description: LG Corporation
+  "^lge,.*":
+    description: LG Electronics
   "^lgphilips,.*":
     description: LG Display
   "^libretech,.*":

[Severity: Low]
Should this use the existing "lg" vendor prefix (lg,timelm) instead of adding a duplicate "lge" prefix?

Documentation/devicetree/bindings/vendor-prefixes.yaml already defines "^lg,.*" for LG Corporation, and commit 5e4aac2caf12 ("dt-bindings: arm:
qcom: rename vendor of apq8026-lenok") replaced "lge" with "lg" in Documentation/devicetree/bindings/arm/qcom.yaml to avoid separate vendor prefixes for internal divisions of LG.

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
#3 lore raw

PATCH 2/11 arm64: dts: qcom: add LG V60 ThinQ 5G (timelm) support

In reply to rofikkerneldev

Add initial support for the LG V60 ThinQ 5G (timelm), based on the Qualcomm SM8250 SoC.

Describe the memory layout, PMIC regulators, buttons, serial console, UFS, SD card, and USB.

---
 MAINTAINERS                                   |   6 +
 arch/arm64/boot/dts/qcom/Makefile             |   1 +
 .../arm64/boot/dts/qcom/sm8250-lge-timelm.dts | 543 ++++++++++++++++++
 3 files changed, 550 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/sm8250-lge-timelm.dts
MAINTAINERS +6 -0
index ccbcdc0799b9f..315a4a000b405 100644
@@ -15231,6 +15231,12 @@ Q:	http://patchwork.linuxtv.org/project/linux-media/list/
 T:	git git://linuxtv.org/mkrufky/tuners.git
 F:	drivers/media/dvb-frontends/lgdt3305.*
 
+LG V60 THINQ 5G (TIMELM) SUPPORT
+M:	rofikkerneldev <[email protected]>
+L:	[email protected]
+S:	Maintained
+F:	arch/arm64/boot/dts/qcom/sm8250-lge-timelm*
+
 LIBATA PATA ARASAN COMPACT FLASH CONTROLLER
 M:	Viresh Kumar <[email protected]>
 L:	[email protected]
arch/arm64/boot/dts/qcom/Makefile +1 -0
index 88230c4e00ea9..91c9d95696f2a 100644
@@ -409,6 +409,7 @@ dtb-$(CONFIG_ARCH_QCOM)	+= sm8150-mtp.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm8150-sony-xperia-kumano-bahamut.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm8150-sony-xperia-kumano-griffin.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm8250-hdk.dtb
+dtb-$(CONFIG_ARCH_QCOM)	+= sm8250-lge-timelm.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm8250-mtp.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm8250-samsung-r8q.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm8250-samsung-x1q.dtb
arch/arm64/boot/dts/qcom/sm8250-lge-timelm.dts new file +543 -0

543 lines not on this page · raw message

Signature · 1 line
2.39.5
#4 lore raw

Re: [PATCH v1 02/11] arm64: dts: qcom: add LG V60 ThinQ 5G (timelm) support

Thank you for your contribution! Sashiko AI review found 8 potential issues to consider: - [High] arm64: dts: qcom: timelm: enabling gpu without gmu fails a6xx_gmu_init() - [High] arm64: dts: qcom…

Thank you for your contribution! Sashiko AI review found 8 potential issues to consider:
- [High] arm64: dts: qcom: timelm: enabling gpu without gmu fails a6xx_gmu_init()
- [High] arm64: dts: qcom: timelm: invalid 1.05V constraint on PM8009 ldo4
- [High] arm64: dts: qcom: handle used instead of real name in DCO and MAINTAINERS
- [Medium] arm64: dts: qcom: timelm: swapped vdda-phy and vdda-pll on usb_1_qmpphy
- [Medium] arm64: dts: qcom: timelm: missing pinctrl states on sdhc_2 node
- [Medium] arm64: dts: qcom: ramoops sub-buffers exhaust region and disable dmesg dumps
- [Low] arm64: dts: qcom: missing DRMS properties on UFS supply regulators
- [Low] arm64: dts: qcom: unused dt-bindings headers in sm8250-lge-timelm.dts
--

commit e0c6ddf610453315a993fcf369aad59d6f783910
Author: rofikkerneldev <[email protected]>

arm64: dts: qcom: add LG V60 ThinQ 5G (timelm) support

This commit adds initial device tree support and a MAINTAINERS entry for the Qualcomm SM8250-based LG V60 ThinQ 5G (timelm) smartphone.

Quoted 7 lines
MAINTAINERS +0 -0
index 222b7fc2c3aab..c88fc0e019296 100644
@@ -15231,6 +15231,12 @@ Q:	http://patchwork.linuxtv.org/project/linux-media/list/
 T:	git git://linuxtv.org/mkrufky/tuners.git
 F:	drivers/media/dvb-frontends/lgdt3305.*

MAINTAINERS Q: http://patchwork.linuxtv.org/project/linux-media/list/ · line 15242

Quoted 10 lines
MAINTAINERS +6 -0
 
+LG V60 THINQ 5G (TIMELM) SUPPORT
+M:	rofikkerneldev <[email protected]>
+L:	[email protected]
+S:	Maintained
+F:	arch/arm64/boot/dts/qcom/sm8250-lge-timelm*
+
 LIBATA PATA ARASAN COMPACT FLASH CONTROLLER
 M:	Viresh Kumar <[email protected]>
 L:	[email protected]

[Severity: High]
The MAINTAINERS entry, commit author, Signed-off-by trailer, and sm8250-lge-timelm.dts copyright header use the account handle rofikkerneldev instead of a real name, which does not satisfy the Developer's Certificate of Origin in Documentation/process/submitting-patches.rst.

Quoted 12 lines
arch/arm64/boot/dts/qcom/sm8250-lge-timelm.dts new file +6 -0
new file mode 100644
index 0000000000000..74b673ebbeb9d
@@ -0,0 +1,543 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Copyright (c) 2026 rofikkerneldev <[email protected]>
+ * Device Tree for LG V60 ThinQ 5G (timelm / LM-V600)
+ */
+

arch/arm64/boot/dts/qcom/sm8250-lge-timelm.dts line 16

Quoted 10 lines
arch/arm64/boot/dts/qcom/sm8250-lge-timelm.dts new file +10 -0
+/dts-v1/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
+#include <dt-bindings/phy/phy.h>
+#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
+#include <dt-bindings/sound/qcom,q6afe.h>
+#include <dt-bindings/sound/qcom,q6asm.h>
+#include <dt-bindings/usb/pd.h>

[Severity: Low]
This isn't a bug, but dt-bindings/leds/common.h, dt-bindings/sound/qcom,q6afe.h, and dt-bindings/sound/qcom,q6asm.h are unused throughout the series, while dt-bindings/phy/phy.h and dt-bindings/usb/pd.h are only needed starting in commit "arm64: dts: qcom:
sm8250-lge-timelm: enable SW43103 panel" and commit "arm64: dts: qcom:
sm8250-lge-timelm: enable USB Type-C".

[ ... ]

arch/arm64/boot/dts/qcom/sm8250-lge-timelm.dts line 106

Quoted 9 lines
arch/arm64/boot/dts/qcom/sm8250-lge-timelm.dts new file +9 -0
+	reserved-memory {
+		ramoops: ramoops@b0000000 {
+			compatible = "ramoops";
+			reg = <0x0 0xb0000000 0x0 0x280000>;
+			record-size = <0x1000>;
+			console-size = <0x40000>;
+			ftrace-size = <0x40000>;
+			pmsg-size = <0x200000>;
+		};

[Severity: Medium]
Does ramoops@b0000000 leave any space for record-size?

console-size (0x40000), ftrace-size (0x40000), and pmsg-size (0x200000) consume the entire 0x280000 region, so ramoops_probe() computes dump_mem_sz as 0 and disables dmesg oops and panic dumps. While commit "arm64: dts: qcom: sm8250-lge-timelm: add reserved memory regions" adds no-map to this node, the sizes remain unchanged.

[ ... ]

Quoted 27 lines
arch/arm64/boot/dts/qcom/sm8250-lge-timelm.dts new file +27 -0
+	regulators-2 {
+		compatible = "qcom,pm8009-rpmh-regulators";
+		qcom,pmic-id = "f";
+
+		vdd-s1-supply = <&vph_pwr>;
+		vdd-s2-supply = <&vreg_bob>;
+		vdd-l2-supply = <&vreg_s8c_1p2>;
+		vdd-l5-l6-supply = <&vreg_bob>;
+		vdd-l7-supply = <&vreg_s4a_1p8>;
+
+		vreg_s1f_1p2: smps1 {
+			regulator-name = "vreg_s1f_1p2";
+			regulator-min-microvolt = <1200000>;
+			regulator-max-microvolt = <1200000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_s2f_0p5: smps2 {
+			regulator-name = "vreg_s2f_0p5";
+			regulator-min-microvolt = <512000>;
+			regulator-max-microvolt = <1100000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l2f_1p3: ldo2 {
+			regulator-name = "vreg_l2f_1p3";
+			regulator-min-microvolt = <1304000>;

arch/arm64/boot/dts/qcom/sm8250-lge-timelm.dts line 395

Quoted 10 lines
arch/arm64/boot/dts/qcom/sm8250-lge-timelm.dts new file +10 -0
+			regulator-max-microvolt = <1304000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l4f_1p05: ldo4 {
+			regulator-name = "vreg_l4f_1p05";
+			regulator-min-microvolt = <1050000>;
+			regulator-max-microvolt = <1050000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};

[Severity: High]
Does vreg_l4f_1p05 cause rpmh_regulator_probe() to fail for the entire regulators-2 node?

In pm8009_vreg_data, ldo4 uses pmic5_nldo, which has a 320000 uV base and an 8000 uV step. Because 1050000 uV lies between the 1048000 uV and 1056000 uV steps, machine_constraints_voltage() returns -EINVAL and aborts registration of all PM8009 regulators in regulators-2. In addition, regulators-2 omits vdd-l4-supply.

[ ... ]

arch/arm64/boot/dts/qcom/sm8250-lge-timelm.dts line 443

Quoted 8 lines
arch/arm64/boot/dts/qcom/sm8250-lge-timelm.dts new file +8 -0
+&gpu {
+	status = "okay";
+
+	zap-shader {
+		memory-region = <&gpu_mem>;
+		firmware-name = "qcom/sm8250/a650_zap.mbn";
+	};
+};

[Severity: High]
Does enabling &gpu without enabling &gmu cause GPU initialization to fail?

In sm8250.dtsi, gmu has status = "disabled" by default, so no platform device is created for it and a6xx_gpu_init() -> a6xx_gmu_init() returns -ENODEV. Also, memory-region = <&gpu_mem> is already set on gpu_zap_shader in sm8250.dtsi.

[ ... ]

arch/arm64/boot/dts/qcom/sm8250-lge-timelm.dts line 502

Quoted 10 lines
arch/arm64/boot/dts/qcom/sm8250-lge-timelm.dts new file +10 -0
+&ufs_mem_hc {
+	status = "okay";
+
+	vcc-supply = <&vreg_l17a_3p0>;
+	vcc-max-microamp = <800000>;
+	vccq-supply = <&vreg_l6a_1p2>;
+	vccq-max-microamp = <800000>;
+	vccq2-supply = <&vreg_s4a_1p8>;
+	vccq2-max-microamp = <800000>;
+};

[Severity: Low]
Should vreg_l17a_3p0, vreg_l6a_1p2, and vreg_s4a_1p8 set regulator-allow-set-load and regulator-allowed-modes?

Without those properties on the regulator nodes, the max-microamp limits here have no effect when ufshcd calls regulator_set_load(), leaving the three UFS rails in RPMH_REGULATOR_MODE_HPM during UFS low-power states.

[ ... ]

arch/arm64/boot/dts/qcom/sm8250-lge-timelm.dts line 520

Quoted 10 lines
arch/arm64/boot/dts/qcom/sm8250-lge-timelm.dts new file +10 -0
+&sdhc_2 {
+	status = "okay";
+
+	cd-gpios = <&tlmm 77 GPIO_ACTIVE_LOW>;
+	vmmc-supply = <&vreg_l9c_2p9>;
+	vqmmc-supply = <&vreg_l6c_2p9>;
+	bus-width = <4>;
+	no-sdio;
+	no-mmc;
+};

[Severity: Medium]
Should &sdhc_2 configure default and sleep pinctrl states?

sdhc_2 in sm8250.dtsi does not define pinctrl properties, so the SDCC2 pads (sdc2_clk, sdc2_cmd, sdc2_data) and card-detect pin (gpio77) are left unconfigured by the kernel and will not transition to sdc2_sleep_state across suspend and resume.

[ ... ]

arch/arm64/boot/dts/qcom/sm8250-lge-timelm.dts line 543

Quoted 6 lines
arch/arm64/boot/dts/qcom/sm8250-lge-timelm.dts new file +6 -0
+&usb_1_qmpphy {
+	status = "okay";
+
+	vdda-phy-supply = <&vreg_l9a_1p2>;
+	vdda-pll-supply = <&vreg_l18a_0p9>;
+};

[Severity: Medium]
Are vdda-phy-supply and vdda-pll-supply swapped on &usb_1_qmpphy?

On SM8250, the QMP PHY core rail (vdda-phy-supply) is powered by the 0.9V vreg_l18a_0p9 regulator and the PLL rail (vdda-pll-supply) is powered by the 1.2V vreg_l9a_1p2 regulator; swapping them applies the driver's 21800 uA and 36000 uA load votes to the wrong LDOs.

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2
#5 lore raw

PATCH 3/11 arm64: dts: qcom: sm8250-lge-timelm: add reserved memory regions

In reply to rofikkerneldev

Reserve the XBL/UEFI log and DFPS data regions used by the firmware. Keep these regions protected from kernel reuse.

---
 arch/arm64/boot/dts/qcom/sm8250-lge-timelm.dts | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
arch/arm64/boot/dts/qcom/sm8250-lge-timelm.dts +16 -0
index 74b673ebbeb9d..ecbff27976fc2 100644
@@ -103,6 +103,12 @@ ramoops: ramoops@b0000000 {
 			console-size = <0x40000>;
 			ftrace-size = <0x40000>;
 			pmsg-size = <0x200000>;
+			no-map;
+		};
+
+		res_xbl_uefi_log_region: memory@80880000 {
+			reg = <0x0 0x80880000 0x0 0x14000>;
+			no-map;
 		};
 
 		adsp_mem: memory@8a100000 {
@@ -119,6 +125,16 @@ cdsp_secure_heap: memory@8c700000 {
 			reg = <0x0 0x8c700000 0x0 0x4600000>;
 			no-map;
 		};
+
+		cont_splash_mem: memory@9c000000 {
+			reg = <0x0 0x9c000000 0x0 0x1200000>;
+			no-map;
+		};
+
+		dfps_data_mem: memory@9e300000 {
+			reg = <0x0 0x9e300000 0x0 0x100000>;
+			no-map;
+		};
 	};
 
 	vph_pwr: vph-pwr-regulator {
Signature · 1 line
2.39.5
#6 lore raw

Re: [PATCH v1 03/11] arm64: dts: qcom: sm8250-lge-timelm: add reserved memory regions

Thank you for your contribution! Sashiko AI review found 4 potential issues to consider: - [High] arm64: dts: qcom: Signed-off-by and Author use handle instead of real name - [Medium] arm64: dts…

Thank you for your contribution! Sashiko AI review found 4 potential issues to consider:
- [High] arm64: dts: qcom: Signed-off-by and Author use handle instead of real name
- [Medium] arm64: dts: qcom: sm8250-lge-timelm: ramoops sub-buffers leave 0 bytes for dmesg
- [Low] arm64: dts: qcom: sm8250-lge-timelm: changelog omits cont_splash_mem and ramoops
- [Low] arm64: dts: qcom: sm8250-lge-timelm: reserved-memory nodes not sorted by address
--

commit d0da8e8448ef005db2a8bdee2ccfef831c824926
Author: rofikkerneldev <[email protected]>

Quoted 6 lines

arm64: dts: qcom: sm8250-lge-timelm: add reserved memory regions

Reserve the XBL/UEFI log and DFPS data regions used by the firmware. Keep these regions protected from kernel reuse.

[Severity: High]
The Author header, Signed-off-by trailer, and file copyright header in sm8250-lge-timelm.dts use the handle "rofikkerneldev" instead of a real human name, which does not meet the Developer's Certificate of Origin requirements in Documentation/process/submitting-patches.rst.

arch/arm64/boot/dts/qcom/sm8250-lge-timelm.dts ramoops: ramoops@b0000000 { · line 107

Quoted 10 lines
arch/arm64/boot/dts/qcom/sm8250-lge-timelm.dts +2 -0
index 74b673ebbeb9d..ecbff27976fc2 100644
@@ -103,6 +103,12 @@ ramoops: ramoops@b0000000 {
 			console-size = <0x40000>;
 			ftrace-size = <0x40000>;
 			pmsg-size = <0x200000>;
+			no-map;
+		};

[Severity: Medium]
Does ramoops@b0000000 leave any space for record-size = <0x1000>?

The node sets reg = <0x0 0xb0000000 0x0 0x280000>, and console-size (0x40000), ftrace-size (0x40000), and pmsg-size (0x200000) already sum to the full 0x280000 bytes. In ramoops_probe(), dump_mem_sz is computed as cxt->size - cxt->console_size - cxt->ftrace_size - cxt->pmsg_size, which evaluates to 0 and causes ramoops_init_przs() to skip registering dmesg crash dump zones (PSTORE_FLAGS_DMESG).

arch/arm64/boot/dts/qcom/sm8250-lge-timelm.dts ramoops: ramoops@b0000000 { · line 114

Quoted 7 lines
arch/arm64/boot/dts/qcom/sm8250-lge-timelm.dts +4 -0
+
+		res_xbl_uefi_log_region: memory@80880000 {
+			reg = <0x0 0x80880000 0x0 0x14000>;
+			no-map;
 		};
 
 		adsp_mem: memory@8a100000 {

[Severity: Low]
This isn't a bug, but ramoops@b0000000 is placed ahead of memory@80880000 and the other lower-addressed child nodes under /reserved-memory instead of being sorted in ascending unit-address order.

Quoted 7 lines
arch/arm64/boot/dts/qcom/sm8250-lge-timelm.dts +3 -0
@@ -119,6 +125,16 @@ cdsp_secure_heap: memory@8c700000 {
 			reg = <0x0 0x8c700000 0x0 0x4600000>;
 			no-map;
 		};
+
+		cont_splash_mem: memory@9c000000 {
+			reg = <0x0 0x9c000000 0x0 0x1200000>;

arch/arm64/boot/dts/qcom/sm8250-lge-timelm.dts cdsp_secure_heap: memory@8c700000 { · line 140

Quoted 10 lines
arch/arm64/boot/dts/qcom/sm8250-lge-timelm.dts +7 -0
+			no-map;
+		};
+
+		dfps_data_mem: memory@9e300000 {
+			reg = <0x0 0x9e300000 0x0 0x100000>;
+			no-map;
+		};
 	};
 
 	vph_pwr: vph-pwr-regulator {

[Severity: Low]
The commit message mentions only the XBL/UEFI log and DFPS data regions, omitting the addition of cont_splash_mem: memory@9c000000 and the no-map property on ramoops@b0000000. In addition, both /chosen/framebuffer@9c000000 and ramoops@b0000000 were introduced in the preceding commit "arm64: dts:
qcom: add LG V60 ThinQ 5G (timelm) support", so folding these reservations (and referencing &cont_splash_mem from framebuffer@9c000000) into the initial board commit would avoid leaving the framebuffer unreserved across commits in the series.

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=3
#7 lore raw

PATCH 4/11 dt-bindings: display: panel: add LG SW43103

In reply to rofikkerneldev

Document the SW43103 FHD+ AMOLED panel used by the LG V60. The panel uses DSI command mode with DSC and DCS backlight control.

---
 .../bindings/display/panel/lg,sw43103.yaml    | 70 +++++++++++++++++++
 MAINTAINERS                                   |  5 ++
 2 files changed, 75 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/display/panel/lg,sw43103.yaml
Documentation/devicetree/bindings/display/panel/lg,sw43103.yaml new file +70 -0
new file mode 100644
index 0000000000000..edd007e2c0d76
@@ -0,0 +1,70 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/panel/lg,sw43103.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: LG / BOE SW43103 1080x2460 DSI cmd mode panel
+
+maintainers:
+  - rofikkerneldev <[email protected]>
+
+description:
+  This panel is used on the LG V60 ThinQ 5G (timelm). It is a 60 Hz FHD+ AMOLED
+  panel driven by a Silicon Works SW43103 DDIC, operating in DSI Command Mode
+  with DSC (Display Stream Compression).
+
+allOf:
+  - $ref: panel-common.yaml#
+
+properties:
+  compatible:
+    enum:
+      - lg,sw43103
+      - boe,sw43103
+
+  reg:
+    maxItems: 1
+
+  port: true
+  vddi-supply: true
+  vpnl-supply: true
+  reset-gpios: true
+  enable-gpios: true
+
+required:
+  - compatible
+  - reg
+  - vddi-supply
+  - vpnl-supply
+  - reset-gpios
+  - port
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+
+    dsi {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        panel@0 {
+            compatible = "lg,sw43103";
+            reg = <0>;
+
+            vddi-supply = <&vreg_l14a_1p8>;
+            vpnl-supply = <&vreg_l11c_3p0>;
+
+            reset-gpios = <&tlmm 75 GPIO_ACTIVE_LOW>;
+            enable-gpios = <&pm8150l_gpios 4 GPIO_ACTIVE_HIGH>;
+
+            port {
+                endpoint {
+                    remote-endpoint = <&mdss_dsi0_out>;
+                };
+            };
+        };
+    };
+...
MAINTAINERS +5 -0
index 315a4a000b405..bca5065166c25 100644
@@ -15231,6 +15231,11 @@ Q:	http://patchwork.linuxtv.org/project/linux-media/list/
 T:	git git://linuxtv.org/mkrufky/tuners.git
 F:	drivers/media/dvb-frontends/lgdt3305.*
 
+LG SW43103 PANEL DRIVER
+M:	rofikkerneldev <[email protected]>
+S:	Maintained
+F:	Documentation/devicetree/bindings/display/panel/lg,sw43103.yaml
+
 LG V60 THINQ 5G (TIMELM) SUPPORT
 M:	rofikkerneldev <[email protected]>
 L:	[email protected]
Signature · 1 line
2.39.5
#8 lore raw

Re: [PATCH v1 04/11] dt-bindings: display: panel: add LG SW43103

Thank you for your contribution! Sashiko AI review found 2 potential issues to consider: - [High] dt-bindings: display: panel: lg,sw43103: handle used instead of real name - [Low] MAINTAINERS: LG…

Thank you for your contribution! Sashiko AI review found 2 potential issues to consider:
- [High] dt-bindings: display: panel: lg,sw43103: handle used instead of real name
- [Low] MAINTAINERS: LG SW43103 PANEL DRIVER added out of alphabetical order
--

commit 8f35306c3ad9479ca0f821358a8333dce583f152
Author: rofikkerneldev <[email protected]>

Quoted 18 lines

dt-bindings: display: panel: add LG SW43103

Document the SW43103 FHD+ AMOLED panel used by the LG V60. The panel uses DSI command mode with DSC and DCS backlight control.

---
 .../bindings/display/panel/lg,sw43103.yaml    | 70 +++++++++++++++++++
 MAINTAINERS                                   |  5 ++
 2 files changed, 75 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/display/panel/lg,sw43103.yaml
Documentation/devicetree/bindings/display/panel/lg,sw43103.yaml new file +0 -0
new file mode 100644
index 0000000000000..edd007e2c0d76

Documentation/devicetree/bindings/display/panel/lg,sw43103.yaml line 10

Quoted 10 lines
Documentation/devicetree/bindings/display/panel/lg,sw43103.yaml new file +10 -0
@@ -0,0 +1,70 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/panel/lg,sw43103.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: LG / BOE SW43103 1080x2460 DSI cmd mode panel
+
+maintainers:
+  - rofikkerneldev <[email protected]>

[Severity: High]
The commit Author, Signed-off-by trailer, DT binding schema maintainers entry, and MAINTAINERS M: entry all use the handle "rofikkerneldev" instead of a full real name. Under the Developer's Certificate of Origin in Documentation/process/submitting-patches.rst and the MAINTAINERS file requirements, these must use a real name in the form
"FullName <address@domain>".

[ ... ]

MAINTAINERS Q: http://patchwork.linuxtv.org/project/linux-media/list/ · line 15238

Quoted 13 lines
MAINTAINERS +5 -0
index c88fc0e019296..e7e32c23ba2fd 100644
@@ -15231,6 +15231,11 @@ Q:	http://patchwork.linuxtv.org/project/linux-media/list/
 T:	git git://linuxtv.org/mkrufky/tuners.git
 F:	drivers/media/dvb-frontends/lgdt3305.*
 
+LG SW43103 PANEL DRIVER
+M:	rofikkerneldev <[email protected]>
+S:	Maintained
+F:	Documentation/devicetree/bindings/display/panel/lg,sw43103.yaml
+

[Severity: Low]
This new section is out of alphabetical order in MAINTAINERS, which causes scripts/parse-maintainers.pl --order to warn. Since a space sorts before digits and letters, "LG SW43103 PANEL DRIVER" should be placed after "LG LAPTOP EXTRAS" and before "LG2160 MEDIA DRIVER".

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=4
#9 lore raw

PATCH 5/11 drm/panel: add LG SW43103 panel driver

In reply to rofikkerneldev

Add support for the 1080x2460 SW43103 AMOLED panel. Handle power and reset sequencing, DCS backlight control, and the DSC configuration required by the panel.

---
 MAINTAINERS                              |   1 +
 drivers/gpu/drm/panel/Kconfig            |  13 +
 drivers/gpu/drm/panel/Makefile           |   1 +
 drivers/gpu/drm/panel/panel-lg-sw43103.c | 594 +++++++++++++++++++++++
 4 files changed, 609 insertions(+)
 create mode 100644 drivers/gpu/drm/panel/panel-lg-sw43103.c
MAINTAINERS +1 -0
index bca5065166c25..abdaabe16ed53 100644
@@ -15235,6 +15235,7 @@ LG SW43103 PANEL DRIVER
 M:	rofikkerneldev <[email protected]>
 S:	Maintained
 F:	Documentation/devicetree/bindings/display/panel/lg,sw43103.yaml
+F:	drivers/gpu/drm/panel/panel-lg-sw43103.c
 
 LG V60 THINQ 5G (TIMELM) SUPPORT
 M:	rofikkerneldev <[email protected]>
drivers/gpu/drm/panel/Kconfig +13 -0
index 7a520b4d60fef..e765b9c7b02e6 100644
@@ -540,6 +540,19 @@ config DRM_PANEL_LG_LG4573
 	  Say Y here if you want to enable support for LG4573 RGB panel.
 	  To compile this driver as a module, choose M here.
 
+config DRM_PANEL_LG_SW43103
+	tristate "LG / BOE SW43103 panel"
+	depends on OF
+	depends on DRM_MIPI_DSI
+	depends on BACKLIGHT_CLASS_DEVICE
+	select DRM_DISPLAY_DSC_HELPER
+	select DRM_DISPLAY_HELPER
+	help
+	  Say Y here if you want to enable support for LG / BOE SW43103 panel.
+	  The panel has a 1080x2460@60Hz resolution and uses DSC command mode.
+	  It is used on devices such as the LG V60 ThinQ 5G (timelm).
+	  To compile this driver as a module, choose M here.
+
 config DRM_PANEL_LG_SW43408
 	tristate "LG SW43408 panel"
 	depends on GPIOLIB
drivers/gpu/drm/panel/Makefile +1 -0
index da5175909d540..c6f3280cd5828 100644
@@ -53,6 +53,7 @@ obj-$(CONFIG_DRM_PANEL_LINCOLNTECH_LCD197) += panel-lincolntech-lcd197.o
 obj-$(CONFIG_DRM_PANEL_LG_LB035Q02) += panel-lg-lb035q02.o
 obj-$(CONFIG_DRM_PANEL_LG_LD070WX3) += panel-lg-ld070wx3.o
 obj-$(CONFIG_DRM_PANEL_LG_LG4573) += panel-lg-lg4573.o
+obj-$(CONFIG_DRM_PANEL_LG_SW43103) += panel-lg-sw43103.o
 obj-$(CONFIG_DRM_PANEL_LG_SW43408) += panel-lg-sw43408.o
 obj-$(CONFIG_DRM_PANEL_LXD_M9189A) += panel-lxd-m9189a.o
 obj-$(CONFIG_DRM_PANEL_MAGNACHIP_D53E6EA8966) += panel-magnachip-d53e6ea8966.o
drivers/gpu/drm/panel/panel-lg-sw43103.c new file +594 -0

594 lines not on this page · raw message

Signature · 1 line
2.39.5
#10 lore raw

Re: [PATCH v1 05/11] drm/panel: add LG SW43103 panel driver

Thank you for your contribution! Sashiko AI review found 4 potential issues to consider: - [High] drm/panel: username handle used instead of real name in DCO and authorship - [Medium] drm/panel…

Thank you for your contribution! Sashiko AI review found 4 potential issues to consider:
- [High] drm/panel: username handle used instead of real name in DCO and authorship
- [Medium] drm/panel: sw43103_remove() calls sw43103_unprepare() unconditionally
- [Medium] drm/panel: sw43103: unsynchronized DSI transfers in sw43103_backlight_update_status()
- [Low] drm/panel: sw43103_enable() hardcodes full brightness before backlight_enable()
--

commit c8fd387b550027d7b2fde8a05702145f363e56ba
Author: rofikkerneldev <[email protected]>

Quoted 7 lines

drm/panel: add LG SW43103 panel driver

Add support for the 1080x2460 SW43103 AMOLED panel. Handle power and reset sequencing, DCS backlight control, and the DSC configuration required by the panel.

[Severity: High]
Under Documentation/process/submitting-patches.rst and the Developer Certificate of Origin, patches must use a real human name rather than a username handle (rofikkerneldev) in the commit author, Signed-off-by tag, maintainer entry, and module author macro.

Quoted 5 lines
drivers/gpu/drm/panel/panel-lg-sw43103.c new file +0 -0
new file mode 100644
index 0000000000000..caab54e0d1153

[ ... ]

Quoted 5 lines
drivers/gpu/drm/panel/panel-lg-sw43103.c new file +5 -0
+static int sw43103_enable(struct drm_panel *panel)
+{
+	struct sw43103_panel *sw43103 = to_panel_info(panel);
+	struct mipi_dsi_multi_context ctx = { .dsi = sw43103->link };
+

drivers/gpu/drm/panel/panel-lg-sw43103.c line 373

Quoted 10 lines
drivers/gpu/drm/panel/panel-lg-sw43103.c new file +10 -0
+	/* Display On */
+	mipi_dsi_dcs_set_display_on_multi(&ctx);
+	mipi_dsi_msleep(&ctx, 20);
+
+	/* Enable display backlight control and full brightness */
+	mipi_dsi_dcs_write_seq_multi(&ctx, MIPI_DCS_WRITE_CONTROL_DISPLAY, 0x2c);
+	mipi_dsi_dcs_write_seq_multi(&ctx, MIPI_DCS_SET_DISPLAY_BRIGHTNESS, 0x07, 0xff);
+
+	return ctx.accum_err;
+}

[Severity: Low]
Should sw43103_enable() leave brightness programming to the backlight device?

drm_panel_enable() calls backlight_enable(panel->backlight) right after panel->funcs->enable(panel), which invokes sw43103_backlight_update_status() to write the control display register and the configured brightness (defaulting to 1024). Hardcoding 0x07ff (2047) here duplicates those transfers and briefly flashes the panel at maximum brightness whenever the display is enabled at a lower brightness level.

[ ... ]

Quoted 10 lines
drivers/gpu/drm/panel/panel-lg-sw43103.c new file +10 -0
+static int sw43103_backlight_update_status(struct backlight_device *bl)
+{
+	struct mipi_dsi_device *dsi = bl_get_data(bl);
+	u16 brightness = backlight_get_brightness(bl);
+	u8 ctrl = 0x2c;
+	int ret;
+
+	dsi->mode_flags &= ~MIPI_DSI_MODE_LPM;
+
+	ret = mipi_dsi_dcs_write(dsi, MIPI_DCS_WRITE_CONTROL_DISPLAY, &ctrl, sizeof(ctrl));

drivers/gpu/drm/panel/panel-lg-sw43103.c line 442

Quoted 10 lines
drivers/gpu/drm/panel/panel-lg-sw43103.c new file +10 -0
+	if (ret < 0)
+		goto out;
+
+	ret = mipi_dsi_dcs_set_display_brightness_large(dsi, brightness);
+
+out:
+	dsi->mode_flags |= MIPI_DSI_MODE_LPM;
+
+	return ret < 0 ? ret : 0;
+}

[Severity: Medium]
Can a sysfs brightness write race with panel preparation or issue transfers while the panel is powered off?

sw43103_backlight_init() registers the backlight device during probe, and backlight_device_set_brightness() calls sw43103_backlight_update_status() under only bd->ops_lock and bd->update_lock. If userspace writes to sysfs while the panel is unprepared, mipi_dsi_dcs_write() runs while the panel is in reset or powered down. If it writes during sw43103_prepare(), it also races on dsi->mode_flags:

CPU0 CPU1
sw43103_prepare()
sw43103_program()

    sw43103_init_sequence()
                                  backlight_device_set_brightness()
                                    sw43103_backlight_update_status()
                                      dsi->mode_flags &= ~...
    mipi_dsi_dcs_write_seq_multi()
      /* sent in high-speed mode instead of low-power mode */

Conversely, restoring the low-power mode flag at the end of sw43103_backlight_update_status() while sw43103_program() is sending the picture parameter set forces mipi_dsi_picture_parameter_set_multi() into low-power mode.

[ ... ]

Quoted 5 lines
drivers/gpu/drm/panel/panel-lg-sw43103.c new file +5 -0
+static void sw43103_remove(struct mipi_dsi_device *dsi)
+{
+	struct sw43103_panel *ctx = mipi_dsi_get_drvdata(dsi);
+	int ret;
+

drivers/gpu/drm/panel/panel-lg-sw43103.c line 580

Quoted 10 lines
drivers/gpu/drm/panel/panel-lg-sw43103.c new file +10 -0
+	ret = sw43103_unprepare(&ctx->base);
+	if (ret < 0)
+		dev_err(&dsi->dev, "failed to unprepare panel: %d\n", ret);
+
+	ret = mipi_dsi_detach(dsi);
+	if (ret < 0)
+		dev_err(&dsi->dev, "failed to detach from DSI host: %d\n", ret);
+
+	drm_panel_remove(&ctx->base);
+}

[Severity: Medium]
Does calling sw43103_unprepare() directly in sw43103_remove() underflow the regulator enable counts?

sw43103_unprepare() unconditionally calls regulator_bulk_disable() without checking or updating ctx->base.prepared. If the panel is not prepared when the driver is unbound, regulator_bulk_disable() triggers an unbalanced regulator disable warning and returns -EIO; if the panel is prepared, powering it off before mipi_dsi_detach() and drm_panel_remove() leaves ctx->base.prepared set, causing modeset teardown to access an unpowered panel and disable the supplies a second time. Removing the manual sw43103_unprepare() call lets the modeset driver tear the panel down cleanly.

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=5
#11 lore raw

PATCH 6/11 dt-bindings: input: touchscreen: add Silicon Works SW42902

In reply to rofikkerneldev

Document the I2C touchscreen and its interrupt, reset, power-enable, and panel-size properties.

---
 .../input/touchscreen/lg,sw42902.yaml         | 74 +++++++++++++++++++
 MAINTAINERS                                   |  6 ++
 2 files changed, 80 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/input/touchscreen/lg,sw42902.yaml
Documentation/devicetree/bindings/input/touchscreen/lg,sw42902.yaml new file +74 -0
new file mode 100644
index 0000000000000..c56cfb8530eeb
@@ -0,0 +1,74 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/input/touchscreen/lg,sw42902.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Silicon Works SW42902 touchscreen
+
+maintainers:
+  - rofikkerneldev <[email protected]>
+
+description: |
+  I2C touchscreen used in the LG V60 timelm JP DCM. The controller boots
+  its existing flash firmware; the enable GPIOs switch its 3.3 V and
+  1.8 V power rails.
+
+allOf:
+  - $ref: touchscreen.yaml#
+
+properties:
+  compatible:
+    const: lg,sw42902
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  reset-gpios:
+    maxItems: 1
+    description: Active-low controller reset
+
+  vcl-gpios:
+    maxItems: 1
+    description: Active-high enable for the 3.3 V rail
+
+  vdd-gpios:
+    maxItems: 1
+    description: Active-high enable for the 1.8 V rail
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - reset-gpios
+  - vcl-gpios
+  - vdd-gpios
+  - touchscreen-size-x
+  - touchscreen-size-y
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+    #include <dt-bindings/interrupt-controller/irq.h>
+
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        touchscreen@28 {
+            compatible = "lg,sw42902";
+            reg = <0x28>;
+            interrupt-parent = <&tlmm>;
+            interrupts = <39 IRQ_TYPE_LEVEL_LOW>;
+            reset-gpios = <&tlmm 38 GPIO_ACTIVE_LOW>;
+            vcl-gpios = <&tlmm 67 GPIO_ACTIVE_HIGH>;
+            vdd-gpios = <&tlmm 68 GPIO_ACTIVE_HIGH>;
+            touchscreen-size-x = <1080>;
+            touchscreen-size-y = <2460>;
+        };
+    };
MAINTAINERS +6 -0
index abdaabe16ed53..f4c54d7d86bd8 100644
@@ -25835,6 +25835,12 @@ S:	Maintained
 F:	Documentation/fb/sm712fb.rst
 F:	drivers/video/fbdev/sm712*
 
+SILICON WORKS SW42902 TOUCHSCREEN DRIVER
+M:	rofikkerneldev <[email protected]>
+L:	[email protected]
+S:	Maintained
+F:	Documentation/devicetree/bindings/input/touchscreen/lg,sw42902.yaml
+
 SILVACO I3C DUAL-ROLE MASTER
 M:	Miquel Raynal <[email protected]>
 M:	Frank Li <[email protected]>
Signature · 1 line
2.39.5
#12 lore raw

Re: [PATCH v1 06/11] dt-bindings: input: touchscreen: add Silicon Works SW42902

Thank you for your contribution! Sashiko AI review found 2 potential issues to consider: - [High] dt-bindings: input: touchscreen: username handle used in sign-off and maintainer - [Medium]…

Thank you for your contribution! Sashiko AI review found 2 potential issues to consider:
- [High] dt-bindings: input: touchscreen: username handle used in sign-off and maintainer
- [Medium] dt-bindings: input: lg,sw42902: power rails modeled as GPIOs instead of supplies
--

commit c2a344c3130db163c68195828fdefbdfd36cd07a
Author: rofikkerneldev <[email protected]>

Quoted 6 lines

dt-bindings: input: touchscreen: add Silicon Works SW42902

Document the I2C touchscreen and its interrupt, reset, power-enable, and panel-size properties.

[Severity: High]
The Developer's Certificate of Origin requires a real human name (known identity) rather than an account handle or pseudonym in Signed-off-by trailers, the commit Author header, the binding's maintainers list, and MAINTAINERS.

Quoted 6 lines
Documentation/devicetree/bindings/input/touchscreen/lg,sw42902.yaml new file +0 -0
new file mode 100644
index 0000000000000..c56cfb8530eeb
@@ -0,0 +1,74 @@

[ ... ]

Quoted 5 lines
Documentation/devicetree/bindings/input/touchscreen/lg,sw42902.yaml new file +5 -0
+  vcl-gpios:
+    maxItems: 1
+    description: Active-high enable for the 3.3 V rail
+
+  vdd-gpios:

Documentation/devicetree/bindings/input/touchscreen/lg,sw42902.yaml line 48

Quoted 10 lines
Documentation/devicetree/bindings/input/touchscreen/lg,sw42902.yaml new file +10 -0
+    maxItems: 1
+    description: Active-high enable for the 1.8 V rail
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - reset-gpios
+  - vcl-gpios
+  - vdd-gpios

[Severity: Medium]
Should the 3.3 V VCL and 1.8 V VDD power inputs be described as vcl-supply and vdd-supply regulator properties instead of vcl-gpios and vdd-gpios?

VCL and VDD are power supply rails on the SW42902 controller rather than GPIO pins, so requiring GPIO properties in the binding prevents it from describing boards powered by PMIC regulators or always-on supplies. GPIO-switched rails on a specific board can be modeled as regulator-fixed nodes in the board DTS connected to vcl-supply and vdd-supply.

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=6
#13 lore raw

PATCH 7/11 Input: touchscreen: add Silicon Works SW42902 support

In reply to rofikkerneldev

Add basic multitouch support for the SW42902 controller. Implement the GPIO power and reset sequence and use the firmware already present in controller flash; no firmware update is performed.

---
 MAINTAINERS                         |   1 +
 drivers/input/touchscreen/Kconfig   |  11 +
 drivers/input/touchscreen/Makefile  |   1 +
 drivers/input/touchscreen/sw42902.c | 315 ++++++++++++++++++++++++++++
 4 files changed, 328 insertions(+)
 create mode 100644 drivers/input/touchscreen/sw42902.c
MAINTAINERS +1 -0
index f4c54d7d86bd8..83bbedde94533 100644
@@ -25840,6 +25840,7 @@ M:	rofikkerneldev <[email protected]>
 L:	[email protected]
 S:	Maintained
 F:	Documentation/devicetree/bindings/input/touchscreen/lg,sw42902.yaml
+F:	drivers/input/touchscreen/sw42902.c
 
 SILVACO I3C DUAL-ROLE MASTER
 M:	Miquel Raynal <[email protected]>
drivers/input/touchscreen/Kconfig +11 -0
index 9b9ae8ac3f7fd..eadba5125a225 100644
@@ -1402,6 +1402,17 @@ config TOUCHSCREEN_ZINITIX
 	  To compile this driver as a module, choose M here: the
 	  module will be called zinitix.
 
+config TOUCHSCREEN_SW42902
+	tristate "Silicon Works SW42902 touchscreen"
+	depends on I2C
+	depends on GPIOLIB
+	help
+	  Say Y here for the SW42902 I2C touchscreen used in the LG V60.
+	  Basic multitouch uses the controller's existing flash firmware.
+
+	  To compile this driver as a module, choose M here: the module
+	  will be called sw42902.
+
 config TOUCHSCREEN_HIMAX_HX83112B
 	tristate "Himax hx83112b touchscreen driver"
 	depends on I2C
drivers/input/touchscreen/Makefile +1 -0
index bfd9de83389d8..ee312c2d1529c 100644
@@ -119,3 +119,4 @@ obj-$(CONFIG_TOUCHSCREEN_IQS5XX)	+= iqs5xx.o
 obj-$(CONFIG_TOUCHSCREEN_IQS7211)	+= iqs7211.o
 obj-$(CONFIG_TOUCHSCREEN_ZINITIX)	+= zinitix.o
 obj-$(CONFIG_TOUCHSCREEN_HIMAX_HX83112B)	+= himax_hx83112b.o
+obj-$(CONFIG_TOUCHSCREEN_SW42902)		+= sw42902.o
drivers/input/touchscreen/sw42902.c new file +315 -0

315 lines not on this page · raw message

Signature · 1 line
2.39.5
#14 lore raw

Re: [PATCH v1 07/11] Input: touchscreen: add Silicon Works SW42902 support

Thank you for your contribution! Sashiko AI review found 6 potential issues to consider: - [High] Input: sw42902: username handle in Signed-off-by trailer and MAINTAINERS - [Medium] Input: sw42902…

Thank you for your contribution! Sashiko AI review found 6 potential issues to consider:
- [High] Input: sw42902: username handle in Signed-off-by trailer and MAINTAINERS
- [Medium] Input: sw42902: IRQ disable imbalance on sw42902_resume() error path
- [Low] Input: sw42902: use named initializer in struct i2c_device_id table
- [Low] Input: sw42902: follow Input error variable naming and return style
- [Low] Input: sw42902: partial MT events queued before palm cancel in sw42902_irq()
- [Low] Input: sw42902: redundant dev_err_probe() after devm_request_threaded_irq()
--

commit 7d934418330ef369d907f6e1ac22a2b5372028a3
Author: rofikkerneldev <[email protected]>

Quoted 7 lines

Input: touchscreen: add Silicon Works SW42902 support

Add basic multitouch support for the SW42902 controller. Implement the GPIO power and reset sequence and use the firmware already present in controller flash; no firmware update is performed.

[Severity: High]
The Signed-off-by trailer, Author header, and MAINTAINERS entry for this driver use an account handle (rofikkerneldev) instead of a real human name, which does not meet the Developer's Certificate of Origin requirements in Documentation/process/submitting-patches.rst.

Quoted 5 lines
drivers/input/touchscreen/sw42902.c new file +0 -0
new file mode 100644
index 0000000000000..7b39a97053c63

[ ... ]

Quoted 12 lines
drivers/input/touchscreen/sw42902.c new file +12 -0
+	for (i = 0; i < count; i++) {
+		const u8 *contact = ts->report + 36 + 12 * i;
+		u32 a = get_unaligned_le32(contact);
+		u32 b = get_unaligned_le32(contact + 4);
+		u32 c = get_unaligned_le32(contact + 8);
+		unsigned int id = a & 0x1f;
+		unsigned int event = (a >> 16) & 3;
+
+		if (id == 15) {
+			sw42902_release_contacts(ts);
+			return IRQ_HANDLED;
+		}

drivers/input/touchscreen/sw42902.c line 139

Quoted 10 lines
drivers/input/touchscreen/sw42902.c new file +10 -0
+		if (id >= SW42902_MAX_CONTACTS || (event != 1 && event != 2))
+			continue;
+
+		input_mt_slot(input, id);
+		input_mt_report_slot_state(input, MT_TOOL_FINGER, true);
+		touchscreen_report_pos(input, &ts->prop, a >> 18, b & 0x3fff, true);
+		input_report_abs(input, ABS_MT_PRESSURE, (b >> 14) & 0xff);
+		input_report_abs(input, ABS_MT_TOUCH_MAJOR, (c >> 4) & 0x3fff);
+		input_report_abs(input, ABS_MT_TOUCH_MINOR, c >> 18);
+	}

[Severity: Low]
Can sw42902_irq() queue partial multitouch events before cancelling the frame on a palm report?

If a report has active finger contacts at earlier indices followed by a palm entry (id == 15), the loop already queues slot activation and position events into input->vals[] for those earlier contacts before calling sw42902_release_contacts(), flushing transient touch updates and slot releases in the same SYN_REPORT frame.

[ ... ]

Quoted 19 lines
drivers/input/touchscreen/sw42902.c new file +19 -0
+static int sw42902_start(struct sw42902 *ts)
+{
+	u8 version[4];
+	int ret;
+
+	ret = sw42902_read(ts, SW42902_VERSION, version, sizeof(version));
+	if (ret)
+		return ret;
+	if (version[2] != 10 || (version[3] & 0xf) != 4) {
+		dev_err(&ts->client->dev, "unexpected chip/protocol: %u/%u\n",
+			version[2], version[3] & 0xf);
+		return -ENODEV;
+	}
+
+	ret = sw42902_write(ts, SW42902_SERIAL_SPI_EN, 0);
+	if (ret)
+		return ret;
+	ret = sw42902_write(ts, SW42902_DEVICE_CTL, 1);
+	if (ret)

drivers/input/touchscreen/sw42902.c line 196

Quoted 10 lines
drivers/input/touchscreen/sw42902.c new file +10 -0
+		return ret;
+	ret = sw42902_write(ts, SW42902_INTERRUPT_CTL, 1);
+	if (ret)
+		return ret;
+	ret = sw42902_write(ts, SW42902_DRIVING_CTL, SW42902_DRIVING_STOP);
+	if (ret)
+		return ret;
+	msleep(30);
+	return sw42902_write(ts, SW42902_DRIVING_CTL, SW42902_DRIVING_U3);
+}

[Severity: Low]
This isn't a bug, but in the Input subsystem variables that only hold 0 or a negative error code should be named error or err rather than ret (here and in sw42902_irq(), sw42902_probe(), and sw42902_resume()). Also, since sw42902_start() has multiple failure points, the final sw42902_write() call should check error and explicitly return 0 on success.

Quoted 2 lines
drivers/input/touchscreen/sw42902.c new file +2 -0
+static int sw42902_probe(struct i2c_client *client)
+{

[ ... ]

drivers/input/touchscreen/sw42902.c line 249

Quoted 5 lines
drivers/input/touchscreen/sw42902.c new file +5 -0
+	ret = devm_request_threaded_irq(dev, client->irq, NULL, sw42902_irq,
+					IRQF_ONESHOT | IRQF_NO_AUTOEN,
+					dev_name(dev), ts);
+	if (ret)
+		return dev_err_probe(dev, ret, "interrupt request failed\n");

[Severity: Low]
This isn't a bug, but devm_request_threaded_irq() already calls dev_err_probe() via devm_request_result() on failure, so wrapping its return value in dev_err_probe() logs a duplicate error message and overwrites the deferred probe reason.

[ ... ]

Quoted 15 lines
drivers/input/touchscreen/sw42902.c new file +15 -0
+static int sw42902_suspend(struct device *dev)
+{
+	struct sw42902 *ts = i2c_get_clientdata(to_i2c_client(dev));
+
+	disable_irq(ts->client->irq);
+	sw42902_release_contacts(ts);
+	sw42902_write(ts, SW42902_DRIVING_CTL, SW42902_DRIVING_STOP);
+	sw42902_power_off(ts);
+	return 0;
+}
+
+static int sw42902_resume(struct device *dev)
+{
+	struct sw42902 *ts = i2c_get_clientdata(to_i2c_client(dev));
+	int ret;

drivers/input/touchscreen/sw42902.c line 287

Quoted 10 lines
drivers/input/touchscreen/sw42902.c new file +10 -0
+
+	sw42902_power_on(ts);
+	ret = sw42902_start(ts);
+	if (ret) {
+		sw42902_power_off(ts);
+		return ret;
+	}
+	enable_irq(ts->client->irq);
+	return 0;
+}

[Severity: Medium]
What happens on the next suspend if sw42902_start() fails during sw42902_resume()?

When sw42902_start() fails, sw42902_resume() powers off the controller and returns without calling enable_irq(ts->client->irq). Because the PM core clears dev->power.is_suspended before invoking the resume callback, the next system suspend still calls sw42902_suspend(), which writes to the powered-off chip over I2C and calls disable_irq(ts->client->irq) a second time, leaving the IRQ disabled even if a later resume succeeds.

[ ... ]

drivers/input/touchscreen/sw42902.c line 300

Quoted 4 lines
drivers/input/touchscreen/sw42902.c new file +4 -0
+static const struct i2c_device_id sw42902_ids[] = {
+	{ "sw42902" },
+	{ }
+};

[Severity: Low]
This isn't a bug, but per I2C subsystem conventions new struct i2c_device_id entries should use named initializers ({ .name = "sw42902" }).

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=7
#15 lore raw

PATCH 8/11 arm64: dts: qcom: sm8250-lge-timelm: enable SW43103 panel

In reply to rofikkerneldev

Enable DISPCC, MDSS, DSI0, and its PHY. Attach the SW43103 panel with its power rails, reset GPIO, and four-lane DSI link.

---
 .../arm64/boot/dts/qcom/sm8250-lge-timelm.dts | 39 +++++++++++++++++++
 1 file changed, 39 insertions(+)
arch/arm64/boot/dts/qcom/sm8250-lge-timelm.dts +39 -0
index ecbff27976fc2..fca48472f5dfe 100644
@@ -557,3 +557,42 @@ &usb_1_qmpphy {
 	vdda-phy-supply = <&vreg_l9a_1p2>;
 	vdda-pll-supply = <&vreg_l18a_0p9>;
 };
+
+&dispcc {
+	status = "okay";
+};
+
+&mdss {
+	status = "okay";
+};
+
+&mdss_dsi0 {
+	vdda-supply = <&vreg_l9a_1p2>;
+	status = "okay";
+
+	panel@0 {
+		compatible = "lg,sw43103";
+		reg = <0>;
+
+		vddi-supply = <&vreg_l14a_1p8>;
+		vpnl-supply = <&vreg_l11c_3p0>;
+		reset-gpios = <&tlmm 75 GPIO_ACTIVE_LOW>;
+
+		port {
+			panel_in_0: endpoint {
+				remote-endpoint = <&mdss_dsi0_out>;
+			};
+		};
+	};
+};
+
+&mdss_dsi0_out {
+	data-lanes = <0 1 2 3>;
+	remote-endpoint = <&panel_in_0>;
+};
+
+&mdss_dsi0_phy {
+	vdds-supply = <&vreg_l5a_0p88>;
+	phy-type = <PHY_TYPE_DPHY>;
+	status = "okay";
+};
Signature · 1 line
2.39.5
#16 lore raw

Re: [PATCH v1 08/11] arm64: dts: qcom: sm8250-lge-timelm: enable SW43103 panel

Thank you for your contribution! Sashiko AI review found 5 potential issues to consider: - [High] arm64: dts: qcom: Signed-off-by and Author use handle rofikkerneldev - [High] arm64: dts: qcom…

Thank you for your contribution! Sashiko AI review found 5 potential issues to consider:
- [High] arm64: dts: qcom: Signed-off-by and Author use handle rofikkerneldev
- [High] arm64: dts: qcom: enabling mdss with gmu disabled breaks a6xx_gmu_init()
- [Medium] arm64: dts: qcom: missing enable-gpios in sm8250-lge-timelm panel@0 node
- [Medium] drm/panel: sw43103_remove() calls sw43103_unprepare() unconditionally
- [Low] arm64: dts: qcom: redundant dispcc status and unsorted mdss nodes
--

commit 3038d85d6373aad3b6104c371b0b0d8abde1a320
Author: rofikkerneldev <[email protected]>

Quoted 6 lines

arm64: dts: qcom: sm8250-lge-timelm: enable SW43103 panel

Enable DISPCC, MDSS, DSI0, and its PHY. Attach the SW43103 panel with its power rails, reset GPIO, and four-lane DSI link.

[Severity: High]
The Author header and Signed-off-by trailer use an account handle (rofikkerneldev) instead of a real human name, which does not meet the Developer Certificate of Origin requirements in Documentation/process/submitting-patches.rst.

arch/arm64/boot/dts/qcom/sm8250-lge-timelm.dts &usb_1_qmpphy { · line 563

Quoted 12 lines
arch/arm64/boot/dts/qcom/sm8250-lge-timelm.dts +4 -0
index ecbff27976fc2..fca48472f5dfe 100644
@@ -557,3 +557,42 @@ &usb_1_qmpphy {
 	vdda-phy-supply = <&vreg_l9a_1p2>;
 	vdda-pll-supply = <&vreg_l18a_0p9>;
 };
+
+&dispcc {
+	status = "okay";
+};

[Severity: Low]
This isn't a bug, but dispcc in arch/arm64/boot/dts/qcom/sm8250.dtsi is already enabled by default, so this status override is redundant. Also, board-level label overrides in Qualcomm device trees are sorted alphabetically, so the &mdss* nodes below belong between &gpu and &pm8150_gpios rather than after &usb_1_qmpphy.

arch/arm64/boot/dts/qcom/sm8250-lge-timelm.dts &usb_1_qmpphy { · line 567

Quoted 4 lines
arch/arm64/boot/dts/qcom/sm8250-lge-timelm.dts +4 -0
+
+&mdss {
+	status = "okay";
+};

[Severity: High]
Does enabling &mdss fail to bind the DRM device because &gmu is still disabled?

In sm8250-lge-timelm.dts, &gpu is enabled, while gmu in sm8250.dtsi defaults to status = "disabled" and is never enabled by the board DTS. When dpu_dev_probe() calls msm_drv_probe(), add_gpu_components() includes the GPU in the DRM component master match list alongside mdss_dsi0. During component_bind_all() in msm_drm_init(), adreno_bind() -> a6xx_gpu_init() -> a6xx_gmu_init() looks up the GMU platform device via of_find_device_by_node(), which returns NULL because the gmu node is disabled. a6xx_gmu_init() returns -ENODEV, aborting component_bind_all() and preventing both the display controller and the SW43103 panel from initializing unless &gmu is also enabled.

arch/arm64/boot/dts/qcom/sm8250-lge-timelm.dts &usb_1_qmpphy { · line 574

Quoted 7 lines
arch/arm64/boot/dts/qcom/sm8250-lge-timelm.dts +7 -0
+
+&mdss_dsi0 {
+	vdda-supply = <&vreg_l9a_1p2>;
+	status = "okay";
+
+	panel@0 {
+		compatible = "lg,sw43103";

[Severity: Medium]
Does instantiating "lg,sw43103" expose an unbalanced regulator disable in sw43103_remove() on driver unbind or module unload?

drivers/gpu/drm/panel/panel-lg-sw43103.c:sw43103_remove() {
	ret = sw43103_unprepare(&ctx->base);
	if (ret < 0)
		dev_err(&dsi->dev, "failed to unprepare panel: %d\n", ret);

	ret = mipi_dsi_detach(dsi);
	if (ret < 0)
		dev_err(&dsi->dev, "failed to detach from DSI host: %d\n", ret);

	drm_panel_remove(&ctx->base);
}

Calling the raw sw43103_unprepare() callback directly bypasses drm_panel_unprepare() and ctx->base.prepared tracking, unconditionally calling regulator_bulk_disable() on vddi and vpnl. If the panel is already unprepared, this underflows the regulator enable count and triggers a WARN in _regulator_disable(). If the panel is prepared and enabled, sw43103_unprepare() asserts reset and cuts power while ctx->base.prepared remains true, before mipi_dsi_detach() triggers DRM atomic shutdown to send MIPI DSI commands and call drm_panel_unprepare() a second time.

arch/arm64/boot/dts/qcom/sm8250-lge-timelm.dts &usb_1_qmpphy { · line 579

Quoted 5 lines
arch/arm64/boot/dts/qcom/sm8250-lge-timelm.dts +5 -0
+		reg = <0>;
+
+		vddi-supply = <&vreg_l14a_1p8>;
+		vpnl-supply = <&vreg_l11c_3p0>;
+		reset-gpios = <&tlmm 75 GPIO_ACTIVE_LOW>;

[Severity: Medium]
Should this panel node also specify enable-gpios = <&pm8150l_gpios 4 GPIO_ACTIVE_HIGH>?

The binding example for the timelm panel in Documentation/devicetree/bindings/display/panel/lg,sw43103.yaml specifies that GPIO alongside the same vddi-supply, vpnl-supply, and reset-gpios. Without enable-gpios here, devm_gpiod_get_optional(dev, "enable", GPIOD_OUT_LOW) in panel-lg-sw43103 returns NULL, and sw43103_prepare() and sw43103_unprepare() never toggle the panel's PM8150L GPIO 4 enable line across display power cycles.

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=8
#17 lore raw

PATCH 9/11 arm64: dts: qcom: sm8250-lge-timelm: add SW42902 touchscreen

In reply to rofikkerneldev

Describe the SW42902 on GENI I2C13 with its interrupt, reset, power-enable GPIOs, pinctrl, and native 1080x2460 touch area.

---
 .../arm64/boot/dts/qcom/sm8250-lge-timelm.dts | 36 +++++++++++++++++++
 1 file changed, 36 insertions(+)
arch/arm64/boot/dts/qcom/sm8250-lge-timelm.dts +36 -0
index fca48472f5dfe..a094aa81ad225 100644
@@ -596,3 +596,39 @@ &mdss_dsi0_phy {
 	phy-type = <PHY_TYPE_DPHY>;
 	status = "okay";
 };
+
+&i2c13 {
+	clock-frequency = <400000>;
+	status = "okay";
+
+	touchscreen@28 {
+		compatible = "lg,sw42902";
+		reg = <0x28>;
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&touch_reset_default &touch_irq_default>;
+		interrupt-parent = <&tlmm>;
+		interrupts = <39 IRQ_TYPE_LEVEL_LOW>;
+		reset-gpios = <&tlmm 38 GPIO_ACTIVE_LOW>;
+		vcl-gpios = <&tlmm 67 GPIO_ACTIVE_HIGH>;
+		vdd-gpios = <&tlmm 68 GPIO_ACTIVE_HIGH>;
+		touchscreen-size-x = <1080>;
+		touchscreen-size-y = <2460>;
+	};
+};
+
+&tlmm {
+	touch_reset_default: touch-reset-default-state {
+		pins = "gpio38";
+		function = "gpio";
+		drive-strength = <6>;
+		bias-pull-up;
+	};
+
+	touch_irq_default: touch-irq-default-state {
+		pins = "gpio39";
+		function = "gpio";
+		drive-strength = <2>;
+		bias-pull-up;
+	};
+};
Signature · 1 line
2.39.5
#18 lore raw

Re: [PATCH v1 09/11] arm64: dts: qcom: sm8250-lge-timelm: add SW42902 touchscreen

Thank you for your contribution! Sashiko AI review found 2 potential issues to consider: - [High] arm64: dts: qcom: Signed-off-by and Author use handle instead of real name - [Low] arm64: dts: qcom…

Thank you for your contribution! Sashiko AI review found 2 potential issues to consider:
- [High] arm64: dts: qcom: Signed-off-by and Author use handle instead of real name
- [Low] arm64: dts: qcom: sm8250-lge-timelm: i2c13 and tlmm nodes out of order
--

commit c8220e43d297448ae1467ca0fc69fcaa8385a92a
Author: rofikkerneldev <[email protected]>

Quoted 6 lines

arm64: dts: qcom: sm8250-lge-timelm: add SW42902 touchscreen

Describe the SW42902 on GENI I2C13 with its interrupt, reset, power-enable GPIOs, pinctrl, and native 1080x2460 touch area.

[Severity: High]
Both the commit Author and the Signed-off-by trailer use the account handle "rofikkerneldev" instead of a real human name. Under the Developer Certificate of Origin in Documentation/process/submitting-patches.rst, patches must be authored and signed off using a known real name rather than a pseudonym or username.

Quoted 34 lines
arch/arm64/boot/dts/qcom/sm8250-lge-timelm.dts +26 -0
index fca48472f5dfe..a094aa81ad225 100644
@@ -596,3 +596,39 @@ &mdss_dsi0_phy {
 	phy-type = <PHY_TYPE_DPHY>;
 	status = "okay";
 };
+
+&i2c13 {
+	clock-frequency = <400000>;
+	status = "okay";
+
+	touchscreen@28 {
+		compatible = "lg,sw42902";
+		reg = <0x28>;
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&touch_reset_default &touch_irq_default>;
+		interrupt-parent = <&tlmm>;
+		interrupts = <39 IRQ_TYPE_LEVEL_LOW>;
+		reset-gpios = <&tlmm 38 GPIO_ACTIVE_LOW>;
+		vcl-gpios = <&tlmm 67 GPIO_ACTIVE_HIGH>;
+		vdd-gpios = <&tlmm 68 GPIO_ACTIVE_HIGH>;
+		touchscreen-size-x = <1080>;
+		touchscreen-size-y = <2460>;
+	};
+};
+
+&tlmm {
+	touch_reset_default: touch-reset-default-state {
+		pins = "gpio38";
+		function = "gpio";
+		drive-strength = <6>;

arch/arm64/boot/dts/qcom/sm8250-lge-timelm.dts &mdss_dsi0_phy { · line 634

Quoted 10 lines
arch/arm64/boot/dts/qcom/sm8250-lge-timelm.dts +10 -0
+		bias-pull-up;
+	};
+
+	touch_irq_default: touch-irq-default-state {
+		pins = "gpio39";
+		function = "gpio";
+		drive-strength = <2>;
+		bias-pull-up;
+	};
+};

[Severity: Low]
This isn't a bug, but &i2c13 and &tlmm are appended at the bottom of the file after &mdss_dsi0_phy rather than in alphabetical order (&i2c13 after &gpu and &tlmm before &uart12) as expected by Documentation/devicetree/bindings/dts-coding-style.rst and the rest of this board file.

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=9
#19 lore raw

PATCH 10/11 arm64: dts: qcom: sm8250-lge-timelm: enable USB Type-C

In reply to rofikkerneldev

Enable the PM8150B Type-C controller as a sink-only port. Keep the primary DWC3 controller in peripheral mode for now; host mode and VBUS sourcing can be enabled after OTG power delivery is validated.

---
 arch/arm64/boot/dts/qcom/sm8250-lge-timelm.dts | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
arch/arm64/boot/dts/qcom/sm8250-lge-timelm.dts +18 -0
index a094aa81ad225..6b57c658cf918 100644
@@ -535,6 +535,24 @@ &sdhc_2 {
 	no-mmc;
 };
 
+&pm8150b_typec {
+	status = "okay";
+
+	vdd-pdphy-supply = <&vreg_l2a_3p1>;
+
+	connector {
+		compatible = "usb-c-connector";
+
+		power-role = "sink";
+		data-role = "device";
+		self-powered;
+
+		op-sink-microwatt = <15000000>;
+		sink-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)
+			     PDO_BATT(5000, 9000, 15000)>;
+	};
+};
+
 &usb_1 {
 	status = "okay";
 };
Signature · 1 line
2.39.5
#20 lore raw

Re: [PATCH v1 10/11] arm64: dts: qcom: sm8250-lge-timelm: enable USB Type-C

Thank you for your contribution! Sashiko AI review found 4 potential issues to consider: - [High] arm64: dts: qcom: username handle used in Signed-off-by trailer - [High] arm64: dts: qcom…

Thank you for your contribution! Sashiko AI review found 4 potential issues to consider:
- [High] arm64: dts: qcom: username handle used in Signed-off-by trailer
- [High] arm64: dts: qcom: sm8250-lge-timelm: missing OF graph ports in usb-c-connector
- [High] arm64: dts: qcom: sm8250-lge-timelm: PDO_BATT in sink-pdos breaks 9V PD current
- [Medium] arm64: dts: qcom: sm8250-lge-timelm: swapped supplies in usb_1_qmpphy
--

commit 81ec31057ff34acf5ea3063aab5a376e5f194531
Author: rofikkerneldev <[email protected]>

Quoted 7 lines

arm64: dts: qcom: sm8250-lge-timelm: enable USB Type-C

Enable the PM8150B Type-C controller as a sink-only port. Keep the primary DWC3 controller in peripheral mode for now; host mode and VBUS sourcing can be enabled after OTG power delivery is validated.

[Severity: High]
Under Documentation/process/submitting-patches.rst, the Developer's Certificate of Origin requires a real human name rather than an account handle in the Author header and Signed-off-by trailer.

Quoted 13 lines
arch/arm64/boot/dts/qcom/sm8250-lge-timelm.dts +5 -0
index a094aa81ad225..6b57c658cf918 100644
@@ -535,6 +535,24 @@ &sdhc_2 {
 	no-mmc;
 };
 
+&pm8150b_typec {
+	status = "okay";
+
+	vdd-pdphy-supply = <&vreg_l2a_3p1>;
+

arch/arm64/boot/dts/qcom/sm8250-lge-timelm.dts &sdhc_2 { · line 552

Quoted 10 lines
arch/arm64/boot/dts/qcom/sm8250-lge-timelm.dts +10 -0
+	connector {
+		compatible = "usb-c-connector";
+
+		power-role = "sink";
+		data-role = "device";
+		self-powered;
+
+		op-sink-microwatt = <15000000>;
+		sink-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)
+			     PDO_BATT(5000, 9000, 15000)>;

[Severity: High]
Should the second entry in sink-pdos use PDO_VAR() or PDO_FIXED() instead of PDO_BATT()?

PDO_BATT(5000, 9000, 15000) encodes 15000 mW in bits [9:0] in 250 mW units (value 60). When connected to a standard USB-PD adapter advertising a 9V PDO_TYPE_FIXED source PDO, tcpm_pd_select_pdo() matches that 9V source PDO against this sink PDO by voltage range, and tcpm_pd_build_request() then checks the source PDO type:

drivers/usb/typec/tcpm/tcpm.c:tcpm_pd_build_request() {
	...
	type = pdo_type(pdo);
	...
	if (type == PDO_TYPE_BATT) {
		mw = min_power(pdo, matching_snk_pdo);
		ma = 1000 * mw / mv;
	} else {
		ma = min_current(pdo, matching_snk_pdo);
		mw = ma * mv / 1000;
	}
}

Because the source PDO is PDO_TYPE_FIXED, min_current() calls pdo_max_current(matching_snk_pdo), which interprets bits [9:0] in 10 mA units. That clamps the requested current at 9V to 600 mA (5.4 W instead of 15 W) and sets RDO_CAP_MISMATCH.

arch/arm64/boot/dts/qcom/sm8250-lge-timelm.dts &sdhc_2 { · line 554

Quoted 2 lines
arch/arm64/boot/dts/qcom/sm8250-lge-timelm.dts +2 -0
+	};
+};

[Severity: High]
Is the connector node missing its ports subnode linking port@0 to usb_1_dwc3_hs_out and port@1 to usb_1_qmpphy_out (along with the matching remote-endpoint properties on those nodes)?

In qcom_pmic_typec_port_set_polarity(), the PM8150B TCPC driver does not program SuperSpeed lane polarity itself and leaves orientation switching to usb_1_qmpphy, which registers a Type-C orientation switch and mux in qmp_combo_probe(). Without the OF graph endpoints under connector, fwnode_typec_switch_get(), fwnode_typec_mux_get() and fwnode_usb_role_switch_get() find no matches and return NULL. When a Type-C cable is plugged in with reversed (CC2) orientation, typec_set_orientation() is a no-op and usb_1_qmpphy stays stuck in TYPEC_ORIENTATION_NORMAL, breaking SuperSpeed USB. Omitting port@0 also violates Documentation/devicetree/bindings/connector/usb-connector.yaml.

arch/arm64/boot/dts/qcom/sm8250-lge-timelm.dts &sdhc_2 { · line 558

Quoted 4 lines
arch/arm64/boot/dts/qcom/sm8250-lge-timelm.dts +1 -0
+
 &usb_1 {
 	status = "okay";
 };

[Severity: Medium]
Just below &usb_1, are vdda-phy-supply and vdda-pll-supply swapped in &usb_1_qmpphy (introduced earlier in this series in commit "arm64: dts:
qcom: add LG V60 ThinQ 5G (timelm) support")?

&usb_1_qmpphy currently sets:

	vdda-phy-supply = <&vreg_l9a_1p2>;
	vdda-pll-supply = <&vreg_l18a_0p9>;

On SM8250 QMP PHYs, vdda-phy-supply is the 0.9V core rail (vreg_l18a_0p9) and vdda-pll-supply is the 1.2V PLL rail (vreg_l9a_1p2). Because qmp_phy_vreg_l in drivers/phy/qualcomm/phy-qcom-qmp-combo.c requests 21800 uA on vdda-phy and 36000 uA on vdda-pll, swapping the supplies programs inverted load votes on the two LDOs when &usb_1 brings the PHY up.

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=10
#21 lore raw

PATCH 11/11 arm64: dts: qcom: sm8250-lge-timelm: add QCA6390 Bluetooth

In reply to rofikkerneldev

Describe the QCA6390 power sequencer and its PMU regulators. Enable the Bluetooth HCI controller on GENI UART6 with the supplies provided by the PMU.

---
 .../arm64/boot/dts/qcom/sm8250-lge-timelm.dts | 92 +++++++++++++++++++
 1 file changed, 92 insertions(+)
arch/arm64/boot/dts/qcom/sm8250-lge-timelm.dts +92 -0
index 6b57c658cf918..38816268fcf53 100644
@@ -95,6 +95,67 @@ key-assistant {
 		};
 	};
 
+	qca6390-pmu {
+		compatible = "qcom,qca6390-pmu";
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&bt_en_state>, <&wlan_en_state>;
+
+		vddaon-supply = <&vreg_s6a_0p6>;
+		vddpmu-supply = <&vreg_s6a_0p6>;
+		vddrfa0p95-supply = <&vreg_s6a_0p6>;
+		vddrfa1p3-supply = <&vreg_s8c_1p2>;
+		vddrfa1p9-supply = <&vreg_s5a_1p9>;
+		vddpcie1p3-supply = <&vreg_s8c_1p2>;
+		vddpcie1p9-supply = <&vreg_s5a_1p9>;
+		vddio-supply = <&vreg_s4a_1p8>;
+
+		wlan-enable-gpios = <&tlmm 20 GPIO_ACTIVE_HIGH>;
+		bt-enable-gpios = <&tlmm 21 GPIO_ACTIVE_HIGH>;
+
+		regulators {
+			vreg_pmu_rfa_cmn: ldo0 {
+				regulator-name = "vreg_pmu_rfa_cmn";
+			};
+
+			vreg_pmu_aon_0p59: ldo1 {
+				regulator-name = "vreg_pmu_aon_0p59";
+			};
+
+			vreg_pmu_wlcx_0p8: ldo2 {
+				regulator-name = "vreg_pmu_wlcx_0p8";
+			};
+
+			vreg_pmu_wlmx_0p85: ldo3 {
+				regulator-name = "vreg_pmu_wlmx_0p85";
+			};
+
+			vreg_pmu_btcmx_0p85: ldo4 {
+				regulator-name = "vreg_pmu_btcmx_0p85";
+			};
+
+			vreg_pmu_rfa_0p8: ldo5 {
+				regulator-name = "vreg_pmu_rfa_0p8";
+			};
+
+			vreg_pmu_rfa_1p2: ldo6 {
+				regulator-name = "vreg_pmu_rfa_1p2";
+			};
+
+			vreg_pmu_rfa_1p7: ldo7 {
+				regulator-name = "vreg_pmu_rfa_1p7";
+			};
+
+			vreg_pmu_pcie_0p9: ldo8 {
+				regulator-name = "vreg_pmu_pcie_0p9";
+			};
+
+			vreg_pmu_pcie_1p8: ldo9 {
+				regulator-name = "vreg_pmu_pcie_1p8";
+			};
+		};
+	};
+
 	reserved-memory {
 		ramoops: ramoops@b0000000 {
 			compatible = "ramoops";
@@ -506,6 +567,21 @@ &uart12 {
 	status = "okay";
 };
 
+&uart6 {
+	status = "okay";
+
+	bluetooth {
+		compatible = "qcom,qca6390-bt";
+
+		vddrfacmn-supply = <&vreg_pmu_rfa_cmn>;
+		vddaon-supply = <&vreg_pmu_aon_0p59>;
+		vddbtcmx-supply = <&vreg_pmu_btcmx_0p85>;
+		vddrfa0p8-supply = <&vreg_pmu_rfa_0p8>;
+		vddrfa1p2-supply = <&vreg_pmu_rfa_1p2>;
+		vddrfa1p7-supply = <&vreg_pmu_rfa_1p7>;
+	};
+};
+
 &ufs_mem_hc {
 	status = "okay";
 
@@ -636,6 +712,22 @@ touchscreen@28 {
 };
 
 &tlmm {
+	bt_en_state: bt-enable-state {
+		pins = "gpio21";
+		function = "gpio";
+		drive-strength = <2>;
+		bias-disable;
+		output-low;
+	};
+
+	wlan_en_state: wlan-enable-state {
+		pins = "gpio20";
+		function = "gpio";
+		drive-strength = <16>;
+		bias-pull-up;
+		output-low;
+	};
+
 	touch_reset_default: touch-reset-default-state {
 		pins = "gpio38";
 		function = "gpio";
Signature · 1 line
2.39.5
#22 lore raw

Re: [PATCH v1 11/11] arm64: dts: qcom: sm8250-lge-timelm: add QCA6390 Bluetooth

Thank you for your contribution! Sashiko AI review found 2 potential issues to consider: - [High] arm64: dts: qcom: non-real-name handle in Signed-off-by trailer - [High] arm64: dts: qcom…

Thank you for your contribution! Sashiko AI review found 2 potential issues to consider:
- [High] arm64: dts: qcom: non-real-name handle in Signed-off-by trailer
- [High] arm64: dts: qcom: sm8250-lge-timelm: under-volted QCA6390 PMU supplies
--

commit c689e882729fccea2deb0c720da66bf756537580
Author: rofikkerneldev <[email protected]>

Quoted 7 lines

arm64: dts: qcom: sm8250-lge-timelm: add QCA6390 Bluetooth

Describe the QCA6390 power sequencer and its PMU regulators. Enable the Bluetooth HCI controller on GENI UART6 with the supplies provided by the PMU.

[Severity: High]
The Author header and Signed-off-by trailer use an account handle (rofikkerneldev) instead of a known real human name, which does not meet the Developer's Certificate of Origin requirements in Documentation/process/submitting-patches.rst.

Quoted 12 lines
arch/arm64/boot/dts/qcom/sm8250-lge-timelm.dts +4 -0
index 6b57c658cf918..38816268fcf53 100644
@@ -95,6 +95,67 @@ key-assistant {
 		};
 	};
 
+	qca6390-pmu {
+		compatible = "qcom,qca6390-pmu";
+
+		pinctrl-names = "default";

arch/arm64/boot/dts/qcom/sm8250-lge-timelm.dts key-assistant { · line 111

Quoted 10 lines
arch/arm64/boot/dts/qcom/sm8250-lge-timelm.dts +10 -0
+		pinctrl-0 = <&bt_en_state>, <&wlan_en_state>;
+
+		vddaon-supply = <&vreg_s6a_0p6>;
+		vddpmu-supply = <&vreg_s6a_0p6>;
+		vddrfa0p95-supply = <&vreg_s6a_0p6>;
+		vddrfa1p3-supply = <&vreg_s8c_1p2>;
+		vddrfa1p9-supply = <&vreg_s5a_1p9>;
+		vddpcie1p3-supply = <&vreg_s8c_1p2>;
+		vddpcie1p9-supply = <&vreg_s5a_1p9>;
+		vddio-supply = <&vreg_s4a_1p8>;

[Severity: High]
Does wiring vddaon-supply, vddpmu-supply and vddrfa0p95-supply to vreg_s6a_0p6, and vddrfa1p3-supply and vddpcie1p3-supply to vreg_s8c_1p2, under-volt the QCA6390 PMU?

pwrseq-qcom-wcn only enables these regulators without calling regulator_set_voltage(), so the RPMh regulator driver initializes them to their regulator-min-microvolt constraints when enabled. In this board DT, vreg_s6a_0p6 has regulator-min-microvolt = <600000> and vreg_s8c_1p2 has regulator-min-microvolt = <1200000>, with no other consumer voting a higher voltage. That drives the 0.95V PMU inputs at 0.6V (below the PMU's own 0.8V and 0.85V LDO outputs) and the 1.35V inputs at 1.2V. Should the minimum voltages on smps6 and smps8 be raised to ~950000 uV and ~1350000 uV like on other SM8250 QCA6390 boards?

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=11