Skip to contentSkip to conversation

arm64: tegra: Tegra194 device-tree updates

PATCH Superseded Jon Hunter 2 participants 6 messages Feb 16, 2024 – Feb 19, 2024

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Jon Hunter

author maintainer
#0 lore raw

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.

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 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..7c57272af044 100644
@@ -53,6 +53,56 @@ memory-controller@2c00000 {
 			status = "okay";
 		};
 
+		i2c@c240000 {
+			status = "okay";
+
+			ina3221@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>;
+				};
+			};
+
+			ina3221@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..6f5e9d114e2a 100644
@@ -50,6 +50,33 @@ memory-controller@2c00000 {
 			status = "okay";
 		};
 
+		i2c@c250000 {
+			status = "okay";
+
+			ina3221@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
#2 lore raw

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

Quoted 14 lines · Jon Hunter

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 +0 -0
index 5b59c1986e9b..7c57272af044 100644

arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi memory-controller@2c00000 { · line 59

Quoted 7 lines
arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi +4 -0
@@ -53,6 +53,56 @@ memory-controller@2c00000 {
 			status = "okay";
 		};
 
+		i2c@c240000 {
+			status = "okay";
+
+			ina3221@40 {

power-sensor@

Node names should be generic. See also an explanation and list of examples (not exhaustive) in DT specification:
https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation

Best regards,
Krzysztof

author maintainer
#3 lore raw

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

Quoted 26 lines · Krzysztof Kozlowski
Quoted 14 lines · Jon Hunter

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 +0 -0
index 5b59c1986e9b..7c57272af044 100644

arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi memory-controller@2c00000 { · line 59

Quoted 7 lines
arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi +4 -0
@@ -53,6 +53,56 @@ memory-controller@2c00000 {
  			status = "okay";
  		};
 
+		i2c@c240000 {
+			status = "okay";
+
+			ina3221@40 {

power-sensor@

Quoted 3 lines

Node names should be generic. See also an explanation and list of examples (not exhaustive) in DT specification:
https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation

I will correct this.

Thanks
Jon

Signature · 1 line
nvpublic
author maintainer
#4 lore raw

PATCH 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
author maintainer
#5 lore raw

PATCH 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