devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] arm64: tegra: Populate Tegra234 PWMs
@ 2022-10-19 13:29 Jon Hunter
  2022-10-19 13:29 ` [PATCH 2/2] arm64: tegra: Add PWM fan for Jetson AGX Orin Jon Hunter
  2022-10-24 13:34 ` [PATCH 1/2] arm64: tegra: Populate Tegra234 PWMs Thierry Reding
  0 siblings, 2 replies; 4+ messages in thread
From: Jon Hunter @ 2022-10-19 13:29 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Thierry Reding
  Cc: devicetree, linux-tegra, Jon Hunter

Populate all the PWM devices for Tegra234. Finally, update the
compatible string for the existing 'pwm1' node to just be 'tegra194-pwm'
and remove the fallback to 'tegra186-pwm', which aligns with the
binding documentation.

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
---
 arch/arm64/boot/dts/nvidia/tegra234.dtsi | 80 +++++++++++++++++++++++-
 1 file changed, 78 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/nvidia/tegra234.dtsi b/arch/arm64/boot/dts/nvidia/tegra234.dtsi
index 499102ce5bd0..a68be5a0771b 100644
--- a/arch/arm64/boot/dts/nvidia/tegra234.dtsi
+++ b/arch/arm64/boot/dts/nvidia/tegra234.dtsi
@@ -870,8 +870,7 @@ spi@3270000 {
 		};
 
 		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";
@@ -881,6 +880,72 @@ pwm1: pwm@3280000 {
 			#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>;
+		};
+
+		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>;
@@ -1529,6 +1594,17 @@ gpio_aon: gpio@c2f0000 {
 			gpio-controller;
 		};
 
+		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>;
+		};
+
 		pmc: pmc@c360000 {
 			compatible = "nvidia,tegra234-pmc";
 			reg = <0x0c360000 0x10000>,
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] arm64: tegra: Add PWM fan for Jetson AGX Orin
  2022-10-19 13:29 [PATCH 1/2] arm64: tegra: Populate Tegra234 PWMs Jon Hunter
@ 2022-10-19 13:29 ` Jon Hunter
  2022-10-24 13:34 ` [PATCH 1/2] arm64: tegra: Populate Tegra234 PWMs Thierry Reding
  1 sibling, 0 replies; 4+ messages in thread
From: Jon Hunter @ 2022-10-19 13:29 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Thierry Reding
  Cc: devicetree, linux-tegra, Jon Hunter

Add the PWM fan node for the Tegra234 Jetson AGX Orin platform.

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
---
 .../boot/dts/nvidia/tegra234-p3737-0000+p3701-0000.dts    | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git 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 57ab75328814..fc7dcd521340 100644
--- a/arch/arm64/boot/dts/nvidia/tegra234-p3737-0000+p3701-0000.dts
+++ b/arch/arm64/boot/dts/nvidia/tegra234-p3737-0000+p3701-0000.dts
@@ -2184,4 +2184,12 @@ TEGRA234_AON_GPIO(AA, 4)
 		phy-names = "p2u-0", "p2u-1", "p2u-2", "p2u-3", "p2u-4",
 			    "p2u-5", "p2u-6", "p2u-7";
 	};
+
+	pwm-fan {
+		compatible = "pwm-fan";
+		pwms = <&pwm3 0 45334>;
+
+		cooling-levels = <0 95 178 255>;
+		#cooling-cells = <2>;
+	};
 };
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] arm64: tegra: Populate Tegra234 PWMs
  2022-10-19 13:29 [PATCH 1/2] arm64: tegra: Populate Tegra234 PWMs Jon Hunter
  2022-10-19 13:29 ` [PATCH 2/2] arm64: tegra: Add PWM fan for Jetson AGX Orin Jon Hunter
@ 2022-10-24 13:34 ` Thierry Reding
  2022-10-24 15:55   ` Jon Hunter
  1 sibling, 1 reply; 4+ messages in thread
From: Thierry Reding @ 2022-10-24 13:34 UTC (permalink / raw)
  To: Jon Hunter; +Cc: Rob Herring, Krzysztof Kozlowski, devicetree, linux-tegra

[-- Attachment #1: Type: text/plain, Size: 532 bytes --]

On Wed, Oct 19, 2022 at 02:29:02PM +0100, Jon Hunter wrote:
> Populate all the PWM devices for Tegra234. Finally, update the
> compatible string for the existing 'pwm1' node to just be 'tegra194-pwm'
> and remove the fallback to 'tegra186-pwm', which aligns with the
> binding documentation.
> 
> Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
> ---
>  arch/arm64/boot/dts/nvidia/tegra234.dtsi | 80 +++++++++++++++++++++++-
>  1 file changed, 78 insertions(+), 2 deletions(-)

Both patches applied, thanks.

Thierry

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] arm64: tegra: Populate Tegra234 PWMs
  2022-10-24 13:34 ` [PATCH 1/2] arm64: tegra: Populate Tegra234 PWMs Thierry Reding
@ 2022-10-24 15:55   ` Jon Hunter
  0 siblings, 0 replies; 4+ messages in thread
From: Jon Hunter @ 2022-10-24 15:55 UTC (permalink / raw)
  To: Thierry Reding; +Cc: Rob Herring, Krzysztof Kozlowski, devicetree, linux-tegra


On 24/10/2022 14:34, Thierry Reding wrote:
> On Wed, Oct 19, 2022 at 02:29:02PM +0100, Jon Hunter wrote:
>> Populate all the PWM devices for Tegra234. Finally, update the
>> compatible string for the existing 'pwm1' node to just be 'tegra194-pwm'
>> and remove the fallback to 'tegra186-pwm', which aligns with the
>> binding documentation.
>>
>> Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
>> ---
>>   arch/arm64/boot/dts/nvidia/tegra234.dtsi | 80 +++++++++++++++++++++++-
>>   1 file changed, 78 insertions(+), 2 deletions(-)
> 
> Both patches applied, thanks.

Thanks. Looks like I forgot to enable pwm3 in patch 2/2. I will send an 
additional patch.

Jon

-- 
nvpublic

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-10-24 17:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-19 13:29 [PATCH 1/2] arm64: tegra: Populate Tegra234 PWMs Jon Hunter
2022-10-19 13:29 ` [PATCH 2/2] arm64: tegra: Add PWM fan for Jetson AGX Orin Jon Hunter
2022-10-24 13:34 ` [PATCH 1/2] arm64: tegra: Populate Tegra234 PWMs Thierry Reding
2022-10-24 15:55   ` Jon Hunter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).