Skip to contentSkip to conversation

arm64: tegra: Enable hda node for P3737 + P3701

PATCH In review Mohan Kumar 3 participants 7 messages Mar 25, 2022 – Apr 11, 2022

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

PATCH 1/1 arm64: tegra: Enable hda node for P3737 + P3701

Add iommus property for hda and enable the node for P3737 + P3701 platform.

---
 arch/arm64/boot/dts/nvidia/tegra234-p3737-0000+p3701-0000.dts | 1 +
 arch/arm64/boot/dts/nvidia/tegra234.dtsi                      | 1 +
 2 files changed, 2 insertions(+)
arch/arm64/boot/dts/nvidia/tegra234-p3737-0000+p3701-0000.dts +1 -0
index 34d6a01ee1c6..156d5d95fde7 100644
@@ -1751,6 +1751,7 @@
 
 		hda@3510000 {
 			nvidia,model = "NVIDIA Jetson AGX Orin HDA";
+			status = "okay";
 		};
 	};
 
arch/arm64/boot/dts/nvidia/tegra234.dtsi +1 -0
index aaace605bdaa..704c50c24654 100644
@@ -709,6 +709,7 @@
 			interconnects = <&mc TEGRA234_MEMORY_CLIENT_HDAR &emc>,
 					<&mc TEGRA234_MEMORY_CLIENT_HDAW &emc>;
 			interconnect-names = "dma-mem", "write";
+			iommus = <&smmu_niso0 TEGRA234_SID_HDA>;
 			status = "disabled";
 		};
 
Signature · 1 line
2.17.1
#1 lore raw
Quoted 14 lines · Mohan Kumar

Add iommus property for hda and enable the node for P3737 + P3701 platform.

---
 arch/arm64/boot/dts/nvidia/tegra234-p3737-0000+p3701-0000.dts | 1 +
 arch/arm64/boot/dts/nvidia/tegra234.dtsi                      | 1 +
 2 files changed, 2 insertions(+)
arch/arm64/boot/dts/nvidia/tegra234-p3737-0000+p3701-0000.dts +0 -0
index 34d6a01ee1c6..156d5d95fde7 100644

arch/arm64/boot/dts/nvidia/tegra234-p3737-0000+p3701-0000.dts line 1754

Quoted 4 lines
arch/arm64/boot/dts/nvidia/tegra234-p3737-0000+p3701-0000.dts +1 -0
@@ -1751,6 +1751,7 @@
 
 		hda@3510000 {
 			nvidia,model = "NVIDIA Jetson AGX Orin HDA";
+			status = "okay";

Nodes are enabled by default. Why do you need this?

Best regards,
Krzysztof

#2 lore raw
Quoted 19 lines · Krzysztof Kozlowski

External email: Use caution opening links or attachments

Quoted 15 lines · Mohan Kumar

Add iommus property for hda and enable the node for P3737 + P3701 platform.

---
  arch/arm64/boot/dts/nvidia/tegra234-p3737-0000+p3701-0000.dts | 1 +
  arch/arm64/boot/dts/nvidia/tegra234.dtsi                      | 1 +
  2 files changed, 2 insertions(+)
arch/arm64/boot/dts/nvidia/tegra234-p3737-0000+p3701-0000.dts +0 -0
index 34d6a01ee1c6..156d5d95fde7 100644
@@ -1751,6 +1751,7 @@
 
Quoted 4 lines

arch/arm64/boot/dts/nvidia/tegra234-p3737-0000+p3701-0000.dts line 1754

Quoted 3 lines
arch/arm64/boot/dts/nvidia/tegra234-p3737-0000+p3701-0000.dts +1 -0
               hda@3510000 {
                       nvidia,model = "NVIDIA Jetson AGX Orin HDA";
+                     status = "okay";

Nodes are enabled by default. Why do you need this?

hda node status is set to "disabled" by default in soc dts file tegra234.dtsi. The enable is controlled by platform specific dts files.

Quoted 4 lines

Best regards,
Krzysztof

#3 lore raw
Quoted 21 lines · Mohan Kumar D
Quoted 19 lines · Krzysztof Kozlowski

External email: Use caution opening links or attachments

Quoted 15 lines · Mohan Kumar

Add iommus property for hda and enable the node for P3737 + P3701 platform.

---
  arch/arm64/boot/dts/nvidia/tegra234-p3737-0000+p3701-0000.dts | 1 +
  arch/arm64/boot/dts/nvidia/tegra234.dtsi                      | 1 +
  2 files changed, 2 insertions(+)
arch/arm64/boot/dts/nvidia/tegra234-p3737-0000+p3701-0000.dts +0 -0
index 34d6a01ee1c6..156d5d95fde7 100644
@@ -1751,6 +1751,7 @@
 
Quoted 6 lines
Quoted 4 lines

arch/arm64/boot/dts/nvidia/tegra234-p3737-0000+p3701-0000.dts line 1754

Quoted 3 lines
arch/arm64/boot/dts/nvidia/tegra234-p3737-0000+p3701-0000.dts +1 -0
               hda@3510000 {
                       nvidia,model = "NVIDIA Jetson AGX Orin HDA";
+                     status = "okay";

Nodes are enabled by default. Why do you need this?

hda node status is set to "disabled" by default in soc dts file tegra234.dtsi. The enable is controlled by platform specific dts files.

Oh, surprise... why do you override nodes with full path? This is error-prone and makes any changes (like node name fixing) difficult. This should be overridden by label.

Best regards,
Krzysztof

#4 lore raw
Quoted 28 lines · Krzysztof Kozlowski

External email: Use caution opening links or attachments

Quoted 24 lines · Mohan Kumar D
Quoted 23 lines · Krzysztof Kozlowski

External email: Use caution opening links or attachments

Quoted 14 lines · Mohan Kumar

Add iommus property for hda and enable the node for P3737 + P3701 platform.

---
   arch/arm64/boot/dts/nvidia/tegra234-p3737-0000+p3701-0000.dts | 1 +
   arch/arm64/boot/dts/nvidia/tegra234.dtsi                      | 1 +
   2 files changed, 2 insertions(+)
arch/arm64/boot/dts/nvidia/tegra234-p3737-0000+p3701-0000.dts +0 -0
index 34d6a01ee1c6..156d5d95fde7 100644

arch/arm64/boot/dts/nvidia/tegra234-p3737-0000+p3701-0000.dts line 1754

Quoted 4 lines
arch/arm64/boot/dts/nvidia/tegra234-p3737-0000+p3701-0000.dts +1 -0
@@ -1751,6 +1751,7 @@
 
                hda@3510000 {
                        nvidia,model = "NVIDIA Jetson AGX Orin HDA";
+                     status = "okay";

Nodes are enabled by default. Why do you need this?

Quoted 5 lines
Quoted 2 lines

hda node status is set to "disabled" by default in soc dts file tegra234.dtsi. The enable is controlled by platform specific dts files.

Oh, surprise... why do you override nodes with full path? This is error-prone and makes any changes (like node name fixing) difficult. This should be overridden by label.

   I see similar method is followed for earlier boards too for hda and other nodes. As chance of changing the node name is most unlikely due to node name is closely tied to HW base address for a given chip. If still there is a concern will fix with label in next patch.

Quoted 4 lines

Best regards,
Krzysztof

#5 lore raw
In reply to Krzysztof Kozlowski
Quoted 26 lines · Krzysztof Kozlowski
Quoted 25 lines · Mohan Kumar D
Quoted 23 lines · Krzysztof Kozlowski

External email: Use caution opening links or attachments

Quoted 14 lines · Mohan Kumar

Add iommus property for hda and enable the node for P3737 + P3701 platform.

---
  arch/arm64/boot/dts/nvidia/tegra234-p3737-0000+p3701-0000.dts | 1 +
  arch/arm64/boot/dts/nvidia/tegra234.dtsi                      | 1 +
  2 files changed, 2 insertions(+)
arch/arm64/boot/dts/nvidia/tegra234-p3737-0000+p3701-0000.dts +0 -0
index 34d6a01ee1c6..156d5d95fde7 100644

arch/arm64/boot/dts/nvidia/tegra234-p3737-0000+p3701-0000.dts line 1754

Quoted 4 lines
arch/arm64/boot/dts/nvidia/tegra234-p3737-0000+p3701-0000.dts +1 -0
@@ -1751,6 +1751,7 @@
 
               hda@3510000 {
                       nvidia,model = "NVIDIA Jetson AGX Orin HDA";
+                     status = "okay";

Nodes are enabled by default. Why do you need this?

Quoted 6 lines
Quoted 2 lines

hda node status is set to "disabled" by default in soc dts file tegra234.dtsi. The enable is controlled by platform specific dts files.

Oh, surprise... why do you override nodes with full path? This is error-prone and makes any changes (like node name fixing) difficult. This should be overridden by label.

I disagree, though I admit that this is probably very subjective. In my experience label references lead to completely unreadable DTS files. We've had bad experiences with these kinds of references early on, so at some point we decided to discontinue that method on Tegra.

Reflecting the tree hierarchy in board-level DTS files on the other hand makes it very clear what you're changing and keeps the board-level DTS quite readable.

Fixing node names hasn't been a big problem for us and any potential remaining issues are entirely gone now that we can validate DTS files using dt-schema.

Thierry

#6 lore raw

Thierry,
Thanks for your explanation.

Krzysztof,
Let me know if you still have any concern on the current patch.

-----Original Message-----
From: Thierry Reding <[email protected]>
Sent: Wednesday, March 30, 2022 4:18 PM
To: Krzysztof Kozlowski <[email protected]>
Cc: Mohan Kumar D <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; Jonathan Hunter <[email protected]>
Subject: Re: [PATCH] arm64: tegra: Enable hda node for P3737 + P3701

Quoted 31 lines · Krzysztof Kozlowski
Quoted 30 lines · Mohan Kumar D
Quoted 28 lines · Krzysztof Kozlowski

External email: Use caution opening links or attachments

Quoted 18 lines · Mohan Kumar

Add iommus property for hda and enable the node for P3737 + P3701 platform.

---
  arch/arm64/boot/dts/nvidia/tegra234-p3737-0000+p3701-0000.dts | 1 +
  arch/arm64/boot/dts/nvidia/tegra234.dtsi                      | 1 +
  2 files changed, 2 insertions(+)
(quoted diff) +0 -0

a/arch/arm64/boot/dts/nvidia/tegra234-p3737-0000+p3701-0000.dts b/arch/arm64/boot/dts/nvidia/tegra234-p3737-0000+p3701-0000.dts index 34d6a01ee1c6..156d5d95fde7 100644
---
a/arch/arm64/boot/dts/nvidia/tegra234-p3737-0000+p3701-0000.dts +++ b/arch/arm64/boot/dts/nvidia/tegra234-p3737-0000+p3701-0000.dt +++ s

arch/arm64/boot/dts/nvidia/tegra234-p3737-0000+p3701-0000.dts line 1755

Quoted 5 lines
arch/arm64/boot/dts/nvidia/tegra234-p3737-0000+p3701-0000.dts +1 -0
@@ -1751,6 +1751,7 @@
 
               hda@3510000 {
                       nvidia,model = "NVIDIA Jetson AGX Orin 
 HDA";
+                     status = "okay";

Nodes are enabled by default. Why do you need this?

Quoted 6 lines
Quoted 2 lines

hda node status is set to "disabled" by default in soc dts file tegra234.dtsi. The enable is controlled by platform specific dts files.

Oh, surprise... why do you override nodes with full path? This is error-prone and makes any changes (like node name fixing) difficult. This should be overridden by label.

I disagree, though I admit that this is probably very subjective. In my experience label references lead to completely unreadable DTS files. We've had bad experiences with these kinds of references early on, so at some point we decided to discontinue that method on Tegra.

Reflecting the tree hierarchy in board-level DTS files on the other hand makes it very clear what you're changing and keeps the board-level DTS quite readable.

Fixing node names hasn't been a big problem for us and any potential remaining issues are entirely gone now that we can validate DTS files using dt-schema.

Thierry