All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] arm64: tegra: Add PWM controllers on Tegra234
@ 2022-08-26 12:17 Sandipan Patra
  2022-08-26 12:17 ` [PATCH 2/2] arm64: tegra: Add user PWM support on Jetson Orin Sandipan Patra
  0 siblings, 1 reply; 5+ messages in thread
From: Sandipan Patra @ 2022-08-26 12:17 UTC (permalink / raw)
  To: thierry.reding, jonathanh, robh+dt, krzysztof.kozlowski+dt,
	devicetree, linux-tegra, linux-kernel
  Cc: bbasu, kyarlagadda, Sandipan Patra

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

Signed-off-by: Sandipan Patra <spatra@nvidia.com>
---
 arch/arm64/boot/dts/nvidia/tegra234.dtsi | 84 ++++++++++++++++++++++++
 1 file changed, 84 insertions(+)

diff --git a/arch/arm64/boot/dts/nvidia/tegra234.dtsi b/arch/arm64/boot/dts/nvidia/tegra234.dtsi
index 81a0f599685f..c2dc651f0842 100644
--- a/arch/arm64/boot/dts/nvidia/tegra234.dtsi
+++ b/arch/arm64/boot/dts/nvidia/tegra234.dtsi
@@ -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>;
-- 
2.17.1


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

* [PATCH 2/2] arm64: tegra: Add user PWM support on Jetson Orin
  2022-08-26 12:17 [PATCH 1/2] arm64: tegra: Add PWM controllers on Tegra234 Sandipan Patra
@ 2022-08-26 12:17 ` Sandipan Patra
  2022-08-26 17:35   ` Krzysztof Kozlowski
  0 siblings, 1 reply; 5+ messages in thread
From: Sandipan Patra @ 2022-08-26 12:17 UTC (permalink / raw)
  To: thierry.reding, jonathanh, robh+dt, krzysztof.kozlowski+dt,
	devicetree, linux-tegra, linux-kernel
  Cc: bbasu, kyarlagadda, Sandipan Patra

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

Signed-off-by: Sandipan Patra <spatra@nvidia.com>
---
 .../arm64/boot/dts/nvidia/tegra234-p3737-0000.dtsi | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/arch/arm64/boot/dts/nvidia/tegra234-p3737-0000.dtsi b/arch/arm64/boot/dts/nvidia/tegra234-p3737-0000.dtsi
index a85993c85e45..e76894574d32 100644
--- a/arch/arm64/boot/dts/nvidia/tegra234-p3737-0000.dtsi
+++ b/arch/arm64/boot/dts/nvidia/tegra234-p3737-0000.dtsi
@@ -2,4 +2,18 @@
 
 / {
 	compatible = "nvidia,p3737-0000";
+
+	bus@0 {
+		pwm@3280000 {
+			status = "okay";
+		};
+
+		pwm@32c0000 {
+			status = "okay";
+		};
+
+		pwm@32f0000 {
+			status = "okay";
+		};
+	};
 };
-- 
2.17.1


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

* Re: [PATCH 2/2] arm64: tegra: Add user PWM support on Jetson Orin
  2022-08-26 12:17 ` [PATCH 2/2] arm64: tegra: Add user PWM support on Jetson Orin Sandipan Patra
@ 2022-08-26 17:35   ` Krzysztof Kozlowski
  2022-08-29 11:44     ` Sandipan Patra
  0 siblings, 1 reply; 5+ messages in thread
From: Krzysztof Kozlowski @ 2022-08-26 17:35 UTC (permalink / raw)
  To: Sandipan Patra, thierry.reding, jonathanh, robh+dt,
	krzysztof.kozlowski+dt, devicetree, linux-tegra, linux-kernel
  Cc: bbasu, kyarlagadda

On 26/08/2022 15:17, Sandipan Patra wrote:
> Enable in device tree and use it to drive the PWM controllers on
> 40 pin header of Orin dev-kit.
> 
> Signed-off-by: Sandipan Patra <spatra@nvidia.com>
> ---
>  .../arm64/boot/dts/nvidia/tegra234-p3737-0000.dtsi | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/nvidia/tegra234-p3737-0000.dtsi b/arch/arm64/boot/dts/nvidia/tegra234-p3737-0000.dtsi
> index a85993c85e45..e76894574d32 100644
> --- a/arch/arm64/boot/dts/nvidia/tegra234-p3737-0000.dtsi
> +++ b/arch/arm64/boot/dts/nvidia/tegra234-p3737-0000.dtsi
> @@ -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

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

* RE: [PATCH 2/2] arm64: tegra: Add user PWM support on Jetson Orin
  2022-08-26 17:35   ` Krzysztof Kozlowski
@ 2022-08-29 11:44     ` Sandipan Patra
  0 siblings, 0 replies; 5+ messages in thread
From: Sandipan Patra @ 2022-08-29 11:44 UTC (permalink / raw)
  To: Krzysztof Kozlowski, thierry.reding, Jonathan Hunter, robh+dt,
	krzysztof.kozlowski+dt, devicetree, linux-tegra, linux-kernel
  Cc: Bibek Basu, Krishna Yarlagadda



> -----Original Message-----
> From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Sent: Friday, August 26, 2022 11:05 PM
> To: Sandipan Patra <spatra@nvidia.com>; thierry.reding@gmail.com;
> Jonathan Hunter <jonathanh@nvidia.com>; robh+dt@kernel.org;
> krzysztof.kozlowski+dt@linaro.org; devicetree@vger.kernel.org; linux-
> tegra@vger.kernel.org; linux-kernel@vger.kernel.org
> Cc: Bibek Basu <bbasu@nvidia.com>; Krishna Yarlagadda
> <kyarlagadda@nvidia.com>
> Subject: Re: [PATCH 2/2] arm64: tegra: Add user PWM support on Jetson
> Orin
> 
> External email: Use caution opening links or attachments
> 
> 
> On 26/08/2022 15:17, Sandipan Patra wrote:
> > Enable in device tree and use it to drive the PWM controllers on
> > 40 pin header of Orin dev-kit.
> >
> > Signed-off-by: Sandipan Patra <spatra@nvidia.com>
> > ---
> >  .../arm64/boot/dts/nvidia/tegra234-p3737-0000.dtsi | 14 ++++++++++++++
> >  1 file changed, 14 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/nvidia/tegra234-p3737-0000.dtsi
> b/arch/arm64/boot/dts/nvidia/tegra234-p3737-0000.dtsi
> > index a85993c85e45..e76894574d32 100644
> > --- a/arch/arm64/boot/dts/nvidia/tegra234-p3737-0000.dtsi
> > +++ b/arch/arm64/boot/dts/nvidia/tegra234-p3737-0000.dtsi
> > @@ -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.
ACK.

Thanks & Regards,
Sandipan

> 
> Best regards,
> Krzysztof

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

* [PATCH 2/2] arm64: tegra: Add user PWM support on Jetson Orin
  2022-08-29 11:44 [PATCH 1/2] arm64: tegra: Add PWM controllers on Tegra234 Sandipan Patra
@ 2022-08-29 11:44 ` Sandipan Patra
  0 siblings, 0 replies; 5+ messages in thread
From: Sandipan Patra @ 2022-08-29 11:44 UTC (permalink / raw)
  To: thierry.reding, jonathanh, robh+dt, krzysztof.kozlowski+dt,
	devicetree, linux-tegra, linux-kernel
  Cc: bbasu, kyarlagadda, Sandipan Patra

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

Signed-off-by: Sandipan Patra <spatra@nvidia.com>
---
V2: Overriding by node label instead of node path.

 arch/arm64/boot/dts/nvidia/tegra234-p3737-0000.dtsi | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/arm64/boot/dts/nvidia/tegra234-p3737-0000.dtsi b/arch/arm64/boot/dts/nvidia/tegra234-p3737-0000.dtsi
index a85993c85e45..5108013a18c6 100644
--- a/arch/arm64/boot/dts/nvidia/tegra234-p3737-0000.dtsi
+++ b/arch/arm64/boot/dts/nvidia/tegra234-p3737-0000.dtsi
@@ -3,3 +3,15 @@
 / {
 	compatible = "nvidia,p3737-0000";
 };
+
+&pwm1 {
+	status = "okay";
+};
+
+&pwm5 {
+	status = "okay";
+};
+
+&pwm8 {
+	status = "okay";
+};
-- 
2.17.1


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

end of thread, other threads:[~2022-08-29 12:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-26 12:17 [PATCH 1/2] arm64: tegra: Add PWM controllers on Tegra234 Sandipan Patra
2022-08-26 12:17 ` [PATCH 2/2] arm64: tegra: Add user PWM support on Jetson Orin Sandipan Patra
2022-08-26 17:35   ` Krzysztof Kozlowski
2022-08-29 11:44     ` Sandipan Patra
2022-08-29 11:44 [PATCH 1/2] arm64: tegra: Add PWM controllers on Tegra234 Sandipan Patra
2022-08-29 11:44 ` [PATCH 2/2] arm64: tegra: Add user PWM support on Jetson Orin Sandipan Patra

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.