public inbox for linux-tegra@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2 v4] ARM: tegra: add PWM nodes to Tegra114 DT
@ 2013-03-12 23:40 Andrew Chew
       [not found] ` <1363131651-13734-1-git-send-email-achew-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Andrew Chew @ 2013-03-12 23:40 UTC (permalink / raw)
  To: hdoyu-DDmLM1+adcrQT0dZR+AlfA, swarren-3lzwWm7+Weoh9ZMKESR00Q
  Cc: achew-DDmLM1+adcrQT0dZR+AlfA, linux-tegra-u79uwXL29TY76Z2rM5mHXA

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

Signed-off-by: Andrew Chew <achew-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
Change the register base length to 0x100, per TRM.

 arch/arm/boot/dts/tegra114.dtsi |    8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/arm/boot/dts/tegra114.dtsi b/arch/arm/boot/dts/tegra114.dtsi
index 1dfaf28..3b20d14 100644
--- a/arch/arm/boot/dts/tegra114.dtsi
+++ b/arch/arm/boot/dts/tegra114.dtsi
@@ -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>;
-- 
1.7.9.5

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

* [PATCH 2/2 v4] ARM: tegra: fix the status of PWM nodes
       [not found] ` <1363131651-13734-1-git-send-email-achew-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
@ 2013-03-12 23:40   ` Andrew Chew
       [not found]     ` <1363131651-13734-2-git-send-email-achew-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Andrew Chew @ 2013-03-12 23:40 UTC (permalink / raw)
  To: hdoyu-DDmLM1+adcrQT0dZR+AlfA, swarren-3lzwWm7+Weoh9ZMKESR00Q
  Cc: achew-DDmLM1+adcrQT0dZR+AlfA, linux-tegra-u79uwXL29TY76Z2rM5mHXA

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.

Signed-off-by: Andrew Chew <achew-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
 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(+)

diff --git a/arch/arm/boot/dts/tegra20-medcom-wide.dts b/arch/arm/boot/dts/tegra20-medcom-wide.dts
index a2d6d65..ec392a2 100644
--- a/arch/arm/boot/dts/tegra20-medcom-wide.dts
+++ b/arch/arm/boot/dts/tegra20-medcom-wide.dts
@@ -26,6 +26,10 @@
 		};
 	};
 
+	pwm: pwm {
+		status = "okay";
+	}
+
 	backlight {
 		compatible = "pwm-backlight";
 		pwms = <&pwm 0 5000000>;
diff --git a/arch/arm/boot/dts/tegra20.dtsi b/arch/arm/boot/dts/tegra20.dtsi
index 2e7c83c..1887ac3 100644
--- a/arch/arm/boot/dts/tegra20.dtsi
+++ b/arch/arm/boot/dts/tegra20.dtsi
@@ -268,6 +268,7 @@
 		reg = <0x7000a000 0x100>;
 		#pwm-cells = <2>;
 		clocks = <&tegra_car 17>;
+		status = "disabled";
 	};
 
 	rtc {
diff --git a/arch/arm/boot/dts/tegra30.dtsi b/arch/arm/boot/dts/tegra30.dtsi
index 2de8b91..6294687 100644
--- a/arch/arm/boot/dts/tegra30.dtsi
+++ b/arch/arm/boot/dts/tegra30.dtsi
@@ -263,6 +263,7 @@
 		reg = <0x7000a000 0x100>;
 		#pwm-cells = <2>;
 		clocks = <&tegra_car 17>;
+		status = "disabled";
 	};
 
 	rtc {
-- 
1.7.9.5

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

* Re: [PATCH 2/2 v4] ARM: tegra: fix the status of PWM nodes
       [not found]     ` <1363131651-13734-2-git-send-email-achew-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
@ 2013-03-13 16:07       ` Stephen Warren
  2013-03-13 16:19       ` Stephen Warren
  1 sibling, 0 replies; 4+ messages in thread
From: Stephen Warren @ 2013-03-13 16:07 UTC (permalink / raw)
  To: Andrew Chew
  Cc: hdoyu-DDmLM1+adcrQT0dZR+AlfA, linux-tegra-u79uwXL29TY76Z2rM5mHXA

On 03/12/2013 05:40 PM, Andrew Chew wrote:
> 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.

> diff --git a/arch/arm/boot/dts/tegra20-medcom-wide.dts b/arch/arm/boot/dts/tegra20-medcom-wide.dts

> +	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.

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

* Re: [PATCH 2/2 v4] ARM: tegra: fix the status of PWM nodes
       [not found]     ` <1363131651-13734-2-git-send-email-achew-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
  2013-03-13 16:07       ` Stephen Warren
@ 2013-03-13 16:19       ` Stephen Warren
  1 sibling, 0 replies; 4+ messages in thread
From: Stephen Warren @ 2013-03-13 16:19 UTC (permalink / raw)
  To: Andrew Chew
  Cc: hdoyu-DDmLM1+adcrQT0dZR+AlfA, linux-tegra-u79uwXL29TY76Z2rM5mHXA

On 03/12/2013 05:40 PM, Andrew Chew wrote:
> 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.

> diff --git a/arch/arm/boot/dts/tegra20-medcom-wide.dts b/arch/arm/boot/dts/tegra20-medcom-wide.dts

> +	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.

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

end of thread, other threads:[~2013-03-13 16:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-12 23:40 [PATCH 1/2 v4] ARM: tegra: add PWM nodes to Tegra114 DT Andrew Chew
     [not found] ` <1363131651-13734-1-git-send-email-achew-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-03-12 23:40   ` [PATCH 2/2 v4] ARM: tegra: fix the status of PWM nodes Andrew Chew
     [not found]     ` <1363131651-13734-2-git-send-email-achew-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-03-13 16:07       ` Stephen Warren
2013-03-13 16:19       ` Stephen Warren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox