[U-Boot] [PATCH 1/2] mmc: sunxi: Support cd-inverted DT property

Maxime Ripard maxime.ripard at free-electrons.com
Thu Dec 21 15:49:39 UTC 2017


On Thu, Dec 21, 2017 at 04:09:46PM +0200, Tuomas Tynkkynen wrote:
> On Thu, 2017-12-21 at 14:09 +0100, Maxime Ripard wrote:
> 
> > >  		sunxi_gpio_set_pull(cd_pin, SUNXI_GPIO_PULL_UP);
> > >  	}
> > >  
> > > So: if the DT specifies GPIO_ACTIVE_LOW, dm_gpio_get_value()
> > > does its own inversion of the GPIO level. Then, on top of that
> > > we do another inversion if the "cd-inverted" property was
> > > specified.
> > > This matches what the Linux MMC driver does.
> > 
> > Hmmm, right.
> > 
> > I guess in your particular case then, you'd be better off droping the
> > cd-inverted property. Like I said, it's really legacy these days.
> > That
> > of course doesn't prevent the rest of the patch to go in.
> 
> Yes, getting rid of the cd-inverted properties from the DTs should make
> card detection work without any code changes. So the plan of action
> will be:
> 
> - Drop cd-inverted from U-Boot's sun7i-a20-pcduino3.dts
> - Flip the GPIO_ACTIVE_* around + drop cd-inverted from Linux DTs
> - Re-sync DTs from Linux to U-Boot
> - Finally switch all sunxi boards to DM_MMC in U-Boot

Looks good to me :)

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171221/395bf245/attachment.sig>


More information about the U-Boot mailing list