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

Rob Herring
2022-01-04T20:31:46Z

On Tue, Nov 30, 2021 at 7:59 PM Lh Kuo 郭力豪 <lh.Kuo@sunplus.com> 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