diff mbox

[v3,2/5] ARM: dts: pxa: add clocks

Message ID 1423312760-15871-2-git-send-email-robert.jarzmik@free.fr (mailing list archive)
State New, archived
Headers show

Commit Message

Robert Jarzmik Feb. 7, 2015, 12:39 p.m. UTC
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@free.fr>
---
 arch/arm/boot/dts/pxa27x.dtsi | 31 ++++++++++++++++++++++++++++---
 1 file changed, 28 insertions(+), 3 deletions(-)

Comments

Sergei Shtylyov Feb. 7, 2015, 12:56 p.m. UTC | #1
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@free.fr>
> ---
>   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
Robert Jarzmik Feb. 7, 2015, 1:16 p.m. UTC | #2
Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> 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.
Sergei Shtylyov Feb. 7, 2015, 5:30 p.m. UTC | #3
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
Robert Jarzmik Feb. 9, 2015, 7:56 p.m. UTC | #4
> +		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.
diff mbox

Patch

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";
 		};
 	};
-
 };