RE: [PATCH 1/4] dt-bindings: mmc: renesas_sdhi: Add r8a77470 support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Geert,

> Subject: Re: [PATCH 1/4] dt-bindings: mmc: renesas_sdhi: Add r8a77470 support
>
> Hi Fabrizio,
>
> On Mon, Sep 24, 2018 at 8:34 PM Fabrizio Castro
> <fabrizio.castro@xxxxxxxxxxxxxx> wrote:
> > > Subject: Re: [PATCH 1/4] dt-bindings: mmc: renesas_sdhi: Add r8a77470 support
> > > On Fri, Sep 21, 2018 at 1:55 PM Fabrizio Castro
> > > <fabrizio.castro@xxxxxxxxxxxxxx> wrote:
> > > > Document SDHI support for the RZ/G1C (a.k.a. R8A77470) SoC.
> > > >
> > > > Signed-off-by: Fabrizio Castro <fabrizio.castro@xxxxxxxxxxxxxx>
> > > > Reviewed-by: Biju Das <biju.das@xxxxxxxxxxxxxx>
>
> > > > --- a/Documentation/devicetree/bindings/mmc/tmio_mmc.txt
> > > > +++ b/Documentation/devicetree/bindings/mmc/tmio_mmc.txt
> > > > @@ -17,6 +17,7 @@ Required properties:
> > > >                 "renesas,sdhi-r8a7740" - SDHI IP on R8A7740 SoC
> > > >                 "renesas,sdhi-r8a7743" - SDHI IP on R8A7743 SoC
> > > >                 "renesas,sdhi-r8a7745" - SDHI IP on R8A7745 SoC
> > > > +               "renesas,sdhi-r8a77470" - SDHI IP on R8A77470 SoC
> > > >                 "renesas,sdhi-r8a7778" - SDHI IP on R8A7778 SoC
> > > >                 "renesas,sdhi-r8a7779" - SDHI IP on R8A7779 SoC
> > > >                 "renesas,sdhi-r8a7790" - SDHI IP on R8A7790 SoC
> > >
> > > It seems RZ/G1C has two slighty different types of SD card interfaces:
> > >   1. SDHI0 and SDHI2 use SYS-DMAC,
> > >   2. SDHI1 can also be used as an MMC interface, and has an internal DMAC.
> > >
> > > Do we need to distinguish between them using the compatible value, or
> > > are there other ways?
> >
> > The most sensible thing to do here is probably to distinguish between them using
> > the compatible value, we were thinking about using the following for SDHI1:
> > compatible = "renesas,sdhi-mmc-r8a77470", "renesas,rcar-gen3-sdhi";
> >
> > What do you guys think?
>
> Oh, so it's identical (or "sufficiently compatible") with the SD card
> interface on R-Car Gen3?

It seems identical to R-Car Gen3. I have done proper testing now and everything
seems to be working as expected.

> "renesas,sdhi-mmc-r8a77470" may be a good way to distinguish.
> I'm a bit reluctant to add "renesas,rcar-gen3-sdhi", though.

We could just use "renesas,sdhi-mmc-r8a77470" for SDHI1 and "renesas,sdhi- r8a77470"
for SDHI0 and SDHI2 then, without generic compatible strings, or maybe we could
use "renesas,rcar-gen2-sdhi" for both even though that would be incorrect as per the
current implementation of the drivers.

Today I have given some thought on how to distinguish the two types of IP from the
two different drivers without having driver specific compatible strings, and unfortunately
we would still need to take into account some information coming from the device tree
(like the memory address of the interface) in order to decide if we need to fail the probing.
I can't use the VERSION register to make any decision as to read the registers in a meaningful
way we still need to know bus_shift, and then the DMA properties are optional, therefore
using different compatible strings for the two types of IP still feels like the best option to me.

I am dropping all of the patches from this series and I am going to send another version
to address the comments on the implementation of r8a77470_pin_to_pocctrl, but also
to address both SD card and eMMC, so that we can reason about what's the best thing to do
by looking at the implementation of a working example.

Cheers,
Fab

>
> Gr{oetje,eeting}s,
>
>                         Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx
>
> 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



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




[Index of Archives]     [Linux Memonry Technology]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux