Re: [PATCH 1/4] dt-bindings: i2c: rcar: Add r8a77470 support

2018-09-30 Thread Wolfram Sang
On Fri, Sep 21, 2018 at 06:36:58PM +0100, Fabrizio Castro wrote:
> Although the I2C IP found in the RZ/G1C is not exactly the same
> as the one found in the R-Car Gen2 family or R-Car Gen3 family,
> it can still be considered as compatible with R-Car Gen2 from
> a software perpective.
> This patch therefore documents the SoC specific compatible string,
> and the compatibility with Gen2 fallback is retained.
> 
> Signed-off-by: Fabrizio Castro 
> Reviewed-by: Biju Das 

Applied to for-next, thanks!



signature.asc
Description: PGP signature


RE: [PATCH 1/4] dt-bindings: i2c: rcar: Add r8a77470 support

2018-09-24 Thread Fabrizio Castro
Hello Wolfram,

> Subject: Re: [PATCH 1/4] dt-bindings: i2c: rcar: Add r8a77470 support
>
>
> > > It seems to me that the RZ/G1C has some extra registers described
> > > for I2C when compared with both other RZ/G1 and R-Car Gen2 SoCs.
> >
> > Exactly. The extra registers found with the RZ/G1C I2C controller are
> > also found in R-Car Gen3, but the driver doesn't handle them. R-Car
> > Gen3 has more registers on top of those found with the RZ/G1C.
>
> I don't have he RZ documentation yet, could you name which ones are Gen3
> only?

ICDMAER and ICFBSCR are the registers found in R-Car Gen3 but not in RZ/G1C.

Thanks,
Fab




Renesas Electronics Europe Ltd, Dukes Meadow, Millboard Road, Bourne End, 
Buckinghamshire, SL8 5FH, UK. Registered in England & Wales under Registered 
No. 04586709.


Re: [PATCH 1/4] dt-bindings: i2c: rcar: Add r8a77470 support

2018-09-24 Thread Geert Uytterhoeven
Hi Wolfram,

On Mon, Sep 24, 2018 at 5:52 PM Wolfram Sang  wrote:
> > > It seems to me that the RZ/G1C has some extra registers described
> > > for I2C when compared with both other RZ/G1 and R-Car Gen2 SoCs.
> >
> > Exactly. The extra registers found with the RZ/G1C I2C controller are
> > also found in R-Car Gen3, but the driver doesn't handle them. R-Car
> > Gen3 has more registers on top of those found with the RZ/G1C.
>
> I don't have he RZ documentation yet, could you name which ones are Gen3
> only?

https://www.renesas.com/eu/en/search/keyword-search.html#q=RZ%2FG1

Gr{oetje,eeting}s,

Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds


Re: [PATCH 1/4] dt-bindings: i2c: rcar: Add r8a77470 support

2018-09-24 Thread Wolfram Sang

> > It seems to me that the RZ/G1C has some extra registers described
> > for I2C when compared with both other RZ/G1 and R-Car Gen2 SoCs.
> 
> Exactly. The extra registers found with the RZ/G1C I2C controller are
> also found in R-Car Gen3, but the driver doesn't handle them. R-Car
> Gen3 has more registers on top of those found with the RZ/G1C.

I don't have he RZ documentation yet, could you name which ones are Gen3
only?



signature.asc
Description: PGP signature


Re: [PATCH 1/4] dt-bindings: i2c: rcar: Add r8a77470 support

2018-09-24 Thread Simon Horman
On Mon, Sep 24, 2018 at 09:10:53AM +, Fabrizio Castro wrote:
> Hello Simon,
> 
> Thank you for the feedback.
> 
> > Subject: Re: [PATCH 1/4] dt-bindings: i2c: rcar: Add r8a77470 support
> >
> > On Fri, Sep 21, 2018 at 06:36:58PM +0100, Fabrizio Castro wrote:
> > > Although the I2C IP found in the RZ/G1C is not exactly the same
> > > as the one found in the R-Car Gen2 family or R-Car Gen3 family,
> > > it can still be considered as compatible with R-Car Gen2 from
> > > a software perpective.
> > > This patch therefore documents the SoC specific compatible string,
> > > and the compatibility with Gen2 fallback is retained.
> > >
> > > Signed-off-by: Fabrizio Castro 
> > > Reviewed-by: Biju Das 
> > > ---
> > >  Documentation/devicetree/bindings/i2c/i2c-rcar.txt | 1 +
> > >  1 file changed, 1 insertion(+)
> > >
> > > diff --git a/Documentation/devicetree/bindings/i2c/i2c-rcar.txt 
> > > b/Documentation/devicetree/bindings/i2c/i2c-rcar.txt
> > > index 39cd21d..671e2a1 100644
> > > --- a/Documentation/devicetree/bindings/i2c/i2c-rcar.txt
> > > +++ b/Documentation/devicetree/bindings/i2c/i2c-rcar.txt
> > > @@ -4,6 +4,7 @@ Required properties:
> > >  - compatible:
> > >  "renesas,i2c-r8a7743" if the device is a part of a R8A7743 SoC.
> > >  "renesas,i2c-r8a7745" if the device is a part of a R8A7745 SoC.
> > > +"renesas,i2c-r8a77470" if the device is a part of a R8A77470 SoC.
> >
> > It seems to me that the RZ/G1C has some extra registers described for
> > I2C when compared with both other RZ/G1 and R-Car Gen2 SoCs.
> 
> Exactly. The extra registers found with the RZ/G1C I2C controller are also 
> found in R-Car Gen3,
> but the driver doesn't handle them. R-Car Gen3 has more registers on top of 
> those found
> with the RZ/G1C.
> 
> >
> > Am I correct in assuming that operation is correct for the RZ/G1C
> > when using the fallback compat string for RZ/G1 and R-Car Gen2 SoCs?
> 
> Since the driver is not using ICCCR2, ICMPR, ICHPR, and ICLPR, what's left is 
> compatible
> with R-Car Gen2.
> I have tested I2C4 on its own and with the HDMI transmitter found on the 
> iwg23s, and
> so far so good.
> 
> >
> > And that, speculating wildly, in future it may be possible for
> > the driver to use these extra resgisters, f.e. by via a match on
> > the renesas,i2c-r8a77470 compat string?
> 
> Exactly. If anybody ever looks into supporting the missing functionality the 
> SoC
> specific string could be used to pick up better driver support (although Gen2
> support would probably still be alright).
> 
> I hope this clarifies things a little bit better.

Thanks, it helps a lot.


RE: [PATCH 1/4] dt-bindings: i2c: rcar: Add r8a77470 support

2018-09-24 Thread Fabrizio Castro
Hello Simon,

Thank you for the feedback.

> Subject: Re: [PATCH 1/4] dt-bindings: i2c: rcar: Add r8a77470 support
>
> On Fri, Sep 21, 2018 at 06:36:58PM +0100, Fabrizio Castro wrote:
> > Although the I2C IP found in the RZ/G1C is not exactly the same
> > as the one found in the R-Car Gen2 family or R-Car Gen3 family,
> > it can still be considered as compatible with R-Car Gen2 from
> > a software perpective.
> > This patch therefore documents the SoC specific compatible string,
> > and the compatibility with Gen2 fallback is retained.
> >
> > Signed-off-by: Fabrizio Castro 
> > Reviewed-by: Biju Das 
> > ---
> >  Documentation/devicetree/bindings/i2c/i2c-rcar.txt | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/Documentation/devicetree/bindings/i2c/i2c-rcar.txt 
> > b/Documentation/devicetree/bindings/i2c/i2c-rcar.txt
> > index 39cd21d..671e2a1 100644
> > --- a/Documentation/devicetree/bindings/i2c/i2c-rcar.txt
> > +++ b/Documentation/devicetree/bindings/i2c/i2c-rcar.txt
> > @@ -4,6 +4,7 @@ Required properties:
> >  - compatible:
> >  "renesas,i2c-r8a7743" if the device is a part of a R8A7743 SoC.
> >  "renesas,i2c-r8a7745" if the device is a part of a R8A7745 SoC.
> > +"renesas,i2c-r8a77470" if the device is a part of a R8A77470 SoC.
>
> It seems to me that the RZ/G1C has some extra registers described for
> I2C when compared with both other RZ/G1 and R-Car Gen2 SoCs.

Exactly. The extra registers found with the RZ/G1C I2C controller are also 
found in R-Car Gen3,
but the driver doesn't handle them. R-Car Gen3 has more registers on top of 
those found
with the RZ/G1C.

>
> Am I correct in assuming that operation is correct for the RZ/G1C
> when using the fallback compat string for RZ/G1 and R-Car Gen2 SoCs?

Since the driver is not using ICCCR2, ICMPR, ICHPR, and ICLPR, what's left is 
compatible
with R-Car Gen2.
I have tested I2C4 on its own and with the HDMI transmitter found on the 
iwg23s, and
so far so good.

>
> And that, speculating wildly, in future it may be possible for
> the driver to use these extra resgisters, f.e. by via a match on
> the renesas,i2c-r8a77470 compat string?

Exactly. If anybody ever looks into supporting the missing functionality the SoC
specific string could be used to pick up better driver support (although Gen2
support would probably still be alright).

I hope this clarifies things a little bit better.

Thanks,
Fab

>
> >  "renesas,i2c-r8a774a1" if the device is a part of a R8A774A1 SoC.
> >  "renesas,i2c-r8a7778" if the device is a part of a R8A7778 SoC.
> >  "renesas,i2c-r8a7779" if the device is a part of a R8A7779 SoC.
> > --
> > 2.7.4
> >



Renesas Electronics Europe Ltd, Dukes Meadow, Millboard Road, Bourne End, 
Buckinghamshire, SL8 5FH, UK. Registered in England & Wales under Registered 
No. 04586709.


Re: [PATCH 1/4] dt-bindings: i2c: rcar: Add r8a77470 support

2018-09-24 Thread Simon Horman
On Fri, Sep 21, 2018 at 06:36:58PM +0100, Fabrizio Castro wrote:
> Although the I2C IP found in the RZ/G1C is not exactly the same
> as the one found in the R-Car Gen2 family or R-Car Gen3 family,
> it can still be considered as compatible with R-Car Gen2 from
> a software perpective.
> This patch therefore documents the SoC specific compatible string,
> and the compatibility with Gen2 fallback is retained.
> 
> Signed-off-by: Fabrizio Castro 
> Reviewed-by: Biju Das 
> ---
>  Documentation/devicetree/bindings/i2c/i2c-rcar.txt | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/Documentation/devicetree/bindings/i2c/i2c-rcar.txt 
> b/Documentation/devicetree/bindings/i2c/i2c-rcar.txt
> index 39cd21d..671e2a1 100644
> --- a/Documentation/devicetree/bindings/i2c/i2c-rcar.txt
> +++ b/Documentation/devicetree/bindings/i2c/i2c-rcar.txt
> @@ -4,6 +4,7 @@ Required properties:
>  - compatible:
>   "renesas,i2c-r8a7743" if the device is a part of a R8A7743 SoC.
>   "renesas,i2c-r8a7745" if the device is a part of a R8A7745 SoC.
> + "renesas,i2c-r8a77470" if the device is a part of a R8A77470 SoC.

It seems to me that the RZ/G1C has some extra registers described for
I2C when compared with both other RZ/G1 and R-Car Gen2 SoCs.

Am I correct in assuming that operation is correct for the RZ/G1C
when using the fallback compat string for RZ/G1 and R-Car Gen2 SoCs?

And that, speculating wildly, in future it may be possible for
the driver to use these extra resgisters, f.e. by via a match on
the renesas,i2c-r8a77470 compat string?

>   "renesas,i2c-r8a774a1" if the device is a part of a R8A774A1 SoC.
>   "renesas,i2c-r8a7778" if the device is a part of a R8A7778 SoC.
>   "renesas,i2c-r8a7779" if the device is a part of a R8A7779 SoC.
> -- 
> 2.7.4
>