Skip to contentSkip to conversation

ARM: tegra: add PWM nodes to Tegra114 DT

PATCH Applied Andrew Chew 2 participants 4 messages Mar 12, 2013 – Mar 13, 2013 2 messages not in the archive

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

PATCH v4 1/2 ARM: tegra: add PWM nodes to Tegra114 DT

This patch adds a device tree node for the four PWM controllers present on Tegra114.

---
Change the register base length to 0x100, per TRM.

 arch/arm/boot/dts/tegra114.dtsi |    8 ++++++++
 1 file changed, 8 insertions(+)
arch/arm/boot/dts/tegra114.dtsi +8 -0
index 1dfaf28..3b20d14 100644
@@ -92,6 +92,14 @@
 		status = "disabled";
 	};
 
+	pwm: pwm {
+		compatible = "nvidia,tegra114-pwm", "nvidia,tegra20-pwm";
+		reg = <0x7000a000 0x100>;
+		#pwm-cells = <2>;
+		clocks = <&tegra_car 17>;
+		status = "disabled";
+	};
+
 	rtc {
 		compatible = "nvidia,tegra114-rtc", "nvidia,tegra20-rtc";
 		reg = <0x7000e000 0x100>;
Signature · 1 line
1.7.9.5

A message that is not in the archive (sent off-list or not yet received): 1363131651-13734-1-git-send-email-achew-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org

#2 lore raw

PATCH v4 2/2 ARM: tegra: fix the status of PWM nodes

We should be defining the PWM nodes with status as "disabled" in the chip-specific dtsi file, since we don't know whether specific boards will use the PWM or not. This patch fixes the PWM node status for Tegra20 and Tegra30.

Also fixed the one user of PWM, which is the Tegra20 medcom-wide board, so that PWM is set to "okay" in the board-specific dts file.

---
 arch/arm/boot/dts/tegra20-medcom-wide.dts |    4 ++++
 arch/arm/boot/dts/tegra20.dtsi            |    1 +
 arch/arm/boot/dts/tegra30.dtsi            |    1 +
 3 files changed, 6 insertions(+)
arch/arm/boot/dts/tegra20-medcom-wide.dts +4 -0
index a2d6d65..ec392a2 100644
@@ -26,6 +26,10 @@
 		};
 	};
 
+	pwm: pwm {
+		status = "okay";
+	}
+
 	backlight {
 		compatible = "pwm-backlight";
 		pwms = <&pwm 0 5000000>;
arch/arm/boot/dts/tegra20.dtsi +1 -0
index 2e7c83c..1887ac3 100644
@@ -268,6 +268,7 @@
 		reg = <0x7000a000 0x100>;
 		#pwm-cells = <2>;
 		clocks = <&tegra_car 17>;
+		status = "disabled";
 	};
 
 	rtc {
arch/arm/boot/dts/tegra30.dtsi +1 -0
index 2de8b91..6294687 100644
@@ -263,6 +263,7 @@
 		reg = <0x7000a000 0x100>;
 		#pwm-cells = <2>;
 		clocks = <&tegra_car 17>;
+		status = "disabled";
 	};
 
 	rtc {
Signature · 1 line
1.7.9.5

A message that is not in the archive (sent off-list or not yet received): 1363131651-13734-2-git-send-email-achew-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org

#4 lore raw

Re: [PATCH 2/2 v4] ARM: tegra: fix the status of PWM nodes

arch/arm/boot/dts/tegra20-medcom-wide.dts line 33

Quoted 12 lines · Andrew Chew

We should be defining the PWM nodes with status as "disabled" in the chip-specific dtsi file, since we don't know whether specific boards will use the PWM or not. This patch fixes the PWM node status for Tegra20 and Tegra30.

arch/arm/boot/dts/tegra20-medcom-wide.dts +4 -0
 
+	pwm: pwm {
+		status = "okay";
+	}
+
 	backlight {

You don't need to repeat the label ("pwm:") in this file; it's already defined in tegra20.dtsi.

Also, the node sort order is wrong here; pwm's reg value is before i2c's reg value (which is the current node immediately before the backlight node in this file).

I'll fix these issues up when applying the patch since they're easy.

#5 lore raw

Re: [PATCH 2/2 v4] ARM: tegra: fix the status of PWM nodes

In reply to a message not in the archive
Quoted 7 lines · Andrew Chew

We should be defining the PWM nodes with status as "disabled" in the chip-specific dtsi file, since we don't know whether specific boards will use the PWM or not. This patch fixes the PWM node status for Tegra20 and Tegra30.

Also fixed the one user of PWM, which is the Tegra20 medcom-wide board, so that PWM is set to "okay" in the board-specific dts file.

I've applied this series to Tegra's for-3.10/dt branch.

arch/arm/boot/dts/tegra20-medcom-wide.dts line 32

Quoted 6 lines
arch/arm/boot/dts/tegra20-medcom-wide.dts +4 -0
 
+	pwm: pwm {
+		status = "okay";
+	}
+

There's also a syntax error here; there needs to be a ; after the }. I also fixed this up when I applied it.

BTW, "PATCH 2/2 v4" is more typically written "PATCH V4 2/2". Using "git format-patch --subject-prefix='PATCH V4'" can help automate that a little.