[PATCH v1 2/2] x86: edison: Don't take SD card detect pin into consideration

Bin Meng bmeng.cn at gmail.com
Wed Oct 27 12:10:59 CEST 2021


On Wed, Oct 27, 2021 at 4:52 PM Andy Shevchenko
<andy.shevchenko at gmail.com> wrote:
>
> On Wed, Oct 27, 2021 at 5:57 AM Bin Meng <bmeng.cn at gmail.com> wrote:
> > On Sat, Oct 16, 2021 at 1:27 AM Andy Shevchenko
> > <andriy.shevchenko at linux.intel.com> wrote:
> > >
> > > There are two PCB designs in the wild which use the opposite
> > > signaling for SD card detect. This makes U-Boot working in one case
> > > and failing in the other. Quirk this out by disconnecting SD card
> > > detect pin from the PCB by switching to mode 3.
> > >
> > > BugLink: https://github.com/edison-fw/meta-intel-edison/issues/136
>
> ...
>
> > >         sdcard: mmc at ff3fa000 {
> > >                 compatible = "intel,sdhci-tangier";
> > >                 reg = <0xff3fa000 0x1000>;
> > > +               cd-inverted;
> >
> > So I wonder how sd card ever worked without the "cd-inverted" property?
>
> TL;DR: it worked on one PCB design and did not work on the other. When
> we disconnect the pin the read value is always the same and inverted
> to what we expected in the code.

Great. That explains. Although I read the below comments a couple of
times, it just did not come to my head that "when we disconnect the
pin the read value is always the same and inverted to what we expected
in the code."

>
> Have you read the commit message and the comment below? Have you read
> the bug report?

Yes, but it's not crystal clear hence the ask. So maybe we can update
the comments to make such clearer?

>
> > > +               /*
> > > +                * Disconnect SD card detect, so it won't affect the reality
> > > +                * on two different PCB designs where it's using the opposite
> > > +                * signaling: Edison/Arduino uses Active Low, while SparkFun
> > > +                * went with Active High.
> > > +                */

FWIW,
Reviewed-by: Bin Meng <bmeng.cn at gmail.com>

Regards,
Bin


More information about the U-Boot mailing list