Re: [PATCH v2 1/2] arm64: dts: renesas: r8a77970: add I2C support

2018-03-01 Thread Simon Horman
On Wed, Feb 28, 2018 at 11:56:27AM +0100, Geert Uytterhoeven wrote:
> On Mon, Feb 26, 2018 at 9:54 PM, Sergei Shtylyov
>  wrote:
> > Define the generic R8A77970 parts of the I2C[0-4] device node.
> >
> > Based on the original (and large) patch by Daisuke Matsushita
> > .
> >
> > Signed-off-by: Vladimir Barinov 
> > Signed-off-by: Sergei Shtylyov 
> >
> > ---
> > Changes in version 2:
> > - made  use of  the SYSC power domain #define's;
> > - moved the I2C nodes before HSCIF nodes.
> 
> auto-repeat below...
> 
> >  arch/arm64/boot/dts/renesas/r8a77970.dtsi |   88 
> > ++
> >  1 file changed, 88 insertions(+)
> >
> > Index: renesas/arch/arm64/boot/dts/renesas/r8a77970.dtsi
> > ===
> > --- renesas.orig/arch/arm64/boot/dts/renesas/r8a77970.dtsi
> > +++ renesas/arch/arm64/boot/dts/renesas/r8a77970.dtsi
> > @@ -19,6 +19,14 @@
> > #address-cells = <2>;
> > #size-cells = <2>;
> >
> > +   aliases {
> > +   i2c0 = 
> > +   i2c1 = 
> > +   i2c2 = 
> > +   i2c3 = 
> > +   i2c4 = 
> > +   };
> > +
> > psci {
> > compatible = "arm,psci-1.0", "arm,psci-0.2";
> > method = "smc";
> > @@ -338,6 +346,86 @@
> ><_ds1 22>, <_ds1 23>;
> > };
> >
> > +   i2c0: i2c@e650 {
> > +   compatible = "renesas,i2c-r8a77970",
> > +"renesas,rcar-gen3-i2c";
> > +   reg = <0 0xe650 0 0x40>;
> > +   interrupts = ;
> > +   clocks = < CPG_MOD 931>;
> > +   power-domains = < R8A77970_PD_ALWAYS_ON>;
> > +   resets = < 931>;
> > +   dmas = < 0x91>, < 0x90>;
> 
> Can't all five i2c interfaces be used with both dmac1 and dmac2?
> 
> With that fixed:
> Reviewed-by: Geert Uytterhoeven 

Sergei, please address this review and repost as appropriate.


[PATCH v2 1/2] arm64: dts: renesas: r8a77970: add I2C support

2018-02-26 Thread Sergei Shtylyov
Define the generic R8A77970 parts of the I2C[0-4] device node.

Based on the original (and large) patch by Daisuke Matsushita
.

Signed-off-by: Vladimir Barinov 
Signed-off-by: Sergei Shtylyov 

---
Changes in version 2:
- made  use of  the SYSC power domain #define's;
- moved the I2C nodes before HSCIF nodes.

 arch/arm64/boot/dts/renesas/r8a77970.dtsi |   88 ++
 1 file changed, 88 insertions(+)

Index: renesas/arch/arm64/boot/dts/renesas/r8a77970.dtsi
===
--- renesas.orig/arch/arm64/boot/dts/renesas/r8a77970.dtsi
+++ renesas/arch/arm64/boot/dts/renesas/r8a77970.dtsi
@@ -19,6 +19,14 @@
#address-cells = <2>;
#size-cells = <2>;
 
+   aliases {
+   i2c0 = 
+   i2c1 = 
+   i2c2 = 
+   i2c3 = 
+   i2c4 = 
+   };
+
psci {
compatible = "arm,psci-1.0", "arm,psci-0.2";
method = "smc";
@@ -338,6 +346,86 @@
   <_ds1 22>, <_ds1 23>;
};
 
+   i2c0: i2c@e650 {
+   compatible = "renesas,i2c-r8a77970",
+"renesas,rcar-gen3-i2c";
+   reg = <0 0xe650 0 0x40>;
+   interrupts = ;
+   clocks = < CPG_MOD 931>;
+   power-domains = < R8A77970_PD_ALWAYS_ON>;
+   resets = < 931>;
+   dmas = < 0x91>, < 0x90>;
+   dma-names = "tx", "rx";
+   i2c-scl-internal-delay-ns = <6>;
+   #address-cells = <1>;
+   #size-cells = <0>;
+   status = "disabled";
+   };
+
+   i2c1: i2c@e6508000 {
+   compatible = "renesas,i2c-r8a77970",
+"renesas,rcar-gen3-i2c";
+   reg = <0 0xe6508000 0 0x40>;
+   interrupts = ;
+   clocks = < CPG_MOD 930>;
+   power-domains = < R8A77970_PD_ALWAYS_ON>;
+   resets = < 930>;
+   dmas = < 0x93>, < 0x92>;
+   dma-names = "tx", "rx";
+   i2c-scl-internal-delay-ns = <6>;
+   #address-cells = <1>;
+   #size-cells = <0>;
+   status = "disabled";
+   };
+
+   i2c2: i2c@e651 {
+   compatible = "renesas,i2c-r8a77970",
+"renesas,rcar-gen3-i2c";
+   reg = <0 0xe651 0 0x40>;
+   interrupts = ;
+   clocks = < CPG_MOD 929>;
+   power-domains = < R8A77970_PD_ALWAYS_ON>;
+   resets = < 929>;
+   dmas = < 0x95>, < 0x94>;
+   dma-names = "tx", "rx";
+   i2c-scl-internal-delay-ns = <6>;
+   #address-cells = <1>;
+   #size-cells = <0>;
+   status = "disabled";
+   };
+
+   i2c3: i2c@e66d {
+   compatible = "renesas,i2c-r8a77970",
+"renesas,rcar-gen3-i2c";
+   reg = <0 0xe66d 0 0x40>;
+   interrupts = ;
+   clocks = < CPG_MOD 928>;
+   power-domains = < R8A77970_PD_ALWAYS_ON>;
+   resets = < 928>;
+   dmas = < 0x97>, < 0x96>;
+   dma-names = "tx", "rx";
+   i2c-scl-internal-delay-ns = <6>;
+   #address-cells = <1>;
+   #size-cells = <0>;
+   status = "disabled";
+   };
+
+   i2c4: i2c@e66d8000 {
+   compatible = "renesas,i2c-r8a77970",
+"renesas,rcar-gen3-i2c";
+   reg = <0 0xe66d8000 0 0x40>;
+   interrupts = ;
+   clocks = < CPG_MOD 927>;
+   power-domains = < R8A77970_PD_ALWAYS_ON>;
+   resets = < 927>;
+   dmas = < 0x99>, < 0x98>;
+   dma-names = "tx", "rx";
+   i2c-scl-internal-delay-ns = <6>;
+   #address-cells = <1>;
+   #size-cells = <0>;
+   status = "disabled";
+   };
+
hscif0: serial@e654 {
compatible = "renesas,hscif-r8a77970",
 "renesas,rcar-gen3-hscif",