Skip to contentSkip to conversation

ARM: tegra: lg-x3: add missing nodes

PATCH In review Svyatoslav Ryhel 2 participants 8 messages Jan 26 – Mar 27

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

v2 cover ARM: tegra: lg-x3: add missing nodes

With the recent kernel updates, Tegra30-based LG smartphones now support several additional features, including an RGB-DSI bridge, DSI panels, MUIC, a charger, a battery temperature sensor, OTG mode, and capacitive buttons on the P895. Add required nodes to device trees.

---
Changes in v2:
- fixed dw9714 and tx13d100vm0eaa nodes
- added video device pipes graph

Regarding CHECK_DTBS output in v2:
- nvidia,tegra30-pcie, nvidia,tegra30-gmi, nvidia,tegra30-kbc, nvidia,tegra20-kbc, nvidia,tegra30-ahub are not documented yet
- nvidia,tegra30-vi was adjusted and applied, change did not apper yet
(https://lore.kernel.org/lkml/[email protected]/)
- st,m24c08 appers undocumented though it seems to be different from st,24c08, at least they google as separate devices. atmel,24c08 is not documented, though it is widey used in linux device trees and is supported by driver. Here is one of examples:
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/arch/arm/boot/dts/allwinner/sun7i-a20-linutronix-testbox-v2.dts?h=next-20260123#n33
- onnn,mt9m114 does not have 'orientation' property, though it should include it since it is generic for camera devices
- ti,lp8720 and maxim,max77663 have txt documentation and are not yet converted to DT schema
- backlight in panel nodes was not added since lm3533 has no DT support
- missing '#io-channel-cells' in ti,tsc2007 addressed in
https://lore.kernel.org/lkml/[email protected]/
- missing dsi controller properties of ssd2825 addressed in
https://lore.kernel.org/lkml/[email protected]/
- missing '#io-channel-cells' in generic-adc-thermal was proposed in but rejected
https://lore.kernel.org/lkml/[email protected]/
---

Svyatoslav Ryhel (4):
ARM: tegra: lg-x3: add panel and bridge nodes
ARM: tegra: lg-x3: add USB and power related nodes
ARM: tegra: lg-x3: add node for capacitive buttons
ARM: tegra: lg-x3: complete video device graph

 arch/arm/boot/dts/nvidia/tegra30-lg-p880.dts |  39 +++
 arch/arm/boot/dts/nvidia/tegra30-lg-p895.dts |  79 +++++
 arch/arm/boot/dts/nvidia/tegra30-lg-x3.dtsi  | 328 ++++++++++++++++++-
 3 files changed, 429 insertions(+), 17 deletions(-)
Signature · 1 line
2.51.0
#1 lore raw

PATCH v2 1/4 ARM: tegra: lg-x3: add panel and bridge nodes

Add RGB-DSI bridge and panel nodes to LG Optimus 4X and Vu device trees.

---
 arch/arm/boot/dts/nvidia/tegra30-lg-p880.dts | 23 ++++++
 arch/arm/boot/dts/nvidia/tegra30-lg-p895.dts | 27 +++++++
 arch/arm/boot/dts/nvidia/tegra30-lg-x3.dtsi  | 81 +++++++++++++++++++-
 3 files changed, 130 insertions(+), 1 deletion(-)
arch/arm/boot/dts/nvidia/tegra30-lg-p880.dts +23 -0
index c6ef0a20c19f..cc14e6dca770 100644
@@ -116,6 +116,29 @@ rmi4-f11@11 {
 		};
 	};
 
+	spi@7000dc00 {
+		dsi@2 {
+			/*
+			 * JDI 4.57" 720x1280 DX12D100VM0EAA MIPI DSI panel
+			 */
+			panel@1 {
+				compatible = "jdi,dx12d100vm0eaa", "renesas,r69328";
+				reg = <1>;
+
+				reset-gpios = <&gpio TEGRA_GPIO(W, 0) GPIO_ACTIVE_LOW>;
+
+				vdd-supply = <&vcc_3v0_lcd>;
+				vddio-supply = <&iovcc_1v8_lcd>;
+
+				port {
+					panel_input: endpoint {
+						remote-endpoint = <&bridge_output>;
+					};
+				};
+			};
+		};
+	};
+
 	memory-controller@7000f000 {
 		emc-timings-0 {
 			/* SAMSUNG 1GB K4P8G304EB FGC1 533MHz */
arch/arm/boot/dts/nvidia/tegra30-lg-p895.dts +27 -0
index e32fafc7f5e0..ab8f5cf317bf 100644
@@ -112,6 +112,33 @@ rmi4-f11@11 {
 		};
 	};
 
+	spi@7000dc00 {
+		dsi@2 {
+			/*
+			 * HITACHI/KOE 5" 768x1024 TX13D100VM0EAA MIPI DSI panel
+			 */
+			panel@1 {
+				compatible = "koe,tx13d100vm0eaa", "renesas,r61307";
+				reg = <1>;
+
+				reset-gpios = <&gpio TEGRA_GPIO(W, 0) GPIO_ACTIVE_LOW>;
+
+				renesas,gamma = <3>;
+				renesas,column-inversion;
+				renesas,contrast;
+
+				vcc-supply = <&vcc_3v0_lcd>;
+				iovcc-supply = <&iovcc_1v8_lcd>;
+
+				port {
+					panel_input: endpoint {
+						remote-endpoint = <&bridge_output>;
+					};
+				};
+			};
+		};
+	};
+
 	memory-controller@7000f000 {
 		emc-timings-2 {
 			/* Hynix 1GB H9TCNNN8JDMMPR LPDDR2 533MHz */
arch/arm/boot/dts/nvidia/tegra30-lg-x3.dtsi +80 -1

105 lines not on this page · raw message

Signature · 1 line
2.51.0
#2 lore raw

PATCH v2 2/4 ARM: tegra: lg-x3: add USB and power related nodes

In reply to Svyatoslav Ryhel

Add missing charger, MUIC and ADC sensor nodes. Reconfigure USB, set one of the ADC channels as the fuel gauge temperature sensor and add a battery thermal zone.

---
 arch/arm/boot/dts/nvidia/tegra30-lg-x3.dtsi | 93 ++++++++++++++++++++-
 1 file changed, 91 insertions(+), 2 deletions(-)
arch/arm/boot/dts/nvidia/tegra30-lg-x3.dtsi +91 -2
index 6eea8eacd7d5..768e201456d8 100644
@@ -1070,6 +1070,38 @@ rmi4-f11@11 {
 				syna,clip-y-low = <0>;
 			};
 		};
+
+		max14526: muic@44 {
+			compatible = "maxim,max14526";
+			reg = <0x44>;
+
+			interrupt-parent = <&gpio>;
+			interrupts = <TEGRA_GPIO(J, 0) IRQ_TYPE_EDGE_FALLING>;
+
+			muic_con: connector {
+				compatible = "usb-b-connector";
+				label = "micro-USB";
+				type = "micro";
+			};
+
+			port {
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				muic_to_charger: endpoint@0 {
+					reg = <0>;
+					remote-endpoint = <&charger_input>;
+				};
+			};
+		};
+
+		tsc2007: adc@48 {
+			compatible = "ti,tsc2007";
+			reg = <0x48>;
+
+			ti,x-plate-ohms = <1>;
+			#io-channel-cells = <1>;
+		};
 	};
 
 	cam_i2c: i2c@7000c500 {
@@ -1326,6 +1358,22 @@ ldo8 {
 			};
 		};
 
+		max8971: charger@35 {
+			compatible = "maxim,max8971";
+			reg = <0x35>;
+
+			interrupt-parent = <&gpio>;
+			interrupts = <TEGRA_GPIO(J, 2) IRQ_TYPE_LEVEL_LOW>;
+
+			monitored-battery = <&battery>;
+
+			port {
+				charger_input: endpoint {
+					remote-endpoint = <&muic_to_charger>;
+				};
+			};
+		};
+
 		fuel-gauge@36 {
 			compatible = "maxim,max17043";
 			reg = <0x36>;
@@ -1334,6 +1382,10 @@ fuel-gauge@36 {
 			interrupts = <TEGRA_GPIO(S, 0) IRQ_TYPE_EDGE_FALLING>;
 
 			monitored-battery = <&battery>;
+			power-supplies = <&max8971>;
+
+			io-channels = <&tbattery 0>;
+			io-channel-names = "temp";
 
 			maxim,alert-low-soc-level = <10>;
 			wakeup-source;
@@ -1514,12 +1566,13 @@ sdmmc4: mmc@78000600 {
 	usb@7d000000 {
 		compatible = "nvidia,tegra30-udc";
 		status = "okay";
-		dr_mode = "peripheral";
+		dr_mode = "otg";
+		extcon = <&max14526>, <&max14526>;
 	};
 
 	usb-phy@7d000000 {
 		status = "okay";
-		dr_mode = "peripheral";
+		dr_mode = "otg";
 		nvidia,hssync-start-delay = <0>;
 		nvidia,xcvr-lsfslew = <2>;
 		nvidia,xcvr-lsrslew = <2>;
@@ -1803,7 +1856,43 @@ sound {
 					 <&tegra_car TEGRA30_CLK_EXTERN1>;
 	};
 
+	tbattery: thermal-sensor-battery {
+		compatible = "generic-adc-thermal";
+		#thermal-sensor-cells = <0>;
+
+		io-channels = <&tsc2007 4>;
+		io-channel-names = "sensor-channel";
+		#io-channel-cells = <1>;
+
+		temperature-lookup-table = <
+			(-50000) 4100 (-40000) 3980 (-30000) 3815 (-20000) 3610
+			(-10000) 3285        0 2880    10000 2445    20000 1955
+			   30000 1440    40000 1125    50000  840    60000  665
+			   70000  465    80000  350    90000  230   100000  185 >;
+	};
+
 	thermal-zones {
+		battery-thermal {
+			polling-delay-passive = <0>; /* milliseconds */
+			polling-delay = <20000>; /* milliseconds */
+
+			thermal-sensors = <&tbattery>;
+
+			trips {
+				battery-alert {
+					temperature = <55000>;
+					hysteresis = <2000>;
+					type = "hot";
+				};
+
+				battery-crit {
+					temperature = <60000>;
+					hysteresis = <2000>;
+					type = "critical";
+				};
+			};
+		};
+
 		/*
 		 * NCT72 has two sensors:
 		 *
Signature · 1 line
2.51.0
#3 lore raw

PATCH v2 3/4 ARM: tegra: lg-x3: add node for capacitive buttons

In reply to Svyatoslav Ryhel

Both smartphones have capacitive buttons but only P895 supports RMI4 function 1A (0D touch), while P880 exposes buttons area as a region of the touchscreen.

---
 arch/arm/boot/dts/nvidia/tegra30-lg-p895.dts | 6 ++++++
 1 file changed, 6 insertions(+)
arch/arm/boot/dts/nvidia/tegra30-lg-p895.dts +6 -0
index ab8f5cf317bf..414117fd4382 100644
@@ -109,6 +109,12 @@ rmi4-f11@11 {
 				syna,clip-x-high = <1535>;
 				syna,clip-y-high = <2047>;
 			};
+
+			rmi4-f1a@1a {
+				reg = <0x1a>;
+
+				linux,keycodes = <KEY_BACK KEY_HOME KEY_MENU KEY_SEARCH>;
+			};
 		};
 	};
 
Signature · 1 line
2.51.0
#4 lore raw

PATCH v2 4/4 ARM: tegra: lg-x3: complete video device graph

In reply to Svyatoslav Ryhel

Add front and rear camera nodes and interlink them with Tegra CSI and VI. Adjust camera PMIC voltages to better fit requirements and fix the focuser node.

---
 arch/arm/boot/dts/nvidia/tegra30-lg-p880.dts |  28 ++++
 arch/arm/boot/dts/nvidia/tegra30-lg-p895.dts |  46 ++++++
 arch/arm/boot/dts/nvidia/tegra30-lg-x3.dtsi  | 154 +++++++++++++++++--
 3 files changed, 214 insertions(+), 14 deletions(-)
arch/arm/boot/dts/nvidia/tegra30-lg-p880.dts +28 -0
index cc14e6dca770..1b21d7628c8c 100644
@@ -12,6 +12,18 @@ aliases {
 		mmc2 = &sdmmc1; /* WiFi */
 	};
 
+	host1x@50000000 {
+		vi@54080000 {
+			csi@800 {
+				/delete-node/ channel@1;
+			};
+
+			ports {
+				/delete-node/ port@1;
+			};
+		};
+	};
+
 	pinmux@70000868 {
 		pinctrl-names = "default";
 		pinctrl-0 = <&state_default>;
@@ -116,6 +128,22 @@ rmi4-f11@11 {
 		};
 	};
 
+	i2c@7000c500 {
+		camera-pmic@7d {
+			vt_1v2_front: ldo1 {
+				regulator-name = "vt_1v2_dig";
+				regulator-min-microvolt = <1200000>;
+				regulator-max-microvolt = <1200000>;
+			};
+
+			vt_2v7_front: ldo2 {
+				regulator-name = "vt_2v7_vana";
+				regulator-min-microvolt = <2700000>;
+				regulator-max-microvolt = <2700000>;
+			};
+		};
+	};
+
 	spi@7000dc00 {
 		dsi@2 {
 			/*
arch/arm/boot/dts/nvidia/tegra30-lg-p895.dts +46 -0

52 lines not on this page · raw message

arch/arm/boot/dts/nvidia/tegra30-lg-x3.dtsi +140 -14

191 lines not on this page · raw message

Signature · 1 line
2.51.0
#5 lore raw
In reply to Svyatoslav Ryhel

пн, 26 січ. 2026 р. о 12:15 Svyatoslav Ryhel <[email protected]> пише:

Quoted 40 lines

With the recent kernel updates, Tegra30-based LG smartphones now support several additional features, including an RGB-DSI bridge, DSI panels, MUIC, a charger, a battery temperature sensor, OTG mode, and capacitive buttons on the P895. Add required nodes to device trees.

---
Changes in v2:
- fixed dw9714 and tx13d100vm0eaa nodes
- added video device pipes graph

Regarding CHECK_DTBS output in v2:
- nvidia,tegra30-pcie, nvidia,tegra30-gmi, nvidia,tegra30-kbc, nvidia,tegra20-kbc, nvidia,tegra30-ahub are not documented yet
- nvidia,tegra30-vi was adjusted and applied, change did not apper yet
(https://lore.kernel.org/lkml/[email protected]/)
- st,m24c08 appers undocumented though it seems to be different from st,24c08, at least they google as separate devices. atmel,24c08 is not documented, though it is widey used in linux device trees and is supported by driver. Here is one of examples:
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/arch/arm/boot/dts/allwinner/sun7i-a20-linutronix-testbox-v2.dts?h=next-20260123#n33
- onnn,mt9m114 does not have 'orientation' property, though it should include it since it is generic for camera devices
- ti,lp8720 and maxim,max77663 have txt documentation and are not yet converted to DT schema
- backlight in panel nodes was not added since lm3533 has no DT support
- missing '#io-channel-cells' in ti,tsc2007 addressed in
https://lore.kernel.org/lkml/[email protected]/
- missing dsi controller properties of ssd2825 addressed in
https://lore.kernel.org/lkml/[email protected]/
- missing '#io-channel-cells' in generic-adc-thermal was proposed in but rejected
https://lore.kernel.org/lkml/[email protected]/
---

Svyatoslav Ryhel (4):
ARM: tegra: lg-x3: add panel and bridge nodes
ARM: tegra: lg-x3: add USB and power related nodes
ARM: tegra: lg-x3: add node for capacitive buttons
ARM: tegra: lg-x3: complete video device graph

Quoted 5 lines
 arch/arm/boot/dts/nvidia/tegra30-lg-p880.dts |  39 +++
 arch/arm/boot/dts/nvidia/tegra30-lg-p895.dts |  79 +++++
 arch/arm/boot/dts/nvidia/tegra30-lg-x3.dtsi  | 328 ++++++++++++++++++-
 3 files changed, 429 insertions(+), 17 deletions(-)

Hello Thierry!

May these patches be picked if everyone is fine with them?

Best regards,
Svyatoslav R.

Quoted 3 lines

--
2.51.0

maintainer
#6 lore raw
In reply to Svyatoslav Ryhel
Quoted 39 lines · Svyatoslav Ryhel

With the recent kernel updates, Tegra30-based LG smartphones now support several additional features, including an RGB-DSI bridge, DSI panels, MUIC, a charger, a battery temperature sensor, OTG mode, and capacitive buttons on the P895. Add required nodes to device trees.

---
Changes in v2:
- fixed dw9714 and tx13d100vm0eaa nodes
- added video device pipes graph

Regarding CHECK_DTBS output in v2:
- nvidia,tegra30-pcie, nvidia,tegra30-gmi, nvidia,tegra30-kbc, nvidia,tegra20-kbc, nvidia,tegra30-ahub are not documented yet
- nvidia,tegra30-vi was adjusted and applied, change did not apper yet
(https://lore.kernel.org/lkml/[email protected]/)
- st,m24c08 appers undocumented though it seems to be different from st,24c08, at least they google as separate devices. atmel,24c08 is not documented, though it is widey used in linux device trees and is supported by driver. Here is one of examples:
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/arch/arm/boot/dts/allwinner/sun7i-a20-linutronix-testbox-v2.dts?h=next-20260123#n33
- onnn,mt9m114 does not have 'orientation' property, though it should include it since it is generic for camera devices
- ti,lp8720 and maxim,max77663 have txt documentation and are not yet converted to DT schema
- backlight in panel nodes was not added since lm3533 has no DT support
- missing '#io-channel-cells' in ti,tsc2007 addressed in
https://lore.kernel.org/lkml/[email protected]/
- missing dsi controller properties of ssd2825 addressed in
https://lore.kernel.org/lkml/[email protected]/
- missing '#io-channel-cells' in generic-adc-thermal was proposed in but rejected
https://lore.kernel.org/lkml/[email protected]/
---

Svyatoslav Ryhel (4):
ARM: tegra: lg-x3: add panel and bridge nodes
ARM: tegra: lg-x3: add USB and power related nodes
ARM: tegra: lg-x3: add node for capacitive buttons
ARM: tegra: lg-x3: complete video device graph

Quoted 4 lines
 arch/arm/boot/dts/nvidia/tegra30-lg-p880.dts |  39 +++
 arch/arm/boot/dts/nvidia/tegra30-lg-p895.dts |  79 +++++
 arch/arm/boot/dts/nvidia/tegra30-lg-x3.dtsi  | 328 ++++++++++++++++++-
 3 files changed, 429 insertions(+), 17 deletions(-)

Patches 1-3 applied. Patch 4 has checkpatch has checkpatch warnings:

	WARNING: DT compatible string "st,m24c08" appears un-documented -- check ./Documentation/devicetree/bindings/
	#255: FILE: arch/arm/boot/dts/nvidia/tegra30-lg-x3.dtsi:1243:
	+			compatible = "st,m24c08", "atmel,24c08";

So I've left it out for now.

Thierry

#7 lore raw

27 березня 2026 р. 17:05:34 GMT+02:00, Thierry Reding <[email protected]> пише:

Quoted 45 lines · Svyatoslav Ryhel
Quoted 39 lines

With the recent kernel updates, Tegra30-based LG smartphones now support several additional features, including an RGB-DSI bridge, DSI panels, MUIC, a charger, a battery temperature sensor, OTG mode, and capacitive buttons on the P895. Add required nodes to device trees.

---
Changes in v2:
- fixed dw9714 and tx13d100vm0eaa nodes
- added video device pipes graph

Regarding CHECK_DTBS output in v2:
- nvidia,tegra30-pcie, nvidia,tegra30-gmi, nvidia,tegra30-kbc, nvidia,tegra20-kbc, nvidia,tegra30-ahub are not documented yet
- nvidia,tegra30-vi was adjusted and applied, change did not apper yet
(https://lore.kernel.org/lkml/[email protected]/)
- st,m24c08 appers undocumented though it seems to be different from st,24c08, at least they google as separate devices. atmel,24c08 is not documented, though it is widey used in linux device trees and is supported by driver. Here is one of examples:
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/arch/arm/boot/dts/allwinner/sun7i-a20-linutronix-testbox-v2.dts?h=next-20260123#n33
- onnn,mt9m114 does not have 'orientation' property, though it should include it since it is generic for camera devices
- ti,lp8720 and maxim,max77663 have txt documentation and are not yet converted to DT schema
- backlight in panel nodes was not added since lm3533 has no DT support
- missing '#io-channel-cells' in ti,tsc2007 addressed in
https://lore.kernel.org/lkml/[email protected]/
- missing dsi controller properties of ssd2825 addressed in
https://lore.kernel.org/lkml/[email protected]/
- missing '#io-channel-cells' in generic-adc-thermal was proposed in but rejected
https://lore.kernel.org/lkml/[email protected]/
---

Svyatoslav Ryhel (4):
ARM: tegra: lg-x3: add panel and bridge nodes
ARM: tegra: lg-x3: add USB and power related nodes
ARM: tegra: lg-x3: add node for capacitive buttons
ARM: tegra: lg-x3: complete video device graph

Quoted 4 lines
 arch/arm/boot/dts/nvidia/tegra30-lg-p880.dts |  39 +++
 arch/arm/boot/dts/nvidia/tegra30-lg-p895.dts |  79 +++++
 arch/arm/boot/dts/nvidia/tegra30-lg-x3.dtsi  | 328 ++++++++++++++++++-
 3 files changed, 429 insertions(+), 17 deletions(-)
Quoted 8 lines

Patches 1-3 applied. Patch 4 has checkpatch has checkpatch warnings:

	WARNING: DT compatible string "st,m24c08" appears un-documented -- check ./Documentation/devicetree/bindings/
	#255: FILE: arch/arm/boot/dts/nvidia/tegra30-lg-x3.dtsi:1243:
	+			compatible = "st,m24c08", "atmel,24c08";

So I've left it out for now.

st,m24c08 appers undocumented though it seems to be different from st,24c08 (in schema) at least they google as separate devices. atmel,24c08 is not documented, though it is widey used in linux device trees and is supported by driver. Here is one of examples:
  https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/arch/arm/boot/dts/allwinner/sun7i-a20-linutronix-testbox-v2.dts?h=next-20260123#n33

I assume patch 4 should be fine and most likely schema needs to be adjusted to cover this compatible (since it exists and is used).

Quoted 1 line

Thierry