Skip to contentSkip to conversation

dt-bindings: pwm: tegra: Document Tegra234 pwm binding

PATCH Superseded Sandipan Patra 2 participants 7 messages Sep 9, 2022 – Sep 13, 2022

Subsystems (3)

v1 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dt-bindings: pwm: tegra: Document Tegra234 pwm binding

The PWM controller blocks are identical to ones found on the Tegra194 SoC. No driver changes are required and compatible string "nvidia,tegra194-pwm" will be used as a fallback.

---
V4: Mention fallback compatible

 Documentation/devicetree/bindings/pwm/nvidia,tegra20-pwm.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/pwm/nvidia,tegra20-pwm.txt +1 -1
index 74c41e34c3b6..331c1e66e8fa 100644
@@ -9,7 +9,7 @@ Required properties:
   - "nvidia,tegra132-pwm", "nvidia,tegra20-pwm": for Tegra132
   - "nvidia,tegra210-pwm", "nvidia,tegra20-pwm": for Tegra210
   - "nvidia,tegra186-pwm": for Tegra186
-  - "nvidia,tegra194-pwm": for Tegra194
+  - "nvidia,tegra194-pwm": for Tegra194, Tegra234
 - reg: physical base address and length of the controller's registers
 - #pwm-cells: should be 2. See pwm.yaml in this directory for a description of
   the cells format.
Signature · 1 line
2.17.1
#1 lore raw

PATCH 2/3 arm64: tegra: Add PWM controllers on Tegra234

Tegra234 has eight single-channel PWM controllers, one of them in the AON block.

---
V3: Update binding doc and fix compatible property.

 arch/arm64/boot/dts/nvidia/tegra234.dtsi | 80 +++++++++++++++++++++++-
 1 file changed, 78 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/nvidia/tegra234.dtsi +78 -2
index 81a0f599685f..d77ee9d81fb2 100644
@@ -829,8 +829,7 @@
 		};
 
 		pwm1: pwm@3280000 {
-			compatible = "nvidia,tegra194-pwm",
-				     "nvidia,tegra186-pwm";
+			compatible = "nvidia,tegra194-pwm";
 			reg = <0x3280000 0x10000>;
 			clocks = <&bpmp TEGRA234_CLK_PWM1>;
 			clock-names = "pwm";
@@ -840,6 +839,83 @@
 			#pwm-cells = <2>;
 		};
 
+		pwm2: pwm@3290000 {
+			compatible = "nvidia,tegra194-pwm";
+			reg = <0x3290000 0x10000>;
+			clocks = <&bpmp TEGRA234_CLK_PWM2>;
+			clock-names = "pwm";
+			resets = <&bpmp TEGRA234_RESET_PWM2>;
+			reset-names = "pwm";
+			status = "disabled";
+			#pwm-cells = <2>;
+		};
+
+		pwm3: pwm@32a0000 {
+			compatible = "nvidia,tegra194-pwm";
+			reg = <0x32a0000 0x10000>;
+			clocks = <&bpmp TEGRA234_CLK_PWM3>;
+			clock-names = "pwm";
+			resets = <&bpmp TEGRA234_RESET_PWM3>;
+			reset-names = "pwm";
+			status = "disabled";
+			#pwm-cells = <2>;
+		};
+
+		pwm4: pwm@c340000 {
+			compatible = "nvidia,tegra194-pwm";
+			reg = <0xc340000 0x10000>;
+			clocks = <&bpmp TEGRA234_CLK_PWM4>;
+			clock-names = "pwm";
+			resets = <&bpmp TEGRA234_RESET_PWM4>;
+			reset-names = "pwm";
+			status = "disabled";
+			#pwm-cells = <2>;
+		};
+
+		pwm5: pwm@32c0000 {
+			compatible = "nvidia,tegra194-pwm";
+			reg = <0x32c0000 0x10000>;
+			clocks = <&bpmp TEGRA234_CLK_PWM5>;
+			clock-names = "pwm";
+			resets = <&bpmp TEGRA234_RESET_PWM5>;
+			reset-names = "pwm";
+			status = "disabled";
+			#pwm-cells = <2>;
+		};
+
+		pwm6: pwm@32d0000 {
+			compatible = "nvidia,tegra194-pwm";
+			reg = <0x32d0000 0x10000>;
+			clocks = <&bpmp TEGRA234_CLK_PWM6>;
+			clock-names = "pwm";
+			resets = <&bpmp TEGRA234_RESET_PWM6>;
+			reset-names = "pwm";
+			status = "disabled";
+			#pwm-cells = <2>;
+		};
+
+		pwm7: pwm@32e0000 {
+			compatible = "nvidia,tegra194-pwm";
+			reg = <0x32e0000 0x10000>;
+			clocks = <&bpmp TEGRA234_CLK_PWM7>;
+			clock-names = "pwm";
+			resets = <&bpmp TEGRA234_RESET_PWM7>;
+			reset-names = "pwm";
+			status = "disabled";
+			#pwm-cells = <2>;
+		};
+
+		pwm8: pwm@32f0000 {
+			compatible = "nvidia,tegra194-pwm";
+			reg = <0x32f0000 0x10000>;
+			clocks = <&bpmp TEGRA234_CLK_PWM8>;
+			clock-names = "pwm";
+			resets = <&bpmp TEGRA234_RESET_PWM8>;
+			reset-names = "pwm";
+			status = "disabled";
+			#pwm-cells = <2>;
+		};
+
 		spi@3300000 {
 			compatible = "nvidia,tegra234-qspi";
 			reg = <0x3300000 0x1000>;
Signature · 1 line
2.17.1
#2 lore raw

Re: [PATCH 2/3] arm64: tegra: Add PWM controllers on Tegra234

Quoted 15 lines · Sandipan Patra

Tegra234 has eight single-channel PWM controllers, one of them in the AON block.

---
V3: Update binding doc and fix compatible property.

 arch/arm64/boot/dts/nvidia/tegra234.dtsi | 80 +++++++++++++++++++++++-
 1 file changed, 78 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/nvidia/tegra234.dtsi +0 -0
index 81a0f599685f..d77ee9d81fb2 100644

arch/arm64/boot/dts/nvidia/tegra234.dtsi line 832

Quoted 6 lines
arch/arm64/boot/dts/nvidia/tegra234.dtsi +1 -2
@@ -829,8 +829,7 @@
 		};
 
 		pwm1: pwm@3280000 {
-			compatible = "nvidia,tegra194-pwm",
-				     "nvidia,tegra186-pwm";
+			compatible = "nvidia,tegra194-pwm";

Where is the fallback?

Best regards,
Krzysztof

#3 lore raw

Re: [PATCH 2/3] arm64: tegra: Add PWM controllers on Tegra234

Quoted 18 lines · Krzysztof Kozlowski
Quoted 17 lines · Sandipan Patra

Tegra234 has eight single-channel PWM controllers, one of them in the AON block.

---
V3: Update binding doc and fix compatible property.

 arch/arm64/boot/dts/nvidia/tegra234.dtsi | 80 +++++++++++++++++++++++-
 1 file changed, 78 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/nvidia/tegra234.dtsi +0 -0
index 81a0f599685f..d77ee9d81fb2 100644
@@ -829,8 +829,7 @@
 		};
 
Quoted 6 lines

arch/arm64/boot/dts/nvidia/tegra234.dtsi line 832

Quoted 4 lines
arch/arm64/boot/dts/nvidia/tegra234.dtsi +1 -2
 		pwm1: pwm@3280000 {
-			compatible = "nvidia,tegra194-pwm",
-				     "nvidia,tegra186-pwm";
+			compatible = "nvidia,tegra194-pwm";

Where is the fallback?

Wait, other way around. Fallback is here, but where is the Tegra234 compatible?

Best regards,
Krzysztof

#4 lore raw

PATCH 3/3 arm64: tegra: Add user PWM support on Jetson Orin

In reply to Sandipan Patra

Enable in device tree and use it to drive the PWM controllers on 40 pin header of Orin dev-kit.

---
V2: Overriding by node label instead of node path.

 arch/arm64/boot/dts/nvidia/tegra234-p3737-0000.dtsi | 12 ++++++++++++
 1 file changed, 12 insertions(+)
arch/arm64/boot/dts/nvidia/tegra234-p3737-0000.dtsi +12 -0
index a85993c85e45..5108013a18c6 100644
@@ -3,3 +3,15 @@
 / {
 	compatible = "nvidia,p3737-0000";
 };
+
+&pwm1 {
+	status = "okay";
+};
+
+&pwm5 {
+	status = "okay";
+};
+
+&pwm8 {
+	status = "okay";
+};
Signature · 1 line
2.17.1
#5 lore raw
In reply to Sandipan Patra
Quoted 7 lines · Sandipan Patra

The PWM controller blocks are identical to ones found on the Tegra194 SoC. No driver changes are required and compatible string "nvidia,tegra194-pwm" will be used as a fallback.

---
V4: Mention fallback compatible

The patch is not titled v4.

Quoted 9 lines
 Documentation/devicetree/bindings/pwm/nvidia,tegra20-pwm.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/pwm/nvidia,tegra20-pwm.txt +0 -0
index 74c41e34c3b6..331c1e66e8fa 100644

Documentation/devicetree/bindings/pwm/nvidia,tegra20-pwm.txt Required properties: · line 12

Quoted 5 lines
Documentation/devicetree/bindings/pwm/nvidia,tegra20-pwm.txt +1 -1
@@ -9,7 +9,7 @@ Required properties:
   - "nvidia,tegra132-pwm", "nvidia,tegra20-pwm": for Tegra132
   - "nvidia,tegra210-pwm", "nvidia,tegra20-pwm": for Tegra210
   - "nvidia,tegra186-pwm": for Tegra186
-  - "nvidia,tegra194-pwm": for Tegra194
+  - "nvidia,tegra194-pwm": for Tegra194, Tegra234

No differences here. You sent something old...

Best regards,
Krzysztof

#6 lore raw
Quoted 22 lines

-----Original Message-----
From: Krzysztof Kozlowski <[email protected]>
Sent: Friday, September 9, 2022 10:09 PM
To: Sandipan Patra <[email protected]>; [email protected]; Jonathan Hunter <[email protected]>; [email protected]; [email protected]; [email protected]; linux- [email protected]; [email protected]
Cc: Bibek Basu <[email protected]>; Krishna Yarlagadda <[email protected]>
Subject: Re: [PATCH] dt-bindings: pwm: tegra: Document Tegra234 pwm binding

External email: Use caution opening links or attachments

Quoted 4 lines · Sandipan Patra

The PWM controller blocks are identical to ones found on the Tegra194 SoC. No driver changes are required and compatible string "nvidia,tegra194-pwm" will be used as a fallback.

Quoted 5 lines
Quoted 3 lines

---
V4: Mention fallback compatible

The patch is not titled v4.

This was my mistake. Will update in next patch.

Quoted 5 lines
Quoted 5 lines

 Documentation/devicetree/bindings/pwm/nvidia,tegra20-pwm.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 14 lines

Documentation/devicetree/bindings/pwm/nvidia,tegra20-pwm.txt Required properties: · line 12

Quoted 12 lines

diff --git a/Documentation/devicetree/bindings/pwm/nvidia,tegra20-pwm.txt b/Documentation/devicetree/bindings/pwm/nvidia,tegra20-pwm.txt index 74c41e34c3b6..331c1e66e8fa 100644

Documentation/devicetree/bindings/pwm/nvidia,tegra20-pwm.txt +1 -1
@@ -9,7 +9,7 @@ Required properties:
   - "nvidia,tegra132-pwm", "nvidia,tegra20-pwm": for Tegra132
   - "nvidia,tegra210-pwm", "nvidia,tegra20-pwm": for Tegra210
   - "nvidia,tegra186-pwm": for Tegra186
-  - "nvidia,tegra194-pwm": for Tegra194
+  - "nvidia,tegra194-pwm": for Tegra194, Tegra234

No differences here. You sent something old...

My understanding was not aligned. Will update the fix with new patch.

Thanks & Regards,
Sandipan

Quoted 3 lines

Best regards,
Krzysztof