Skip to contentSkip to conversation

arm64: tegra: Add PWM controllers on Tegra234

PATCH In review Sandipan Patra 2 participants 4 messages Aug 26, 2022 – Aug 29, 2022

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

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

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

---
 arch/arm64/boot/dts/nvidia/tegra234.dtsi | 84 ++++++++++++++++++++++++
 1 file changed, 84 insertions(+)
arch/arm64/boot/dts/nvidia/tegra234.dtsi +84 -0
index 81a0f599685f..c2dc651f0842 100644
@@ -840,6 +840,90 @@
 			#pwm-cells = <2>;
 		};
 
+		pwm2: pwm@3290000 {
+			compatible = "nvidia,tegra194-pwm",
+				     "nvidia,tegra186-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",
+				     "nvidia,tegra186-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",
+				     "nvidia,tegra186-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",
+				     "nvidia,tegra186-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",
+				     "nvidia,tegra186-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",
+				     "nvidia,tegra186-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",
+				     "nvidia,tegra186-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
#1 lore raw

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

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

---
 .../arm64/boot/dts/nvidia/tegra234-p3737-0000.dtsi | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
arch/arm64/boot/dts/nvidia/tegra234-p3737-0000.dtsi +14 -0
index a85993c85e45..e76894574d32 100644
@@ -2,4 +2,18 @@
 
 / {
 	compatible = "nvidia,p3737-0000";
+
+	bus@0 {
+		pwm@3280000 {
+			status = "okay";
+		};
+
+		pwm@32c0000 {
+			status = "okay";
+		};
+
+		pwm@32f0000 {
+			status = "okay";
+		};
+	};
 };
Signature · 1 line
2.17.1
#2 lore raw

Re: [PATCH 2/2] arm64: tegra: Add user PWM support on Jetson Orin

Quoted 13 lines · Sandipan Patra

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

---
 .../arm64/boot/dts/nvidia/tegra234-p3737-0000.dtsi | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
arch/arm64/boot/dts/nvidia/tegra234-p3737-0000.dtsi +0 -0
index a85993c85e45..e76894574d32 100644

arch/arm64/boot/dts/nvidia/tegra234-p3737-0000.dtsi line 9

Quoted 8 lines
arch/arm64/boot/dts/nvidia/tegra234-p3737-0000.dtsi +5 -0
@@ -2,4 +2,18 @@
 
 / {
 	compatible = "nvidia,p3737-0000";
+
+	bus@0 {
+		pwm@3280000 {
+			status = "okay";
+		};

Overriding by node path is error-prone. You should override by label.

Best regards,
Krzysztof

#3 lore raw

RE: [PATCH 2/2] arm64: tegra: Add user PWM support on Jetson Orin

Quoted 33 lines

-----Original Message-----
From: Krzysztof Kozlowski <[email protected]>
Sent: Friday, August 26, 2022 11:05 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 2/2] arm64: tegra: Add user PWM support on Jetson Orin

External email: Use caution opening links or attachments

Review

Quoted 9 lines · Sandipan Patra

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

---
 .../arm64/boot/dts/nvidia/tegra234-p3737-0000.dtsi | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
(quoted diff) +0 -0

b/arch/arm64/boot/dts/nvidia/tegra234-p3737-0000.dtsi

Quoted 5 lines

index a85993c85e45..e76894574d32 100644

arch/arm64/boot/dts/nvidia/tegra234-p3737-0000.dtsi +0 -0
@@ -2,4 +2,18 @@
 
Quoted 9 lines

arch/arm64/boot/dts/nvidia/tegra234-p3737-0000.dtsi line 9

Quoted 7 lines
arch/arm64/boot/dts/nvidia/tegra234-p3737-0000.dtsi +5 -0
 / {
      compatible = "nvidia,p3737-0000";
+
+     bus@0 {
+             pwm@3280000 {
+                     status = "okay";
+             };

Overriding by node path is error-prone. You should override by label.

ACK.

Thanks & Regards,
Sandipan

Quoted 3 lines

Best regards,
Krzysztof