devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 1/5] ARM: dts: pxa: add pwri2c to pxa device-tree
@ 2015-02-07 12:39 Robert Jarzmik
       [not found] ` <1423312760-15871-1-git-send-email-robert.jarzmik-GANU6spQydw@public.gmane.org>
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Robert Jarzmik @ 2015-02-07 12:39 UTC (permalink / raw)
  To: Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
	Dmitry Eremin-Solenikov, Sergei Shtylyov
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Robert Jarzmik

pxa27x variant has 2 I2C busses on the SoC :
 - the casual I2C
 - the power I2C, normally driving power regulators, and capable of
 receiving orders on core frequency modifications

Add the missing pwri2c to pxa27x description.

Signed-off-by: Robert Jarzmik <robert.jarzmik-GANU6spQydw@public.gmane.org>
---
Since v2: as Dmitry pointed out, no pwri2c on pxa25x, only pxa27x
---
 arch/arm/boot/dts/pxa27x.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm/boot/dts/pxa27x.dtsi b/arch/arm/boot/dts/pxa27x.dtsi
index 80fc5d7..98b560e 100644
--- a/arch/arm/boot/dts/pxa27x.dtsi
+++ b/arch/arm/boot/dts/pxa27x.dtsi
@@ -35,6 +35,13 @@
 			reg = <0x40c00010 0x10>;
 			#pwm-cells = <1>;
 		};
+
+		pwri2c: i2c@40f000180 {
+			compatible = "mrvl,pxa-i2c";
+			reg = <0x40f00180 0x24>;
+			interrupts = <6>;
+			status = "disabled";
+		};
 	};
 
 	clocks {
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH v3 2/5] ARM: dts: pxa: add clocks
       [not found] ` <1423312760-15871-1-git-send-email-robert.jarzmik-GANU6spQydw@public.gmane.org>
@ 2015-02-07 12:39   ` Robert Jarzmik
       [not found]     ` <1423312760-15871-2-git-send-email-robert.jarzmik-GANU6spQydw@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: Robert Jarzmik @ 2015-02-07 12:39 UTC (permalink / raw)
  To: Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
	Dmitry Eremin-Solenikov, Sergei Shtylyov
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Robert Jarzmik

Add clocks to the IPs already described in the pxa device-tree
files. There are more clocks in the clock tree than IPs described in the
current pxa device-tree.

This patch ensures that :
 - the current description is correct
 - the clocks are actually claimed, so that clock framework doesn't
   disable them automatically (unused clocks shutdown)

Signed-off-by: Robert Jarzmik <robert.jarzmik-GANU6spQydw@public.gmane.org>
---
 arch/arm/boot/dts/pxa27x.dtsi | 31 ++++++++++++++++++++++++++++---
 1 file changed, 28 insertions(+), 3 deletions(-)

diff --git a/arch/arm/boot/dts/pxa27x.dtsi b/arch/arm/boot/dts/pxa27x.dtsi
index 98b560e..e8d5097 100644
--- a/arch/arm/boot/dts/pxa27x.dtsi
+++ b/arch/arm/boot/dts/pxa27x.dtsi
@@ -1,6 +1,6 @@
 /* The pxa3xx skeleton simply augments the 2xx version */
 #include "pxa2xx.dtsi"
-#include "dt-bindings/clock/pxa2xx-clock.h"
+#include "dt-bindings/clock/pxa-clock.h"
 
 / {
 	model = "Marvell PXA27x familiy SoC";
@@ -12,36 +12,62 @@
 			marvell,intc-nr-irqs = <34>;
 		};
 
+		gpio: gpio@40e00000 {
+			compatible = "intel,pxa27x-gpio";
+			clocks = <&pxa2xx_clks CLK_NONE>;
+		};
+
+		ffuart: uart@40100000 {
+			clocks = <&pxa2xx_clks CLK_FFUART>;
+		};
+
+		btuart: uart@40200000 {
+			clocks = <&pxa2xx_clks CLK_BTUART>;
+		};
+
+		stuart: uart@40700000 {
+			clocks = <&pxa2xx_clks CLK_STUART>;
+		};
+
 		pwm0: pwm@40b00000 {
 			compatible = "marvell,pxa270-pwm", "marvell,pxa250-pwm";
 			reg = <0x40b00000 0x10>;
 			#pwm-cells = <1>;
+			clocks = <&pxa2xx_clks CLK_PWM0>;
 		};
 
 		pwm1: pwm@40b00010 {
 			compatible = "marvell,pxa270-pwm", "marvell,pxa250-pwm";
 			reg = <0x40b00010 0x10>;
 			#pwm-cells = <1>;
+			clocks = <&pxa2xx_clks CLK_PWM1>;
 		};
 
 		pwm2: pwm@40c00000 {
 			compatible = "marvell,pxa270-pwm", "marvell,pxa250-pwm";
 			reg = <0x40c00000 0x10>;
 			#pwm-cells = <1>;
+			clocks = <&pxa2xx_clks CLK_PWM0>;
 		};
 
 		pwm3: pwm@40c00010 {
 			compatible = "marvell,pxa270-pwm", "marvell,pxa250-pwm";
 			reg = <0x40c00010 0x10>;
 			#pwm-cells = <1>;
+			clocks = <&pxa2xx_clks CLK_PWM1>;
 		};
 
 		pwri2c: i2c@40f000180 {
 			compatible = "mrvl,pxa-i2c";
 			reg = <0x40f00180 0x24>;
 			interrupts = <6>;
+			clocks = <&pxa2xx_clks CLK_PWRI2C>;
 			status = "disabled";
 		};
+
+		pxai2c1: i2c@40301680 {
+			clocks = <&pxa2xx_clks CLK_I2C>;
+		};
 	};
 
 	clocks {
@@ -54,10 +80,9 @@
 		ranges;
 
 		pxa2xx_clks: pxa2xx_clks@41300004 {
-			compatible = "marvell,pxa-clocks";
+			compatible = "marvell,pxa270-clocks";
 			#clock-cells = <1>;
 			status = "okay";
 		};
 	};
-
 };
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH v3 3/5] ARM: dts: pxa: add pxa27x-udc to pxa27x
  2015-02-07 12:39 [PATCH v3 1/5] ARM: dts: pxa: add pwri2c to pxa device-tree Robert Jarzmik
       [not found] ` <1423312760-15871-1-git-send-email-robert.jarzmik-GANU6spQydw@public.gmane.org>
@ 2015-02-07 12:39 ` Robert Jarzmik
  2015-02-07 12:39 ` [PATCH v3 4/5] ARM: dts: pxa: add pxa27x-keypad " Robert Jarzmik
  2015-02-07 12:39 ` [PATCH v3 5/5] ARM: dts: pxa: add pxa-timer " Robert Jarzmik
  3 siblings, 0 replies; 9+ messages in thread
From: Robert Jarzmik @ 2015-02-07 12:39 UTC (permalink / raw)
  To: Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
	Dmitry Eremin-Solenikov, Sergei Shtylyov
  Cc: devicetree, linux-arm-kernel, linux-kernel, Robert Jarzmik

Each pxa27x has an embedded usb udc controller. Add it in the pxa27x
device-tree description.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
---
 arch/arm/boot/dts/pxa27x.dtsi | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/arm/boot/dts/pxa27x.dtsi b/arch/arm/boot/dts/pxa27x.dtsi
index e8d5097..ddb6982 100644
--- a/arch/arm/boot/dts/pxa27x.dtsi
+++ b/arch/arm/boot/dts/pxa27x.dtsi
@@ -68,6 +68,14 @@
 		pxai2c1: i2c@40301680 {
 			clocks = <&pxa2xx_clks CLK_I2C>;
 		};
+
+		pxa27x_udc: udc@40600000 {
+			compatible = "marvell,pxa270-udc";
+			reg = <0x40600000 0x10000>;
+			interrupts = <11>;
+			clocks = <&pxa2xx_clks CLK_USB>;
+			status = "disabled";
+		};
 	};
 
 	clocks {
-- 
2.1.0

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

* [PATCH v3 4/5] ARM: dts: pxa: add pxa27x-keypad to pxa27x
  2015-02-07 12:39 [PATCH v3 1/5] ARM: dts: pxa: add pwri2c to pxa device-tree Robert Jarzmik
       [not found] ` <1423312760-15871-1-git-send-email-robert.jarzmik-GANU6spQydw@public.gmane.org>
  2015-02-07 12:39 ` [PATCH v3 3/5] ARM: dts: pxa: add pxa27x-udc to pxa27x Robert Jarzmik
@ 2015-02-07 12:39 ` Robert Jarzmik
  2015-02-07 12:39 ` [PATCH v3 5/5] ARM: dts: pxa: add pxa-timer " Robert Jarzmik
  3 siblings, 0 replies; 9+ messages in thread
From: Robert Jarzmik @ 2015-02-07 12:39 UTC (permalink / raw)
  To: Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
	Dmitry Eremin-Solenikov, Sergei Shtylyov
  Cc: devicetree, linux-arm-kernel, linux-kernel, Robert Jarzmik

Each pxa27x has an embedded keypad controller. Add it in the pxa27x
device-tree description.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
---
 arch/arm/boot/dts/pxa27x.dtsi | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/arm/boot/dts/pxa27x.dtsi b/arch/arm/boot/dts/pxa27x.dtsi
index ddb6982..6ecf1a6 100644
--- a/arch/arm/boot/dts/pxa27x.dtsi
+++ b/arch/arm/boot/dts/pxa27x.dtsi
@@ -76,6 +76,14 @@
 			clocks = <&pxa2xx_clks CLK_USB>;
 			status = "disabled";
 		};
+
+		keypad: keypad@41500000 {
+			compatible = "marvell,pxa27x-keypad";
+			reg = <0x41500000 0x4c>;
+			interrupts = <4>;
+			clocks = <&pxa2xx_clks CLK_KEYPAD>;
+			status = "disabled";
+		};
 	};
 
 	clocks {
-- 
2.1.0

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

* [PATCH v3 5/5] ARM: dts: pxa: add pxa-timer to pxa27x
  2015-02-07 12:39 [PATCH v3 1/5] ARM: dts: pxa: add pwri2c to pxa device-tree Robert Jarzmik
                   ` (2 preceding siblings ...)
  2015-02-07 12:39 ` [PATCH v3 4/5] ARM: dts: pxa: add pxa27x-keypad " Robert Jarzmik
@ 2015-02-07 12:39 ` Robert Jarzmik
  3 siblings, 0 replies; 9+ messages in thread
From: Robert Jarzmik @ 2015-02-07 12:39 UTC (permalink / raw)
  To: Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
	Dmitry Eremin-Solenikov, Sergei Shtylyov
  Cc: devicetree, linux-arm-kernel, linux-kernel, Robert Jarzmik

Each pxa has an embedded OS Timers IP. The kernel cannot work without a
valid clocksource, and this adds the OS Timers to the pxa device-tree
description.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
---
Since v1: removed clocksource node, pxa-timer being directly under
          pxabus (Rob's comment).
Since v2: renamed pxa-timer to timer (Sergei's comment)
---
 arch/arm/boot/dts/pxa27x.dtsi | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/arm/boot/dts/pxa27x.dtsi b/arch/arm/boot/dts/pxa27x.dtsi
index 6ecf1a6..fb0abad 100644
--- a/arch/arm/boot/dts/pxa27x.dtsi
+++ b/arch/arm/boot/dts/pxa27x.dtsi
@@ -101,4 +101,12 @@
 			status = "okay";
 		};
 	};
+
+	timer@40a00000 {
+		compatible = "marvell,pxa-timer";
+		reg = <0x40a00000 0x20>;
+		interrupts = <26>;
+		clocks = <&pxa2xx_clks CLK_OSTIMER>;
+		status = "okay";
+	};
 };
-- 
2.1.0

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

* Re: [PATCH v3 2/5] ARM: dts: pxa: add clocks
       [not found]     ` <1423312760-15871-2-git-send-email-robert.jarzmik-GANU6spQydw@public.gmane.org>
@ 2015-02-07 12:56       ` Sergei Shtylyov
       [not found]         ` <54D60B79.5060206-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: Sergei Shtylyov @ 2015-02-07 12:56 UTC (permalink / raw)
  To: Robert Jarzmik, Rob Herring, Pawel Moll, Mark Rutland,
	Ian Campbell, Kumar Gala, Dmitry Eremin-Solenikov
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

Hello.

On 2/7/2015 3:39 PM, Robert Jarzmik wrote:

> Add clocks to the IPs already described in the pxa device-tree
> files. There are more clocks in the clock tree than IPs described in the
> current pxa device-tree.

> This patch ensures that :
>   - the current description is correct
>   - the clocks are actually claimed, so that clock framework doesn't
>     disable them automatically (unused clocks shutdown)

> Signed-off-by: Robert Jarzmik <robert.jarzmik-GANU6spQydw@public.gmane.org>
> ---
>   arch/arm/boot/dts/pxa27x.dtsi | 31 ++++++++++++++++++++++++++++---
>   1 file changed, 28 insertions(+), 3 deletions(-)

> diff --git a/arch/arm/boot/dts/pxa27x.dtsi b/arch/arm/boot/dts/pxa27x.dtsi
> index 98b560e..e8d5097 100644
> --- a/arch/arm/boot/dts/pxa27x.dtsi
> +++ b/arch/arm/boot/dts/pxa27x.dtsi
[...]
> @@ -12,36 +12,62 @@
>   			marvell,intc-nr-irqs = <34>;
>   		};
>
> +		gpio: gpio@40e00000 {
> +			compatible = "intel,pxa27x-gpio";
> +			clocks = <&pxa2xx_clks CLK_NONE>;
> +		};
> +
> +		ffuart: uart@40100000 {
> +			clocks = <&pxa2xx_clks CLK_FFUART>;
> +		};
> +
> +		btuart: uart@40200000 {
> +			clocks = <&pxa2xx_clks CLK_BTUART>;
> +		};
> +
> +		stuart: uart@40700000 {
> +			clocks = <&pxa2xx_clks CLK_STUART>;
> +		};
> +

    The ePAPR standard tells to call such nodes "serial", not "uart".

[...]

WBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH v3 2/5] ARM: dts: pxa: add clocks
       [not found]         ` <54D60B79.5060206-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>
@ 2015-02-07 13:16           ` Robert Jarzmik
       [not found]             ` <87a90p9815.fsf-GANU6spQydw@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: Robert Jarzmik @ 2015-02-07 13:16 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
	Dmitry Eremin-Solenikov, devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

Sergei Shtylyov <sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org> writes:

> Hello.
>
> On 2/7/2015 3:39 PM, Robert Jarzmik wrote:
>> +		stuart: uart@40700000 {
>> +			clocks = <&pxa2xx_clks CLK_STUART>;
>> +		};
>> +
>
>    The ePAPR standard tells to call such nodes "serial", not "uart".
Good to know, but not for this patch.

The naming is coming from pxa2xx.dtsi. And you're very welcome to post a patch
to fix that ;)

Cheers.

-- 
Robert
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH v3 2/5] ARM: dts: pxa: add clocks
       [not found]             ` <87a90p9815.fsf-GANU6spQydw@public.gmane.org>
@ 2015-02-07 17:30               ` Sergei Shtylyov
  2015-02-09 19:56                 ` Robert Jarzmik
  0 siblings, 1 reply; 9+ messages in thread
From: Sergei Shtylyov @ 2015-02-07 17:30 UTC (permalink / raw)
  To: Robert Jarzmik
  Cc: Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
	Dmitry Eremin-Solenikov, devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

Hello.

On 02/07/2015 04:16 PM, Robert Jarzmik wrote:

>>> +		stuart: uart@40700000 {
>>> +			clocks = <&pxa2xx_clks CLK_STUART>;
>>> +		};
>>> +

>>     The ePAPR standard tells to call such nodes "serial", not "uart".

> Good to know, but not for this patch.

> The naming is coming from pxa2xx.dtsi.

    Ah, I was wondering why the node descriptions included only one prop.

 > And you're very welcome to post a patch to fix that ;)

    In my copious free time... :-)

> Cheers.

WBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH v3 2/5] ARM: dts: pxa: add clocks
  2015-02-07 17:30               ` Sergei Shtylyov
@ 2015-02-09 19:56                 ` Robert Jarzmik
  0 siblings, 0 replies; 9+ messages in thread
From: Robert Jarzmik @ 2015-02-09 19:56 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
	Dmitry Eremin-Solenikov, devicetree, linux-arm-kernel,
	linux-kernel

> +		ffuart: uart@40100000 {
> +			clocks = <&pxa2xx_clks CLK_FFUART>;
> +		};
> +

After another thought about your "one line" node, I think this can be even
improved, so that :
 - uart clocks are put into pxa2xx.dtsi instead of pxa27x.dtsi
 - replace all pxa2xx_clks by clks
 - let pxa27x.dtsi, pxa3xx.dtsi declare the clks label

This way we'll have :
 - pxa2xx.dtsi
		ffuart: uart@40100000 {
                        compatible = ...
                        ...
			clocks = <&clks CLK_FFUART>;
		};
 - pxa27x.dtsi
                clks: pxa2xx_clks@41300004 {
                        compatible = "marvell,pxa270-clocks";
                        #clock-cells = <1>;
                        status = "okay";
                };
 - pxa3xx.dtsi
                clks: pxa3xx_clks@41300004 {
                        compatible = "marvell,pxa300-clocks";
                        #clock-cells = <1>;
                        status = "okay";
                };

Cheers.

-- 
Robert

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

end of thread, other threads:[~2015-02-09 19:56 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-07 12:39 [PATCH v3 1/5] ARM: dts: pxa: add pwri2c to pxa device-tree Robert Jarzmik
     [not found] ` <1423312760-15871-1-git-send-email-robert.jarzmik-GANU6spQydw@public.gmane.org>
2015-02-07 12:39   ` [PATCH v3 2/5] ARM: dts: pxa: add clocks Robert Jarzmik
     [not found]     ` <1423312760-15871-2-git-send-email-robert.jarzmik-GANU6spQydw@public.gmane.org>
2015-02-07 12:56       ` Sergei Shtylyov
     [not found]         ` <54D60B79.5060206-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>
2015-02-07 13:16           ` Robert Jarzmik
     [not found]             ` <87a90p9815.fsf-GANU6spQydw@public.gmane.org>
2015-02-07 17:30               ` Sergei Shtylyov
2015-02-09 19:56                 ` Robert Jarzmik
2015-02-07 12:39 ` [PATCH v3 3/5] ARM: dts: pxa: add pxa27x-udc to pxa27x Robert Jarzmik
2015-02-07 12:39 ` [PATCH v3 4/5] ARM: dts: pxa: add pxa27x-keypad " Robert Jarzmik
2015-02-07 12:39 ` [PATCH v3 5/5] ARM: dts: pxa: add pxa-timer " Robert Jarzmik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).