arm64: tegra: Add PWM controllers on Tegra234
Subsystems (2)
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
@@ -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
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.
---
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
@@ -3,3 +3,15 @@ / { compatible = "nvidia,p3737-0000"; }; + +&pwm1 { + status = "okay"; +}; + +&pwm5 { + status = "okay"; +}; + +&pwm8 { + status = "okay"; +};
Signature · 1 line
2.17.1
Quoted 13 lines · Sandipan Patra
Tegra234 has eight single-channel PWM controllers, one of them in the AON block.
Signed-off-by Sandipan Patra <[email protected]>--- arch/arm64/boot/dts/nvidia/tegra234.dtsi | 84 ++++++++++++++++++++++++ 1 file changed, 84 insertions(+)arch/arm64/boot/dts/nvidia/tegra234.dtsi +0
-0
arch/arm64/boot/dts/nvidia/tegra234.dtsi line 845
Quoted 6 lines
arch/arm64/boot/dts/nvidia/tegra234.dtsi +3
-0@@ -840,6 +840,90 @@ #pwm-cells = <2>; }; + pwm2: pwm@3290000 { + compatible = "nvidia,tegra194-pwm", + "nvidia,tegra186-pwm";
This does not match bindings. Either DTS or bindings need to be fixed.
Best regards,
Krzysztof
Hi Krzysztof,
Quoted 5 lines
arch/arm64/boot/dts/nvidia/tegra234.dtsi line 845
Quoted 3 lines
arch/arm64/boot/dts/nvidia/tegra234.dtsi +3
-0+ pwm2: pwm@3290000 { + compatible = "nvidia,tegra194-pwm", + "nvidia,tegra186-pwm";This does not match bindings. Either DTS or bindings need to be fixed.
Thanks for reviewing the patches.
Tegra234 uses same compatible as Tegra194.
And also we can clear "nvidia,tegra186-pwm" from the Tegra234 pwm compatible list. I will update binding doc and push new patch.
Thanks & Regards,
Sandipan
Quoted 41 lines
-----Original Message-----
From: Krzysztof Kozlowski <[email protected]>
Sent: Tuesday, August 30, 2022 3:20 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 1/2] arm64: tegra: Add PWM controllers on Tegra234External email: Use caution opening links or attachments
Quoted 15 lines · Sandipan Patra
Tegra234 has eight single-channel PWM controllers, one of them in the AON block.
Signed-off-by Sandipan Patra <[email protected]>--- arch/arm64/boot/dts/nvidia/tegra234.dtsi | 84 ++++++++++++++++++++++++ 1 file changed, 84 insertions(+)arch/arm64/boot/dts/nvidia/tegra234.dtsi +0
-0arch/arm64/boot/dts/nvidia/tegra234.dtsi line 845
Quoted 6 lines
arch/arm64/boot/dts/nvidia/tegra234.dtsi +3
-0@@ -840,6 +840,90 @@ #pwm-cells = <2>; }; + pwm2: pwm@3290000 { + compatible = "nvidia,tegra194-pwm", + "nvidia,tegra186-pwm";This does not match bindings. Either DTS or bindings need to be fixed.
Best regards,
Krzysztof