All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 1/3] dt-bindings: pwm: tegra: Document Tegra234 pwm binding
@ 2022-09-19 14:14 Sandipan Patra
  2022-09-19 14:14 ` [PATCH v5 2/3] arm64: tegra: Add PWM controllers on Tegra234 Sandipan Patra
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Sandipan Patra @ 2022-09-19 14:14 UTC (permalink / raw)
  To: thierry.reding, jonathanh, robh+dt, krzysztof.kozlowski+dt,
	devicetree, linux-tegra, linux-kernel
  Cc: bbasu, kyarlagadda, Sandipan Patra

Add compatible for nvidia,tegra234-pwm with nvidia,tegra194-pwm as a
fallback.
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.

Signed-off-by: Sandipan Patra <spatra@nvidia.com>
---
V3 -> V4: Mention fallback compatible
V4 -> V5: Update Compatible with both Tegra234 and fallback

 Documentation/devicetree/bindings/pwm/nvidia,tegra20-pwm.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/pwm/nvidia,tegra20-pwm.txt b/Documentation/devicetree/bindings/pwm/nvidia,tegra20-pwm.txt
index 74c41e34c3b6..47f1abf20118 100644
--- a/Documentation/devicetree/bindings/pwm/nvidia,tegra20-pwm.txt
+++ b/Documentation/devicetree/bindings/pwm/nvidia,tegra20-pwm.txt
@@ -10,6 +10,7 @@ Required properties:
   - "nvidia,tegra210-pwm", "nvidia,tegra20-pwm": for Tegra210
   - "nvidia,tegra186-pwm": for Tegra186
   - "nvidia,tegra194-pwm": for Tegra194
+  - "nvidia,tegra234-pwm", "nvidia,tegra194-pwm": for 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.
-- 
2.17.1


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

* [PATCH v5 2/3] arm64: tegra: Add PWM controllers on Tegra234
  2022-09-19 14:14 [PATCH v5 1/3] dt-bindings: pwm: tegra: Document Tegra234 pwm binding Sandipan Patra
@ 2022-09-19 14:14 ` Sandipan Patra
  2022-09-20 16:00   ` Krzysztof Kozlowski
  2022-11-03 11:50   ` Thierry Reding
  2022-09-19 14:14 ` [PATCH v5 3/3] arm64: tegra: Add user PWM support on Jetson Orin Sandipan Patra
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 8+ messages in thread
From: Sandipan Patra @ 2022-09-19 14:14 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>
---
V4->V5: Update compatable with Tegra234 and fallback

 arch/arm64/boot/dts/nvidia/tegra234.dtsi | 88 +++++++++++++++++++++++-
 1 file changed, 86 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/nvidia/tegra234.dtsi b/arch/arm64/boot/dts/nvidia/tegra234.dtsi
index 0170bfa8a467..b1b29e3c207c 100644
--- a/arch/arm64/boot/dts/nvidia/tegra234.dtsi
+++ b/arch/arm64/boot/dts/nvidia/tegra234.dtsi
@@ -870,8 +870,8 @@
 		};
 
 		pwm1: pwm@3280000 {
-			compatible = "nvidia,tegra194-pwm",
-				     "nvidia,tegra186-pwm";
+			compatible = "nvidia,tegra234-pwm",
+				     "nvidia,tegra194-pwm";
 			reg = <0x3280000 0x10000>;
 			clocks = <&bpmp TEGRA234_CLK_PWM1>;
 			clock-names = "pwm";
@@ -881,6 +881,90 @@
 			#pwm-cells = <2>;
 		};
 
+		pwm2: pwm@3290000 {
+			compatible = "nvidia,tegra234-pwm",
+				     "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,tegra234-pwm",
+				     "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,tegra234-pwm",
+				     "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,tegra234-pwm",
+				     "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,tegra234-pwm",
+				     "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,tegra234-pwm",
+				     "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,tegra234-pwm",
+				     "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>;
-- 
2.17.1


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

* [PATCH v5 3/3] arm64: tegra: Add user PWM support on Jetson Orin
  2022-09-19 14:14 [PATCH v5 1/3] dt-bindings: pwm: tegra: Document Tegra234 pwm binding Sandipan Patra
  2022-09-19 14:14 ` [PATCH v5 2/3] arm64: tegra: Add PWM controllers on Tegra234 Sandipan Patra
@ 2022-09-19 14:14 ` Sandipan Patra
  2022-11-03 11:53   ` Thierry Reding
  2022-09-20 16:00 ` [PATCH v5 1/3] dt-bindings: pwm: tegra: Document Tegra234 pwm binding Krzysztof Kozlowski
  2022-11-03 11:49 ` Thierry Reding
  3 siblings, 1 reply; 8+ messages in thread
From: Sandipan Patra @ 2022-09-19 14:14 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>
---
V1->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] 8+ messages in thread

* Re: [PATCH v5 1/3] dt-bindings: pwm: tegra: Document Tegra234 pwm binding
  2022-09-19 14:14 [PATCH v5 1/3] dt-bindings: pwm: tegra: Document Tegra234 pwm binding Sandipan Patra
  2022-09-19 14:14 ` [PATCH v5 2/3] arm64: tegra: Add PWM controllers on Tegra234 Sandipan Patra
  2022-09-19 14:14 ` [PATCH v5 3/3] arm64: tegra: Add user PWM support on Jetson Orin Sandipan Patra
@ 2022-09-20 16:00 ` Krzysztof Kozlowski
  2022-11-03 11:49 ` Thierry Reding
  3 siblings, 0 replies; 8+ messages in thread
From: Krzysztof Kozlowski @ 2022-09-20 16:00 UTC (permalink / raw)
  To: Sandipan Patra, thierry.reding, jonathanh, robh+dt,
	krzysztof.kozlowski+dt, devicetree, linux-tegra, linux-kernel
  Cc: bbasu, kyarlagadda

On 19/09/2022 16:14, Sandipan Patra wrote:
> Add compatible for nvidia,tegra234-pwm with nvidia,tegra194-pwm as a
> fallback.
> 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.
> 
> Signed-off-by: Sandipan Patra <spatra@nvidia.com>


Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>


Best regards,
Krzysztof

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

* Re: [PATCH v5 2/3] arm64: tegra: Add PWM controllers on Tegra234
  2022-09-19 14:14 ` [PATCH v5 2/3] arm64: tegra: Add PWM controllers on Tegra234 Sandipan Patra
@ 2022-09-20 16:00   ` Krzysztof Kozlowski
  2022-11-03 11:50   ` Thierry Reding
  1 sibling, 0 replies; 8+ messages in thread
From: Krzysztof Kozlowski @ 2022-09-20 16:00 UTC (permalink / raw)
  To: Sandipan Patra, thierry.reding, jonathanh, robh+dt,
	krzysztof.kozlowski+dt, devicetree, linux-tegra, linux-kernel
  Cc: bbasu, kyarlagadda

On 19/09/2022 16:14, Sandipan Patra wrote:
> Tegra234 has eight single-channel PWM controllers, one of them in the
> AON block.
> 
> Signed-off-by: Sandipan Patra <spatra@nvidia.com>
> ---


Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>


Best regards,
Krzysztof

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

* Re: [PATCH v5 1/3] dt-bindings: pwm: tegra: Document Tegra234 pwm binding
  2022-09-19 14:14 [PATCH v5 1/3] dt-bindings: pwm: tegra: Document Tegra234 pwm binding Sandipan Patra
                   ` (2 preceding siblings ...)
  2022-09-20 16:00 ` [PATCH v5 1/3] dt-bindings: pwm: tegra: Document Tegra234 pwm binding Krzysztof Kozlowski
@ 2022-11-03 11:49 ` Thierry Reding
  3 siblings, 0 replies; 8+ messages in thread
From: Thierry Reding @ 2022-11-03 11:49 UTC (permalink / raw)
  To: Sandipan Patra
  Cc: jonathanh, robh+dt, krzysztof.kozlowski+dt, devicetree,
	linux-tegra, linux-kernel, bbasu, kyarlagadda

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

On Mon, Sep 19, 2022 at 07:44:53PM +0530, Sandipan Patra wrote:
> Add compatible for nvidia,tegra234-pwm with nvidia,tegra194-pwm as a
> fallback.
> 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.
> 
> Signed-off-by: Sandipan Patra <spatra@nvidia.com>
> ---
> V3 -> V4: Mention fallback compatible
> V4 -> V5: Update Compatible with both Tegra234 and fallback
> 
>  Documentation/devicetree/bindings/pwm/nvidia,tegra20-pwm.txt | 1 +
>  1 file changed, 1 insertion(+)

Applied, thanks.

Thierry

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

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

* Re: [PATCH v5 2/3] arm64: tegra: Add PWM controllers on Tegra234
  2022-09-19 14:14 ` [PATCH v5 2/3] arm64: tegra: Add PWM controllers on Tegra234 Sandipan Patra
  2022-09-20 16:00   ` Krzysztof Kozlowski
@ 2022-11-03 11:50   ` Thierry Reding
  1 sibling, 0 replies; 8+ messages in thread
From: Thierry Reding @ 2022-11-03 11:50 UTC (permalink / raw)
  To: Sandipan Patra
  Cc: jonathanh, robh+dt, krzysztof.kozlowski+dt, devicetree,
	linux-tegra, linux-kernel, bbasu, kyarlagadda

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

On Mon, Sep 19, 2022 at 07:44:54PM +0530, Sandipan Patra wrote:
> Tegra234 has eight single-channel PWM controllers, one of them in the
> AON block.
> 
> Signed-off-by: Sandipan Patra <spatra@nvidia.com>
> ---
> V4->V5: Update compatable with Tegra234 and fallback
> 
>  arch/arm64/boot/dts/nvidia/tegra234.dtsi | 88 +++++++++++++++++++++++-
>  1 file changed, 86 insertions(+), 2 deletions(-)

I've merged this with Jon's changes that also added these.

Thanks,
Thierry

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

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

* Re: [PATCH v5 3/3] arm64: tegra: Add user PWM support on Jetson Orin
  2022-09-19 14:14 ` [PATCH v5 3/3] arm64: tegra: Add user PWM support on Jetson Orin Sandipan Patra
@ 2022-11-03 11:53   ` Thierry Reding
  0 siblings, 0 replies; 8+ messages in thread
From: Thierry Reding @ 2022-11-03 11:53 UTC (permalink / raw)
  To: Sandipan Patra
  Cc: jonathanh, robh+dt, krzysztof.kozlowski+dt, devicetree,
	linux-tegra, linux-kernel, bbasu, kyarlagadda

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

On Mon, Sep 19, 2022 at 07:44:55PM +0530, 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>
> ---
> V1->V2: Overriding by node label instead of node path.
> 
>  arch/arm64/boot/dts/nvidia/tegra234-p3737-0000.dtsi | 12 ++++++++++++
>  1 file changed, 12 insertions(+)

Applied, thanks.

Thierry

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

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

end of thread, other threads:[~2022-11-03 11:54 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-19 14:14 [PATCH v5 1/3] dt-bindings: pwm: tegra: Document Tegra234 pwm binding Sandipan Patra
2022-09-19 14:14 ` [PATCH v5 2/3] arm64: tegra: Add PWM controllers on Tegra234 Sandipan Patra
2022-09-20 16:00   ` Krzysztof Kozlowski
2022-11-03 11:50   ` Thierry Reding
2022-09-19 14:14 ` [PATCH v5 3/3] arm64: tegra: Add user PWM support on Jetson Orin Sandipan Patra
2022-11-03 11:53   ` Thierry Reding
2022-09-20 16:00 ` [PATCH v5 1/3] dt-bindings: pwm: tegra: Document Tegra234 pwm binding Krzysztof Kozlowski
2022-11-03 11:49 ` Thierry Reding

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.