linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: shmobile: r8a7790: add i2c[0-3] clocks
@ 2014-01-17 15:54 Ben Dooks
  2014-01-19 11:03 ` Laurent Pinchart
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Ben Dooks @ 2014-01-17 15:54 UTC (permalink / raw)
  To: linux-sh

Add the necessary clocks for i2c0 to i2c3 into the mstp3 clock node. This
is a pre-cursor to adding the i2c devices themslves.

Cc: Simon Horman <horms+renesas@verge.net.au>
Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
---
 arch/arm/boot/dts/r8a7790.dtsi | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi
index ac16214..aa91f4a 100644
--- a/arch/arm/boot/dts/r8a7790.dtsi
+++ b/arch/arm/boot/dts/r8a7790.dtsi
@@ -697,16 +697,19 @@
 			reg = <0 0xe615013c 0 4>, <0 0xe6150048 0 4>;
 			clocks = <&cp_clk>, <&mmc1_clk>, <&sd3_clk>, <&sd2_clk>,
 				 <&cpg_clocks R8A7790_CLK_SD1>, <&cpg_clocks R8A7790_CLK_SD0>,
-				 <&mmc0_clk>, <&rclk_clk>;
+				 <&mmc0_clk>, <&rclk_clk>, <&p_clk>, <&p_clk>, <&p_clk>,<&p_clk>;
 			#clock-cells = <1>;
 			renesas,clock-indices = <
 				R8A7790_CLK_TPU0 R8A7790_CLK_MMCIF1 R8A7790_CLK_SDHI3
 				R8A7790_CLK_SDHI2 R8A7790_CLK_SDHI1 R8A7790_CLK_SDHI0
 				R8A7790_CLK_MMCIF0 R8A7790_CLK_CMT1
+				R8A7790_CLK_I2C3 R8A7790_CLK_I2C2
+				R8A7790_CLK_I2C1 R8A7790_CLK_I2C0
 			>;
 			clock-output-names  				"tpu0", "mmcif1", "sdhi3", "sdhi2",
-				"sdhi1", "sdhi0", "mmcif0", "cmt1";
+				"sdhi1", "sdhi0", "mmcif0", "cmt1",
+				"i2c3", "i2c2", "i2c1", "i2c0";
 		};
 		mstp5_clks: mstp5_clks@e6150144 {
 			compatible = "renesas,r8a7790-mstp-clocks", "renesas,cpg-mstp-clocks";
-- 
1.8.5.2


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

* Re: [PATCH] ARM: shmobile: r8a7790: add i2c[0-3] clocks
  2014-01-17 15:54 [PATCH] ARM: shmobile: r8a7790: add i2c[0-3] clocks Ben Dooks
@ 2014-01-19 11:03 ` Laurent Pinchart
  2014-01-20 10:51 ` Ben Dooks
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Laurent Pinchart @ 2014-01-19 11:03 UTC (permalink / raw)
  To: linux-sh

Hi Ben,

Thank you for the patch.

On Friday 17 January 2014 15:54:42 Ben Dooks wrote:
> Add the necessary clocks for i2c0 to i2c3 into the mstp3 clock node. This
> is a pre-cursor to adding the i2c devices themslves.

According to the R8A7790 datasheet the I2C MSTP clocks are handled by MSTP9, 
not MSTP3, and they're already declared in the MSTP9 DT node.

> Cc: Simon Horman <horms+renesas@verge.net.au>
> Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
> ---
>  arch/arm/boot/dts/r8a7790.dtsi | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi
> index ac16214..aa91f4a 100644
> --- a/arch/arm/boot/dts/r8a7790.dtsi
> +++ b/arch/arm/boot/dts/r8a7790.dtsi
> @@ -697,16 +697,19 @@
>  			reg = <0 0xe615013c 0 4>, <0 0xe6150048 0 4>;
>  			clocks = <&cp_clk>, <&mmc1_clk>, <&sd3_clk>, <&sd2_clk>,
>  				 <&cpg_clocks R8A7790_CLK_SD1>, <&cpg_clocks 
R8A7790_CLK_SD0>,
> -				 <&mmc0_clk>, <&rclk_clk>;
> +				 <&mmc0_clk>, <&rclk_clk>, <&p_clk>, <&p_clk>, 
<&p_clk>,<&p_clk>;
>  			#clock-cells = <1>;
>  			renesas,clock-indices = <
>  				R8A7790_CLK_TPU0 R8A7790_CLK_MMCIF1 R8A7790_CLK_SDHI3
>  				R8A7790_CLK_SDHI2 R8A7790_CLK_SDHI1 R8A7790_CLK_SDHI0
>  				R8A7790_CLK_MMCIF0 R8A7790_CLK_CMT1
> +				R8A7790_CLK_I2C3 R8A7790_CLK_I2C2
> +				R8A7790_CLK_I2C1 R8A7790_CLK_I2C0
> 
>  			>;
> 
>  			clock-output-names >  				"tpu0", "mmcif1", "sdhi3", "sdhi2",
> -				"sdhi1", "sdhi0", "mmcif0", "cmt1";
> +				"sdhi1", "sdhi0", "mmcif0", "cmt1",
> +				"i2c3", "i2c2", "i2c1", "i2c0";
>  		};
>  		mstp5_clks: mstp5_clks@e6150144 {
>  			compatible = "renesas,r8a7790-mstp-clocks", "renesas,cpg-mstp-
clocks";
-- 
Regards,

Laurent Pinchart


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

* Re: [PATCH] ARM: shmobile: r8a7790: add i2c[0-3] clocks
  2014-01-17 15:54 [PATCH] ARM: shmobile: r8a7790: add i2c[0-3] clocks Ben Dooks
  2014-01-19 11:03 ` Laurent Pinchart
@ 2014-01-20 10:51 ` Ben Dooks
  2014-01-20 10:55 ` Laurent Pinchart
  2014-01-20 10:58 ` Ben Dooks
  3 siblings, 0 replies; 5+ messages in thread
From: Ben Dooks @ 2014-01-20 10:51 UTC (permalink / raw)
  To: linux-sh

On 19/01/14 11:03, Laurent Pinchart wrote:
> Hi Ben,
>
> Thank you for the patch.
>
> On Friday 17 January 2014 15:54:42 Ben Dooks wrote:
>> Add the necessary clocks for i2c0 to i2c3 into the mstp3 clock node. This
>> is a pre-cursor to adding the i2c devices themslves.
>
> According to the R8A7790 datasheet the I2C MSTP clocks are handled by MSTP9,
> not MSTP3, and they're already declared in the MSTP9 DT node.

Ah, the i2cX nodes themselves are wrong.

         i2c1: i2c@e6518000 {
                 #address-cells = <1>;
                 #size-cells = <0>;
                 compatible = "renesas,i2c-r8a7790";
                 reg = <0 0xe6518000 0 0x40>;
                 interrupt-parent = <&gic>;
                 interrupts = <0 288 IRQ_TYPE_LEVEL_HIGH>;
                 clocks = <&mstp3_clks R8A7790_CLK_I2C1>;
                 status = "disabled";
         };

-- 
Ben Dooks				http://www.codethink.co.uk/
Senior Engineer				Codethink - Providing Genius

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

* Re: [PATCH] ARM: shmobile: r8a7790: add i2c[0-3] clocks
  2014-01-17 15:54 [PATCH] ARM: shmobile: r8a7790: add i2c[0-3] clocks Ben Dooks
  2014-01-19 11:03 ` Laurent Pinchart
  2014-01-20 10:51 ` Ben Dooks
@ 2014-01-20 10:55 ` Laurent Pinchart
  2014-01-20 10:58 ` Ben Dooks
  3 siblings, 0 replies; 5+ messages in thread
From: Laurent Pinchart @ 2014-01-20 10:55 UTC (permalink / raw)
  To: linux-sh

Hi Ben,

On Monday 20 January 2014 10:51:28 Ben Dooks wrote:
> On 19/01/14 11:03, Laurent Pinchart wrote:
> > Hi Ben,
> > 
> > Thank you for the patch.
> > 
> > On Friday 17 January 2014 15:54:42 Ben Dooks wrote:
> >> Add the necessary clocks for i2c0 to i2c3 into the mstp3 clock node. This
> >> is a pre-cursor to adding the i2c devices themslves.
> > 
> > According to the R8A7790 datasheet the I2C MSTP clocks are handled by
> > MSTP9, not MSTP3, and they're already declared in the MSTP9 DT node.
> 
> Ah, the i2cX nodes themselves are wrong.
> 
>          i2c1: i2c@e6518000 {
>                  #address-cells = <1>;
>                  #size-cells = <0>;
>                  compatible = "renesas,i2c-r8a7790";
>                  reg = <0 0xe6518000 0 0x40>;
>                  interrupt-parent = <&gic>;
>                  interrupts = <0 288 IRQ_TYPE_LEVEL_HIGH>;
>                  clocks = <&mstp3_clks R8A7790_CLK_I2C1>;
>                  status = "disabled";
>          };

Indeed, my bad. Would you like to submit a patch to fix this, or should I do 
it ?

-- 
Regards,

Laurent Pinchart


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

* Re: [PATCH] ARM: shmobile: r8a7790: add i2c[0-3] clocks
  2014-01-17 15:54 [PATCH] ARM: shmobile: r8a7790: add i2c[0-3] clocks Ben Dooks
                   ` (2 preceding siblings ...)
  2014-01-20 10:55 ` Laurent Pinchart
@ 2014-01-20 10:58 ` Ben Dooks
  3 siblings, 0 replies; 5+ messages in thread
From: Ben Dooks @ 2014-01-20 10:58 UTC (permalink / raw)
  To: linux-sh

On 20/01/14 10:55, Laurent Pinchart wrote:
> Hi Ben,
>
> On Monday 20 January 2014 10:51:28 Ben Dooks wrote:
>> On 19/01/14 11:03, Laurent Pinchart wrote:
>>> Hi Ben,
>>>
>>> Thank you for the patch.
>>>
>>> On Friday 17 January 2014 15:54:42 Ben Dooks wrote:
>>>> Add the necessary clocks for i2c0 to i2c3 into the mstp3 clock node. This
>>>> is a pre-cursor to adding the i2c devices themslves.
>>>
>>> According to the R8A7790 datasheet the I2C MSTP clocks are handled by
>>> MSTP9, not MSTP3, and they're already declared in the MSTP9 DT node.
>>
>> Ah, the i2cX nodes themselves are wrong.
>>
>>           i2c1: i2c@e6518000 {
>>                   #address-cells = <1>;
>>                   #size-cells = <0>;
>>                   compatible = "renesas,i2c-r8a7790";
>>                   reg = <0 0xe6518000 0 0x40>;
>>                   interrupt-parent = <&gic>;
>>                   interrupts = <0 288 IRQ_TYPE_LEVEL_HIGH>;
>>                   clocks = <&mstp3_clks R8A7790_CLK_I2C1>;
>>                   status = "disabled";
>>           };
>
> Indeed, my bad. Would you like to submit a patch to fix this, or should I do
> it ?

I am just finishing up a patch.

-- 
Ben Dooks				http://www.codethink.co.uk/
Senior Engineer				Codethink - Providing Genius

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

end of thread, other threads:[~2014-01-20 10:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-17 15:54 [PATCH] ARM: shmobile: r8a7790: add i2c[0-3] clocks Ben Dooks
2014-01-19 11:03 ` Laurent Pinchart
2014-01-20 10:51 ` Ben Dooks
2014-01-20 10:55 ` Laurent Pinchart
2014-01-20 10:58 ` Ben Dooks

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