From: Jerome Brunet <jbrunet@baylibre.com>
To: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: Anand Moon <linux.amoon@gmail.com>, Da Xue <da@libre.computer>,
Ulf Hansson <ulf.hansson@linaro.org>,
Neil Armstrong <neil.armstrong@linaro.org>,
Kevin Hilman <khilman@baylibre.com>,
linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC] mmc: meson-gx-mmc: add delay during poweroff
Date: Wed, 02 Jul 2025 19:07:25 +0200 [thread overview]
Message-ID: <1j4ivued2q.fsf@starbuckisacylon.baylibre.com> (raw)
In-Reply-To: <CAFBinCBwTkVwcBTWOzS+G13+rRM2eftMXZ3GHzW+F+BY0bBBzg@mail.gmail.com> (Martin Blumenstingl's message of "Wed, 2 Jul 2025 18:27:55 +0200")
On Wed 02 Jul 2025 at 18:27, Martin Blumenstingl <martin.blumenstingl@googlemail.com> wrote:
> Hi Anand,
>
> On Tue, Jul 1, 2025 at 12:00 PM Anand Moon <linux.amoon@gmail.com> wrote:
>>
>> Hi Da,
>>
>> On Sat, 28 Jun 2025 at 09:15, Da Xue <da@libre.computer> wrote:
>> >
>> > Regulators controlling the SD card power need some settling time for SD
>> > cards to fully reset from UHS modes. The regulator framework seems to
>> > ignore falling times set in the device tree causing a few boards with the
>> > same hardware implementation to hang on reboot because the SD card still
>> > had some voltage and did not reset properly to be initialized again.
>> >
>> > Add a delay sufficiently long for the voltage to drop so that the SD card
>> > can reset properly. Otherwise the reboot will hang at missing SD card
>> > especially with Samsung cards.
>> >
>> Although the driver defines reset identifiers such as
>> RESET_SD_EMMC_A, RESET_SD_EMMC_B, and RESET_SD_EMMC_C,
>> It does not implement proper reset controller functionality,
>> specifically lacking support
>> for reset_control_assert() and reset_control_deassert() operations.
> I think there's a misunderstanding:
> The meson-gx-mmc driver calls device_reset_optional() during .probe
> which will internally call reset_control_reset().
> So I don't see a problem here.
>
> The patch seems more about power sequencing, where either the SD card
> or regulator used to power the SD card requires a certain amount of
> time (delay) when switching from ON -> OFF -> ON (my understanding is:
> without this delay the card sees ON -> ON which fails to update some
> state internally).
>
> To me it's not clear if this is a property of the SD spec or rather
> the regulator.
> Ulf, Jerome - any ideas / inputs from you?
If, as the description suggest, the regulator framework somehow ignore
the timing set in DT, maybe this is what needs to be checked ?
TBH I would suspect the delays before the regulator framework itself.
Those assert/de-assert delays tend to be just copied from boards to
boards. Maybe some boards need different delays. If those are too short
for the actual HW, an ON -> OFF -> ON could result in a NOP.
>
>
> Best regards,
> Martin
--
Jerome
next prev parent reply other threads:[~2025-07-02 17:48 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-28 1:53 [RFC] mmc: meson-gx-mmc: add delay during poweroff Da Xue
2025-07-01 9:59 ` Anand Moon
2025-07-02 16:27 ` Martin Blumenstingl
2025-07-02 17:07 ` Jerome Brunet [this message]
2025-07-02 17:22 ` Da Xue
2025-07-02 18:40 ` Martin Blumenstingl
2025-07-02 19:07 ` Da Xue
2025-07-02 20:57 ` Martin Blumenstingl
2025-07-02 21:04 ` Da Xue
2025-07-03 11:59 ` Ulf Hansson
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=1j4ivued2q.fsf@starbuckisacylon.baylibre.com \
--to=jbrunet@baylibre.com \
--cc=da@libre.computer \
--cc=khilman@baylibre.com \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=linux.amoon@gmail.com \
--cc=martin.blumenstingl@googlemail.com \
--cc=neil.armstrong@linaro.org \
--cc=ulf.hansson@linaro.org \
/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