public inbox for linux-tegra@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1 v2] ARM: dt: tegra114: add PWM nodes
@ 2013-03-11 23:48 Andrew Chew
       [not found] ` <1363045695-28874-1-git-send-email-achew-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Andrew Chew @ 2013-03-11 23:48 UTC (permalink / raw)
  To: hdoyu-DDmLM1+adcrQT0dZR+AlfA, swarren-3lzwWm7+Weoh9ZMKESR00Q
  Cc: achew-DDmLM1+adcrQT0dZR+AlfA, linux-tegra-u79uwXL29TY76Z2rM5mHXA

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

Signed-off-by: Andrew Chew <achew-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
Fixed commit message.
Corrected the compatible property.
Placed PWM nodes in the right place such that nodes are sorted by register
address.

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

diff --git a/arch/arm/boot/dts/tegra114.dtsi b/arch/arm/boot/dts/tegra114.dtsi
index 1dfaf28..5741ae4 100644
--- a/arch/arm/boot/dts/tegra114.dtsi
+++ b/arch/arm/boot/dts/tegra114.dtsi
@@ -92,6 +92,38 @@
 		status = "disabled";
 	};
 
+	pwm0: pwm@7000a000 {
+		compatible = "nvidia,tegra114-pwm", "nvidia,tegra20-pwm";
+		reg = <0x7000a000 0x4>;
+		#pwm-cells = <2>;
+		clocks = <&tegra_car 17>;
+		status = "disabled";
+	};
+
+	pwm1: pwm@7000a010 {
+		compatible = "nvidia,tegra114-pwm", "nvidia,tegra20-pwm";
+		reg = <0x7000a010 0x4>;
+		#pwm-cells = <2>;
+		clocks = <&tegra_car 17>;
+		status = "disabled";
+	};
+
+	pwm2: pwm@7000a020 {
+		compatible = "nvidia,tegra114-pwm", "nvidia,tegra20-pwm";
+		reg = <0x7000a020 0x4>;
+		#pwm-cells = <2>;
+		clocks = <&tegra_car 17>;
+		status = "disabled";
+	};
+
+	pwm3: pwm@7000a030 {
+		compatible = "nvidia,tegra114-pwm", "nvidia,tegra20-pwm";
+		reg = <0x7000a030 0x4>;
+		#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] 7+ messages in thread

* Re: [PATCH 1/1 v2] ARM: dt: tegra114: add PWM nodes
       [not found] ` <1363045695-28874-1-git-send-email-achew-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
@ 2013-03-12  9:23   ` Hiroshi Doyu
       [not found]     ` <20130312112340.6d624df5dfe28c4b5b8157f5-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
  2013-03-12 18:50   ` Stephen Warren
  2013-03-12 19:24   ` Thierry Reding
  2 siblings, 1 reply; 7+ messages in thread
From: Hiroshi Doyu @ 2013-03-12  9:23 UTC (permalink / raw)
  To: Andrew Chew
  Cc: swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org, Andrew Chew,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org

Hi Andrew,

On Tue, 12 Mar 2013 00:48:15 +0100
Andrew Chew <achew-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> wrote:

> This patch adds device tree nodes for the four PWM controllers present
> on Tegra114.
> 
> Signed-off-by: Andrew Chew <achew-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> ---
> Fixed commit message.
> Corrected the compatible property.
> Placed PWM nodes in the right place such that nodes are sorted by register
> address.
> 
>  arch/arm/boot/dts/tegra114.dtsi |   32 ++++++++++++++++++++++++++++++++
>  1 file changed, 32 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/tegra114.dtsi b/arch/arm/boot/dts/tegra114.dtsi
> index 1dfaf28..5741ae4 100644
> --- a/arch/arm/boot/dts/tegra114.dtsi
> +++ b/arch/arm/boot/dts/tegra114.dtsi
> @@ -92,6 +92,38 @@
>  		status = "disabled";
>  	};
>  
> +	pwm0: pwm@7000a000 {
> +		compatible = "nvidia,tegra114-pwm", "nvidia,tegra20-pwm";
> +		reg = <0x7000a000 0x4>;
> +		#pwm-cells = <2>;
> +		clocks = <&tegra_car 17>;

FYI:
I'm sending out the patch(v4) to replace car magic # with macro[1].
Then you could replace the above magic #s with macro names.

[1] http://patchwork.ozlabs.org/patch/220680/

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

* Re: [PATCH 1/1 v2] ARM: dt: tegra114: add PWM nodes
       [not found]     ` <20130312112340.6d624df5dfe28c4b5b8157f5-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
@ 2013-03-12 18:29       ` Stephen Warren
  0 siblings, 0 replies; 7+ messages in thread
From: Stephen Warren @ 2013-03-12 18:29 UTC (permalink / raw)
  To: Hiroshi Doyu
  Cc: Andrew Chew, linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org

On 03/12/2013 03:23 AM, Hiroshi Doyu wrote:
> Hi Andrew,
> 
> On Tue, 12 Mar 2013 00:48:15 +0100
> Andrew Chew <achew-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> wrote:
> 
>> This patch adds device tree nodes for the four PWM controllers present
>> on Tegra114.

>> diff --git a/arch/arm/boot/dts/tegra114.dtsi b/arch/arm/boot/dts/tegra114.dtsi

>> +	pwm0: pwm@7000a000 {
>> +		compatible = "nvidia,tegra114-pwm", "nvidia,tegra20-pwm";
>> +		reg = <0x7000a000 0x4>;
>> +		#pwm-cells = <2>;
>> +		clocks = <&tegra_car 17>;
> 
> FYI:
> I'm sending out the patch(v4) to replace car magic # with macro[1].
> Then you could replace the above magic #s with macro names.
> 
> [1] http://patchwork.ozlabs.org/patch/220680/

Since the ground-work for dtc+cpp usage isn't complete yet, and it's
progress has been a little slow, I'm going to have all new DT nodes use
the existing numeric scheme, and put them into Tegra's for-3.10/dt
branch. Then, if we actually end up being able to convert to using
dtc+cpp in 3.10, I'll create a new branch based on that for the
conversion itself. Both you and I will need to rebase our conversion
patches on top of all the other DT additions at that time.

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

* Re: [PATCH 1/1 v2] ARM: dt: tegra114: add PWM nodes
       [not found] ` <1363045695-28874-1-git-send-email-achew-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
  2013-03-12  9:23   ` Hiroshi Doyu
@ 2013-03-12 18:50   ` Stephen Warren
  2013-03-12 19:24   ` Thierry Reding
  2 siblings, 0 replies; 7+ messages in thread
From: Stephen Warren @ 2013-03-12 18:50 UTC (permalink / raw)
  To: Andrew Chew
  Cc: hdoyu-DDmLM1+adcrQT0dZR+AlfA, linux-tegra-u79uwXL29TY76Z2rM5mHXA

On 03/11/2013 05:48 PM, Andrew Chew wrote:
> This patch adds device tree nodes for the four PWM controllers present
> on Tegra114.

Applied to Tegra's for-3.10/dt branch.

I changed the patch subject to:
ARM: tegra: add PWM nodes to Tegra114 DT

tegra114: isn't a valid sub-system tag; it's tegra:. I tend not to
include dt: now.

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

* Re: [PATCH 1/1 v2] ARM: dt: tegra114: add PWM nodes
       [not found] ` <1363045695-28874-1-git-send-email-achew-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
  2013-03-12  9:23   ` Hiroshi Doyu
  2013-03-12 18:50   ` Stephen Warren
@ 2013-03-12 19:24   ` Thierry Reding
       [not found]     ` <20130312192429.GA21924-RM9K5IK7kjIQXX3q8xo1gnVAuStQJXxyR5q1nwbD4aMs9pC9oP6+/A@public.gmane.org>
  2 siblings, 1 reply; 7+ messages in thread
From: Thierry Reding @ 2013-03-12 19:24 UTC (permalink / raw)
  To: Andrew Chew
  Cc: hdoyu-DDmLM1+adcrQT0dZR+AlfA, swarren-3lzwWm7+Weoh9ZMKESR00Q,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA

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

On Mon, Mar 11, 2013 at 04:48:15PM -0700, Andrew Chew wrote:
[...]
> diff --git a/arch/arm/boot/dts/tegra114.dtsi b/arch/arm/boot/dts/tegra114.dtsi
[...]
> +	pwm0: pwm@7000a000 {
> +		compatible = "nvidia,tegra114-pwm", "nvidia,tegra20-pwm";
> +		reg = <0x7000a000 0x4>;
> +		#pwm-cells = <2>;
> +		clocks = <&tegra_car 17>;
> +		status = "disabled";
> +	};
> +
> +	pwm1: pwm@7000a010 {
> +		compatible = "nvidia,tegra114-pwm", "nvidia,tegra20-pwm";
> +		reg = <0x7000a010 0x4>;
> +		#pwm-cells = <2>;
> +		clocks = <&tegra_car 17>;
> +		status = "disabled";
> +	};
> +
> +	pwm2: pwm@7000a020 {
> +		compatible = "nvidia,tegra114-pwm", "nvidia,tegra20-pwm";
> +		reg = <0x7000a020 0x4>;
> +		#pwm-cells = <2>;
> +		clocks = <&tegra_car 17>;
> +		status = "disabled";
> +	};
> +
> +	pwm3: pwm@7000a030 {
> +		compatible = "nvidia,tegra114-pwm", "nvidia,tegra20-pwm";
> +		reg = <0x7000a030 0x4>;
> +		#pwm-cells = <2>;
> +		clocks = <&tegra_car 17>;
> +		status = "disabled";
> +	};

Shouldn't these rather go into a single PWM node which provides 4 PWM
devices? Just like we do on Tegra20?

Thierry

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: [PATCH 1/1 v2] ARM: dt: tegra114: add PWM nodes
       [not found]     ` <20130312192429.GA21924-RM9K5IK7kjIQXX3q8xo1gnVAuStQJXxyR5q1nwbD4aMs9pC9oP6+/A@public.gmane.org>
@ 2013-03-12 19:34       ` Stephen Warren
       [not found]         ` <513F8363.8090908-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Stephen Warren @ 2013-03-12 19:34 UTC (permalink / raw)
  To: Thierry Reding
  Cc: Andrew Chew, hdoyu-DDmLM1+adcrQT0dZR+AlfA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA

On 03/12/2013 01:24 PM, Thierry Reding wrote:
> On Mon, Mar 11, 2013 at 04:48:15PM -0700, Andrew Chew wrote: [...]
>> diff --git a/arch/arm/boot/dts/tegra114.dtsi
>> b/arch/arm/boot/dts/tegra114.dtsi
> [...]
>> +	pwm0: pwm@7000a000 {
...
>> +	pwm1: pwm@7000a010 {
...
>> +	pwm2: pwm@7000a020 {
...
>> +	pwm3: pwm@7000a030 {
...
> 
> Shouldn't these rather go into a single PWM node which provides 4
> PWM devices? Just like we do on Tegra20?

Oh yes. Thanks for catching that. I'll remove the patch from the Tegra
tree for now until that's fixed.

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

* RE: [PATCH 1/1 v2] ARM: dt: tegra114: add PWM nodes
       [not found]         ` <513F8363.8090908-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
@ 2013-03-12 20:38           ` Andrew Chew
  0 siblings, 0 replies; 7+ messages in thread
From: Andrew Chew @ 2013-03-12 20:38 UTC (permalink / raw)
  To: Stephen Warren, Thierry Reding
  Cc: Hiroshi Doyu, linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org

> From: Stephen Warren [mailto:swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org]
> Sent: Tuesday, March 12, 2013 12:35 PM
> To: Thierry Reding
> Cc: Andrew Chew; Hiroshi Doyu; linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> Subject: Re: [PATCH 1/1 v2] ARM: dt: tegra114: add PWM nodes
> 
> On 03/12/2013 01:24 PM, Thierry Reding wrote:
> > On Mon, Mar 11, 2013 at 04:48:15PM -0700, Andrew Chew wrote: [...]
> >> diff --git a/arch/arm/boot/dts/tegra114.dtsi
> >> b/arch/arm/boot/dts/tegra114.dtsi
> > [...]
> >> +	pwm0: pwm@7000a000 {
> ...
> >> +	pwm1: pwm@7000a010 {
> ...
> >> +	pwm2: pwm@7000a020 {
> ...
> >> +	pwm3: pwm@7000a030 {
> ...
> >
> > Shouldn't these rather go into a single PWM node which provides 4 PWM
> > devices? Just like we do on Tegra20?
> 
> Oh yes. Thanks for catching that. I'll remove the patch from the Tegra tree for
> now until that's fixed.

Does that work?  Let me try that, using Tegra20 as guidance.

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

end of thread, other threads:[~2013-03-12 20:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-11 23:48 [PATCH 1/1 v2] ARM: dt: tegra114: add PWM nodes Andrew Chew
     [not found] ` <1363045695-28874-1-git-send-email-achew-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-03-12  9:23   ` Hiroshi Doyu
     [not found]     ` <20130312112340.6d624df5dfe28c4b5b8157f5-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-03-12 18:29       ` Stephen Warren
2013-03-12 18:50   ` Stephen Warren
2013-03-12 19:24   ` Thierry Reding
     [not found]     ` <20130312192429.GA21924-RM9K5IK7kjIQXX3q8xo1gnVAuStQJXxyR5q1nwbD4aMs9pC9oP6+/A@public.gmane.org>
2013-03-12 19:34       ` Stephen Warren
     [not found]         ` <513F8363.8090908-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-03-12 20:38           ` Andrew Chew

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