Skip to contentSkip to conversation

arm64: tegra: Add PWM controllers on Tegra194

PATCH New Thierry Reding 1 participant 3 messages Oct 24, 2018 – Oct 25, 2018

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

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

From: Thierry Reding <[email protected]>

Tegra194 has eight single-channel PWM controllers, one of them in the AON partition.

---
 arch/arm64/boot/dts/nvidia/tegra194.dtsi | 96 ++++++++++++++++++++++++
 1 file changed, 96 insertions(+)
arch/arm64/boot/dts/nvidia/tegra194.dtsi +96 -0
index 9fc14bb9a0af..c2091bb16546 100644
@@ -209,6 +209,90 @@
 			status = "disabled";
 		};
 
+		pwm1: pwm at 3280000 {
+			compatible = "nvidia,tegra194-pwm",
+				     "nvidia,tegra186-pwm";
+			reg = <0x3280000 0x10000>;
+			clocks = <&bpmp TEGRA194_CLK_PWM1>;
+			clock-names = "pwm";
+			resets = <&bpmp TEGRA194_RESET_PWM1>;
+			reset-names = "pwm";
+			status = "disabled";
+			#pwm-cells = <2>;
+		};
+
+		pwm2: pwm at 3290000 {
+			compatible = "nvidia,tegra194-pwm",
+				     "nvidia,tegra186-pwm";
+			reg = <0x3290000 0x10000>;
+			clocks = <&bpmp TEGRA194_CLK_PWM2>;
+			clock-names = "pwm";
+			resets = <&bpmp TEGRA194_RESET_PWM2>;
+			reset-names = "pwm";
+			status = "disabled";
+			#pwm-cells = <2>;
+		};
+
+		pwm3: pwm at 32a0000 {
+			compatible = "nvidia,tegra194-pwm",
+				     "nvidia,tegra186-pwm";
+			reg = <0x32a0000 0x10000>;
+			clocks = <&bpmp TEGRA194_CLK_PWM3>;
+			clock-names = "pwm";
+			resets = <&bpmp TEGRA194_RESET_PWM3>;
+			reset-names = "pwm";
+			status = "disabled";
+			#pwm-cells = <2>;
+		};
+
+		pwm5: pwm at 32c0000 {
+			compatible = "nvidia,tegra194-pwm",
+				     "nvidia,tegra186-pwm";
+			reg = <0x32c0000 0x10000>;
+			clocks = <&bpmp TEGRA194_CLK_PWM5>;
+			clock-names = "pwm";
+			resets = <&bpmp TEGRA194_RESET_PWM5>;
+			reset-names = "pwm";
+			status = "disabled";
+			#pwm-cells = <2>;
+		};
+
+		pwm6: pwm at 32d0000 {
+			compatible = "nvidia,tegra194-pwm",
+				     "nvidia,tegra186-pwm";
+			reg = <0x32d0000 0x10000>;
+			clocks = <&bpmp TEGRA194_CLK_PWM6>;
+			clock-names = "pwm";
+			resets = <&bpmp TEGRA194_RESET_PWM6>;
+			reset-names = "pwm";
+			status = "disabled";
+			#pwm-cells = <2>;
+		};
+
+		pwm7: pwm at 32e0000 {
+			compatible = "nvidia,tegra194-pwm",
+				     "nvidia,tegra186-pwm";
+			reg = <0x32e0000 0x10000>;
+			clocks = <&bpmp TEGRA194_CLK_PWM7>;
+			clock-names = "pwm";
+			resets = <&bpmp TEGRA194_RESET_PWM7>;
+			reset-names = "pwm";
+			status = "disabled";
+			#pwm-cells = <2>;
+		};
+
+		pwm8: pwm at 32f0000 {
+			compatible = "nvidia,tegra194-pwm",
+				     "nvidia,tegra186-pwm";
+			reg = <0x32f0000 0x10000>;
+			clocks = <&bpmp TEGRA194_CLK_PWM8>;
+			clock-names = "pwm";
+			resets = <&bpmp TEGRA194_RESET_PWM8>;
+			reset-names = "pwm";
+			status = "disabled";
+			#pwm-cells = <2>;
+		};
+
 		sdmmc1: sdhci at 3400000 {
 			compatible = "nvidia,tegra194-sdhci", "nvidia,tegra186-sdhci";
 			reg = <0x03400000 0x10000>;
@@ -313,6 +397,18 @@
 			status = "disabled";
 		};
 
+		pwm4: pwm at c340000 {
+			compatible = "nvidia,tegra194-pwm",
+				     "nvidia,tegra186-pwm";
+			reg = <0xc340000 0x10000>;
+			clocks = <&bpmp TEGRA194_CLK_PWM4>;
+			clock-names = "pwm";
+			resets = <&bpmp TEGRA194_RESET_PWM4>;
+			reset-names = "pwm";
+			status = "disabled";
+			#pwm-cells = <2>;
+		};
+
 		pmc at c360000 {
 			compatible = "nvidia,tegra194-pmc";
 			reg = <0x0c360000 0x10000>,
Signature · 1 line
2.19.1
#1 lore raw

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

Quoted 9 lines · Thierry Reding

From: Thierry Reding <[email protected]>

Tegra194 has eight single-channel PWM controllers, one of them in the AON partition.

---
 arch/arm64/boot/dts/nvidia/tegra194.dtsi | 96 ++++++++++++++++++++++++
 1 file changed, 96 insertions(+)

Both patches applied to for-4.21/arm64/dt.

Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20181025/91cefa3e/attachment.sig>

#2 lore raw

PATCH 2/2 arm64: tegra: Add PWM fan support on Jetson Xavier

In reply to Thierry Reding

From: Thierry Reding <[email protected]>

Enable PWM4 in device tree and use it to drive the PWM fan on the Jetson Xavier.

---
 arch/arm64/boot/dts/nvidia/tegra194-p2972-0000.dts | 9 +++++++++
 1 file changed, 9 insertions(+)
arch/arm64/boot/dts/nvidia/tegra194-p2972-0000.dts +9 -0
index 9ff3c18280c4..86f05504ca38 100644
@@ -12,5 +12,14 @@
 		sdhci at 3400000 {
 			status = "okay";
 		};
+
+		pwm at c340000 {
+			status = "okay";
+		};
+	};
+
+	fan {
+		compatible = "pwm-fan";
+		pwms = <&pwm4 0 45334>;
 	};
 };
Signature · 1 line
2.19.1