Skip to contentSkip to conversation

arm64: tegra: Tegra194 device-tree updates

PATCH Applied Jon Hunter 2 participants 5 messages Feb 20, 2024 – Feb 21, 2024

Subsystems (2)
lore
Share & tools
lore

Jon Hunter

author maintainer
#0 lore raw

v2 cover arm64: tegra: Tegra194 device-tree updates

Add the current monitors for Jetson Xavier based devices and enable USB device support for Jetson AGX Xavier.

Changes since V1:
- Used generic name 'power-sensor' for current monitors

Jon Hunter (3):
arm64: tegra: Add current monitors for Jetson Xavier
arm64: tegra: Add USB device support for Jetson AGX Xavier
arm64: tegra: Add USB Type-C controller for Jetson AGX Xavier

 .../arm64/boot/dts/nvidia/tegra194-p2888.dtsi | 50 ++++++++++++++++++
 .../boot/dts/nvidia/tegra194-p2972-0000.dts   | 51 ++++++++++++++++++-
 .../arm64/boot/dts/nvidia/tegra194-p3668.dtsi | 27 ++++++++++
 3 files changed, 127 insertions(+), 1 deletion(-)
Signature · 1 line
2.34.1
author maintainer
#1 lore raw

PATCH v2 1/3 arm64: tegra: Add current monitors for Jetson Xavier

Add the INA3221 current monitors that are present on the Jetson AGX Xavier and Jetson Xavier NX boards.

---
 .../arm64/boot/dts/nvidia/tegra194-p2888.dtsi | 50 +++++++++++++++++++
 .../arm64/boot/dts/nvidia/tegra194-p3668.dtsi | 27 ++++++++++
 2 files changed, 77 insertions(+)
arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi +50 -0
index 5b59c1986e9b..e8b296d9e0d3 100644
@@ -53,6 +53,56 @@ memory-controller@2c00000 {
 			status = "okay";
 		};
 
+		i2c@c240000 {
+			status = "okay";
+
+			power-sensor@40 {
+				compatible = "ti,ina3221";
+				reg = <0x40>;
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				input@0 {
+					reg = <0x0>;
+					label = "GPU";
+					shunt-resistor-micro-ohms = <5000>;
+				};
+				input@1 {
+					reg = <0x1>;
+					label = "CPU";
+					shunt-resistor-micro-ohms = <5000>;
+				};
+				input@2 {
+					reg = <0x2>;
+					label = "SOC";
+					shunt-resistor-micro-ohms = <5000>;
+				};
+			};
+
+			power-sensor@41 {
+				compatible = "ti,ina3221";
+				reg = <0x41>;
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				input@0 {
+					reg = <0x0>;
+					label = "CV";
+					shunt-resistor-micro-ohms = <5000>;
+				};
+				input@1 {
+					reg = <0x1>;
+					label = "VDDRQ";
+					shunt-resistor-micro-ohms = <5000>;
+				};
+				input@2 {
+					reg = <0x2>;
+					label = "SYS5V";
+					shunt-resistor-micro-ohms = <5000>;
+				};
+			};
+		};
+
 		serial@3110000 {
 			status = "okay";
 		};
arch/arm64/boot/dts/nvidia/tegra194-p3668.dtsi +27 -0
index 58f190b0f868..59860d19f0f6 100644
@@ -50,6 +50,33 @@ memory-controller@2c00000 {
 			status = "okay";
 		};
 
+		i2c@c250000 {
+			status = "okay";
+
+			power-sensor@40 {
+				compatible = "ti,ina3221";
+				reg = <0x40>;
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				input@0 {
+					reg = <0x0>;
+					label = "VDD_IN";
+					shunt-resistor-micro-ohms = <5000>;
+				};
+				input@1 {
+					reg = <0x1>;
+					label = "VDD_CPU_GPU_CV";
+					shunt-resistor-micro-ohms = <5000>;
+				};
+				input@2 {
+					reg = <0x2>;
+					label = "VDD_SOC";
+					shunt-resistor-micro-ohms = <5000>;
+				};
+			};
+		};
+
 		serial@3100000 {
 			status = "okay";
 		};
Signature · 1 line
2.34.1
author maintainer
#3 lore raw

PATCH v2 3/3 arm64: tegra: Add USB Type-C controller for Jetson AGX Xavier

In reply to Jon Hunter

Populate the Cypress USB Type-C controller for Tegra194 Jetson AGX Xavier board.

---
 .../boot/dts/nvidia/tegra194-p2972-0000.dts   | 43 ++++++++++++++++++-
 1 file changed, 42 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/nvidia/tegra194-p2972-0000.dts +42 -1
index 63d6cca542f7..c32876699a43 100644
@@ -2062,8 +2062,15 @@ usb3-3 {
 
 			ports {
 				usb2-0 {
-					mode = "host";
+					mode = "otg";
+					usb-role-switch;
 					status = "okay";
+
+					port {
+						hs_typec_p0: endpoint {
+							remote-endpoint = <&hs_ucsi_ccg_p0>;
+						};
+					};
 				};
 
 				usb2-1 {
@@ -2114,6 +2121,40 @@ usb@3610000 {
 			phy-names = "usb2-0", "usb2-1", "usb2-3", "usb3-0", "usb3-2", "usb3-3";
 		};
 
+		i2c@c240000 {
+			typec@8 {
+				compatible = "cypress,cypd4226";
+				reg = <0x08>;
+				interrupt-parent = <&gpio_aon>;
+				interrupts = <TEGRA194_AON_GPIO(BB, 2) IRQ_TYPE_LEVEL_LOW>;
+				firmware-name = "nvidia,jetson-agx-xavier";
+				status = "okay";
+
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				ccg_typec_con0: connector@0 {
+					compatible = "usb-c-connector";
+					reg = <0>;
+					label = "USB-C";
+					data-role = "dual";
+
+					ports {
+						#address-cells = <1>;
+						#size-cells = <0>;
+
+						port@0 {
+							reg = <0>;
+
+							hs_ucsi_ccg_p0: endpoint {
+								remote-endpoint = <&hs_typec_p0>;
+							};
+						};
+					};
+				};
+			};
+		};
+
 		i2c@c250000 {
 			status = "okay";
 
Signature · 1 line
2.34.1
author maintainer
#2 lore raw

PATCH v2 2/3 arm64: tegra: Add USB device support for Jetson AGX Xavier

In reply to Jon Hunter

Enable the USB device support for the Jetson AGX Xavier platform.

---
 arch/arm64/boot/dts/nvidia/tegra194-p2972-0000.dts | 8 ++++++++
 1 file changed, 8 insertions(+)
arch/arm64/boot/dts/nvidia/tegra194-p2972-0000.dts +8 -0
index 64a3398fe7a6..63d6cca542f7 100644
@@ -2094,6 +2094,14 @@ usb3-3 {
 			};
 		};
 
+		usb@3550000 {
+			status = "okay";
+
+			phys = <&{/bus@0/padctl@3520000/pads/usb2/lanes/usb2-0}>,
+			       <&{/bus@0/padctl@3520000/pads/usb3/lanes/usb3-2}>;
+			phy-names = "usb2-0", "usb3-0";
+		};
+
 		usb@3610000 {
 			status = "okay";
 
Signature · 1 line
2.34.1
#4 lore raw
In reply to Jon Hunter

From: Thierry Reding <[email protected]>

Quoted 6 lines · Jon Hunter

Add the current monitors for Jetson Xavier based devices and enable USB device support for Jetson AGX Xavier.

Changes since V1:
- Used generic name 'power-sensor' for current monitors

Quoted 6 lines

Jon Hunter (3):
arm64: tegra: Add current monitors for Jetson Xavier
arm64: tegra: Add USB device support for Jetson AGX Xavier
arm64: tegra: Add USB Type-C controller for Jetson AGX Xavier

[...]

Applied, thanks!

[1/3] arm64: tegra: Add current monitors for Jetson Xavier

      commit: 525684a0b8ae14389ce440f843ade4023cc64834
[2/3] arm64: tegra: Add USB device support for Jetson AGX Xavier
      commit: 4772ac35937a3d91d8695670e11dd5b06692b2f4
[3/3] arm64: tegra: Add USB Type-C controller for Jetson AGX Xavier
      commit: c707794bc3f31d9c56efe9967b1631ce7d44ab26

Best regards,

Signature · 1 line
Thierry Reding <[email protected]>