From: Svyatoslav Ryhel <clamor95@gmail.com>
To: "Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Thierry Reding" <thierry.reding@gmail.com>,
"Thierry Reding" <treding@nvidia.com>,
"Jonathan Hunter" <jonathanh@nvidia.com>,
"Svyatoslav Ryhel" <clamor95@gmail.com>,
"Jonas Schwöbel" <jonasschwoebel@yahoo.de>
Cc: devicetree@vger.kernel.org, linux-tegra@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH v1 2/3] ARM: tegra: lg-x3: add USB and power related nodes
Date: Thu, 22 Jan 2026 17:27:12 +0200 [thread overview]
Message-ID: <20260122152713.8311-3-clamor95@gmail.com> (raw)
In-Reply-To: <20260122152713.8311-1-clamor95@gmail.com>
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.
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
---
arch/arm/boot/dts/nvidia/tegra30-lg-x3.dtsi | 93 ++++++++++++++++++++-
1 file changed, 91 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boot/dts/nvidia/tegra30-lg-x3.dtsi b/arch/arm/boot/dts/nvidia/tegra30-lg-x3.dtsi
index d71d1d6694f8..25c238562b9a 100644
--- a/arch/arm/boot/dts/nvidia/tegra30-lg-x3.dtsi
+++ b/arch/arm/boot/dts/nvidia/tegra30-lg-x3.dtsi
@@ -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:
*
--
2.51.0
next prev parent reply other threads:[~2026-01-22 15:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-22 15:27 [PATCH v1 0/3] ARM: tegra: lg-x3: add missing nodes Svyatoslav Ryhel
2026-01-22 15:27 ` [PATCH v1 1/3] ARM: tegra: lg-x3: add panel and bridge nodes Svyatoslav Ryhel
2026-01-22 15:27 ` Svyatoslav Ryhel [this message]
2026-01-22 15:27 ` [PATCH v1 3/3] ARM: tegra: lg-x3: add node for capacitive buttons Svyatoslav Ryhel
2026-01-22 18:07 ` [PATCH v1 0/3] ARM: tegra: lg-x3: add missing nodes Rob Herring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260122152713.8311-3-clamor95@gmail.com \
--to=clamor95@gmail.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jonasschwoebel@yahoo.de \
--cc=jonathanh@nvidia.com \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=robh@kernel.org \
--cc=thierry.reding@gmail.com \
--cc=treding@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®