Re: [PATCH v2 2/2] devicetree bindings mmc Add bindings doc for Sunplus SP7021

From: Rob Herring
Date: Tue Jan 04 2022 - 15:31:48 EST


On Tue, Nov 30, 2021 at 7:59 PM Lh Kuo 郭力豪 <lh.Kuo@xxxxxxxxxxx> wrote:
>
> > > > > +properties:
> > > > > + compatible:
> > > > > + enum:
> > > > > + - sunplus,sp7021-card1
> > > > > + - sunplus,sp7021-sdio
> > > >
> > > > What's the difference between these 2 blocks?
> > > >
> > >
> > > One for SD card One for SDIO
> >
> > If the programming model is the same, then it should be the same compatible string. We have various
> > properties to handle differences like bus width, card detect or not, etc.
> >
>
> SDIO and SDCARD still need to set the date and CMD decoding differences.

I still don't understand. A host controller should be able to
initialize a card enough to tell what kind it is. And we have things
defined in DT like 'no-sd' and 'no-mmc'.

Looking at the driver, the difference appears to be just setting a
register to the mode (eMMC/SD/SDIO). That's not a difference in the
h/w block which is when different compatibles would be appropriate. A
property, if anything, is the right thing to do here.

Rob