From: Peng Fan <peng.fan@oss.nxp.com>
To: Ye Li <ye.li@nxp.com>
Cc: jh80.chung@samsung.com, u-boot@lists.denx.de, peng.fan@nxp.com,
jonas@kwiboo.se, festevam@gmail.com, uboot-imx@nxp.com,
ye.li@oss.nxp.com
Subject: Re: [PATCH v2] power: regulator: Fix power on/off delay issue
Date: Mon, 25 May 2026 14:16:29 +0800 [thread overview]
Message-ID: <ahPpPfvVqPSR3fvl@shlinux89> (raw)
In-Reply-To: <20260522071414.1155344-1-ye.li@nxp.com>
On Fri, May 22, 2026 at 03:14:14PM +0800, Ye Li wrote:
>SD initialization failure happens with some UHS-I SD cards on
>iMX8MM/iMX93/iMX91 EVK after
>commit 4fcba5d556b4 ("regulator: implement basic reference counter").
>When sending operation condition to SD card, the OCR does not return
>correct status. The root cause is regulator on/off delay is missed
>in MMC power cycle with above commit, so SD card is not completely
>power off.
>
>When SD startup, the sequence of MMC power cycle is:
>mmc_power_init(get vmmc_supply dev) -> mmc_power_off -> udelay(2000)
>-> mmc_power_on
>
>Before above commit, as a fixed regulator, the GPIO is set as:
> GPIO inactive (in mmc_power_init) ->
> GPIO inactive and delay off-on-delay-us (in mmc_power_off) ->
> udelay(2000) ->
> GPIO active (in mmc_power_on)
>
>After the commit:
> GPIO inactive (in mmc_power_init) ->
> enable_count is 0, regulator_set_enable returns -EALREADY immediately,
> so GPIO is inactive but No off-on-delay-us (in mmc_power_off) ->
> udelay(2000) ->
> GPIO active (in mmc_power_on)
>
>Move the off-on-delay-us delay before setting GPIO active to fix the issue.
>
>Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
prev parent reply other threads:[~2026-05-25 6:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-22 7:14 [PATCH v2] power: regulator: Fix power on/off delay issue Ye Li
2026-05-25 6:16 ` Peng Fan [this message]
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=ahPpPfvVqPSR3fvl@shlinux89 \
--to=peng.fan@oss.nxp.com \
--cc=festevam@gmail.com \
--cc=jh80.chung@samsung.com \
--cc=jonas@kwiboo.se \
--cc=peng.fan@nxp.com \
--cc=u-boot@lists.denx.de \
--cc=uboot-imx@nxp.com \
--cc=ye.li@nxp.com \
--cc=ye.li@oss.nxp.com \
/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