Linux-Amlogic Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jerome Brunet <jbrunet@baylibre.com>
To: Marc Gonzalez <marc.w.gonzalez@free.fr>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	Kevin Hilman <khilman@baylibre.com>,
	Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
	Pierre-Hugues Husson <phh@phh.me>,
	Rong Chen <rong.chen@amlogic.com>,
	Yang Yingliang <yangyingliang@huawei.com>
Cc: MMC <linux-mmc@vger.kernel.org>, AML <linux-amlogic@lists.infradead.org>
Subject: Re: [PATCH] mmc: meson-gx: increase power-up delay
Date: Wed, 15 Mar 2023 16:27:19 +0100	[thread overview]
Message-ID: <1jcz5axc8j.fsf@starbuckisacylon.baylibre.com> (raw)
In-Reply-To: <b6971cd6-80f2-522a-64fb-82b126500010@free.fr>


On Wed 15 Mar 2023 at 11:20, Marc Gonzalez <marc.w.gonzalez@free.fr> wrote:

> On 14/03/2023 20:45, Heiner Kallweit wrote:
>
>> On 14.03.2023 18:24, Marc Gonzalez wrote:
>> 
>>> With the default power-up delay, on small kernels, the host probes
>>> too soon, and mmc_send_io_op_cond() times out.
>> 
>> Looking at mmc_power_up() and how power_delay_ms is used
>> I wonder what you mean with "host probes too soon".
>
> Hello Heiner,
>
> Thanks for your interest in my patch! :)
>
> I should have added a link to the thread that led to the patch.
> https://patchwork.kernel.org/project/linux-wireless/patch/c1a215cf-94be-871b-2a8a-3cc381588f83@free.fr/
> Start at "I have run into another issue."
>
> Basically, I have an S905X2-based board.
> I built a small kernel for it (with only a few drivers), that boots really fast.
>
> mmc2 (SDIO controller hooked to WiFi chip) would not probe at all,
> unless I added lots of printks.
> Basically, calling mmc_send_io_op_cond() too soon after the controller
> has been reset leads to the CMD5 request timing out.
>
>

I tend to agree with Heiner here.
This patch is backing a contraint only reported on your design in the
driver of every AML SoC supported, for every MMC controller.

I think you should look first in your vmmc and vqmmc regulators and
their setup times.

"fixed-regulator" have properties which might be interesting to you,
like
 * startup-delay-us
 * off-on-delay-us

>> Are you sure that the additional delay is needed for the Amlogic MMC
>> block IP in general? Or could it be that your issue is caused by
>> a specific regulator and you need to add a delay there?
>
> The eternal question...
>
> I have only one type of board. (Actually, I have a reference design
> that is slightly different, so I should test on that one as well.)
>
> In vendor kernels, they add delays to the WiFi drivers.
> Maybe they have run into the issue, and they're just fixing the symptom?
>
> Default value for ios.power_delay_ms is 10 ms.
> msleep(ios.power_delay_ms) is called twice in mmc_power_up().
> So raising the delay from 10 to 20 adds 20 ms
> to the latency of initializing SDIO/SD/MMC controllers.
>
> Would you be willing to test if the problem manifests on your board?
>
> Regards


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

  reply	other threads:[~2023-03-15 15:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-14 17:24 [PATCH] mmc: meson-gx: increase power-up delay Marc Gonzalez
2023-03-14 19:45 ` Heiner Kallweit
2023-03-15 10:20   ` Marc Gonzalez
2023-03-15 15:27     ` Jerome Brunet [this message]
2023-03-15 21:14       ` Heiner Kallweit
2023-03-16 12:32         ` Marc Gonzalez
2023-03-16 13:02           ` Marc Gonzalez
2023-03-16 11:59       ` Ulf Hansson
2023-03-16 16:32         ` Marc Gonzalez

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=1jcz5axc8j.fsf@starbuckisacylon.baylibre.com \
    --to=jbrunet@baylibre.com \
    --cc=hkallweit1@gmail.com \
    --cc=khilman@baylibre.com \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=marc.w.gonzalez@free.fr \
    --cc=martin.blumenstingl@googlemail.com \
    --cc=neil.armstrong@linaro.org \
    --cc=phh@phh.me \
    --cc=rong.chen@amlogic.com \
    --cc=ulf.hansson@linaro.org \
    --cc=yangyingliang@huawei.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