From: Tuomas Tynkkynen <tuomas@tuxera.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/2] mmc: sunxi: Support cd-inverted DT property
Date: Thu, 21 Dec 2017 16:09:46 +0200 [thread overview]
Message-ID: <1513865386.32354.10.camel@tuxera.com> (raw)
In-Reply-To: <20171221130916.lswqyibpzlt4liqz@flea.lan>
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
next prev parent reply other threads:[~2017-12-21 14:09 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-18 20:09 [U-Boot] [PATCH 1/2] mmc: sunxi: Support cd-inverted DT property Tuomas Tynkkynen
2017-12-18 20:09 ` [U-Boot] [PATCH 2/2] ARM: sunxi: Enable DM MMC+SATA for the PcDuino3 Nano board Tuomas Tynkkynen
2017-12-20 12:26 ` Maxime Ripard
2017-12-20 13:37 ` Tuomas Tynkkynen
2017-12-21 12:59 ` Maxime Ripard
2017-12-20 12:26 ` [U-Boot] [PATCH 1/2] mmc: sunxi: Support cd-inverted DT property Maxime Ripard
2017-12-20 13:34 ` Tuomas Tynkkynen
2017-12-21 13:09 ` Maxime Ripard
2017-12-21 14:09 ` Tuomas Tynkkynen [this message]
2017-12-21 15:49 ` Maxime Ripard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1513865386.32354.10.camel@tuxera.com \
--to=tuomas@tuxera.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox