çå: [PATCH] mmc: rtsx: Add SD Express mode support for RTS5261

From: åé
Date: Mon Apr 27 2020 - 23:44:57 EST


>
> On Mon, Apr 27, 2020 at 11:41 AM åé <rui_feng@xxxxxxxxxxxxxx> wrote:
> >
> >
> > > On Sun, Apr 26, 2020 at 09:25:46AM +0800, rui_feng@xxxxxxxxxxxxxx
> wrote:
> > > > From: Rui Feng <rui_feng@xxxxxxxxxxxxxx>
> > > >
> > > > RTS5261 support legacy SD mode and SD Express mode.
> > > > In SD7.x, SD association introduce SD Express as a new mode.
> > > > SD Express mode is distinguished by CMD8.
> > > > Therefore, CMD8 has new bit for SD Express.
> > > > SD Express is based on PCIe/NVMe.
> > > > RTS5261 uses CMD8 to switch to SD Express mode.
> > >
> > > So how does this bit work? They way I imagined SD Express to work
> > > is that the actual SD Card just shows up as a real PCIe device,
> > > similar to say Thunderbolt.
> >
> > New SD Express card has dual mode. One is SD mode and another is PCIe
> mode.
> > In PCIe mode, it act as a PCIe device and use PCIe protocol not Thunderbolt
> protocol.
>
> I think what Christoph was asking about is why you need to issue any
> commands at all in SD mode when you want to use PCIe mode instead. What
> happens if you load the NVMe dthriver before loading the rts5261 driver?
>
> Arnd
>
> ------Please consider the environment before printing this e-mail.

RTS5261 support SD mode and PCIe/NVMe mode. The workflow is as follows.
1.RTS5261 work in SD mode.
2.If card is plugged in, Host send CMD8 to ask card's PCIe availability.
3.If the card has PCIe availability, RTS5261 switch to PCIe/NVMe mode.
4.Mmc driver exit and NVMe driver start working.
5.If card is unplugged, RTS5261 will switch to SD mode.
We should send CMD8 in SD mode to ask card's PCIe availability, and the order of NVMe driver and rts5261 driver doesn't matter.