mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ben Chuang <benchuanggli@gmail.com>
To: dlbeer@gmail.com
Cc: adrian.hunter@intel.com, ben.chuang@genesyslogic.com.tw,
	linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org,
	ulf.hansson@linaro.org, benchuanggli@gmail.com
Subject: Re: [PATCH] mmc: sdhci-pci-gli: increase 1.8V regulator wait
Date: Mon, 26 Apr 2021 15:32:51 +0800	[thread overview]
Message-ID: <20210426073251.7726-1-benchuanggli@gmail.com> (raw)
In-Reply-To: <20210424081652.GA16047@nyquist.nev>

Hi Daniel,

> Inserting an SD-card on an Intel NUC10i3FNK4 (which contains a GL9755)
> results in the message:
> 
>     mmc0: 1.8V regulator output did not become stable
> 
> Following this message, some cards work (sometimes), but most cards fail
> with EILSEQ. This behaviour is observed on Debian 10 running kernel
> 4.19.188, but also with 5.8.18 and 5.11.15.

Glad to receive your report. Thanks.

> 
> The driver currently waits 5ms after switching on the 1.8V regulator for
> it to become stable. Increasing this to 10ms gets rid of the warning
> about stability, but most cards still fail. Increasing it to 20ms gets
> some cards working (a 32GB Samsung micro SD works, a 128GB ADATA
> doesn't). At 50ms, the ADATA works most of the time, and at 100ms both
> cards work reliably.

If it is convenient, can you provide the appearance pictures and product
links of these two cards? We want to buy them.

> 
> Signed-off-by: Daniel Beer <dlbeer@gmail.com>
> ---
>  drivers/mmc/host/sdhci-pci-gli.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/mmc/host/sdhci-pci-gli.c b/drivers/mmc/host/sdhci-pci-gli.c
> index 592d79082f58..061618aa247f 100644
> --- a/drivers/mmc/host/sdhci-pci-gli.c
> +++ b/drivers/mmc/host/sdhci-pci-gli.c
> @@ -627,8 +627,13 @@ static void sdhci_gli_voltage_switch(struct sdhci_host *host)
>  	 *
>  	 * Wait 5ms after set 1.8V signal enable in Host Control 2 register
>  	 * to ensure 1.8V signal enable bit is set by GL9750/GL9755.
> +	 *
> +	 * ...however, the controller in the NUC10i3FNK4 (a 9755) requires
> +	 * slightly longer than 5ms before the control register reports that
> +	 * 1.8V is ready, and far longer still before the card will actually
> +	 * work reliably.
>  	 */
> -	usleep_range(5000, 5500);
> +	usleep_range(100000, 110000);

Looks good for me.

>  }
>  
>  static void sdhci_gl9750_reset(struct sdhci_host *host, u8 mask)
> -- 
> 2.20.1
> 
> 

Best regards,
Ben

  reply	other threads:[~2021-04-26  7:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-24  8:16 Daniel Beer
2021-04-26  7:32 ` Ben Chuang [this message]
2021-04-26  8:25   ` Daniel Beer
2021-05-11 10:56   ` 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=20210426073251.7726-1-benchuanggli@gmail.com \
    --to=benchuanggli@gmail.com \
    --cc=adrian.hunter@intel.com \
    --cc=ben.chuang@genesyslogic.com.tw \
    --cc=dlbeer@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.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

all inboxes | Powered by JetHome®