diff mbox series

mmc: sdhci-xenon: fix 1.8v regulator stabilization

Message ID 20201211141656.24915-1-mw@semihalf.com
State New
Headers show
Series mmc: sdhci-xenon: fix 1.8v regulator stabilization | expand

Commit Message

Marcin Wojtas Dec. 11, 2020, 2:16 p.m. UTC
From: Alex Leibovich <alexl@marvell.com>

Automatic Clock Gating is a feature used for the power
consumption optimisation. It turned out that
during early init phase it may prevent the stable voltage
switch to 1.8V - due to that on some platfroms an endless
printout in dmesg can be observed:
"mmc1: 1.8V regulator output did not became stable"
Fix the problem by disabling the ACG at very beginning
of the sdhci_init and let that be enabled later.

Fixes: 3a3748dba881 ("mmc: sdhci-xenon: Add Marvell Xenon SDHC core functionality")
Signed-off-by: Alex Leibovich <alexl@marvell.com>
Signed-off-by: Marcin Wojtas <mw@semihalf.com>
Cc: stable@vger.kernel.org
---
 drivers/mmc/host/sdhci-xenon.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

Comments

Adrian Hunter Dec. 15, 2020, 8:03 a.m. UTC | #1
On 11/12/20 4:16 pm, Marcin Wojtas wrote:
> From: Alex Leibovich <alexl@marvell.com>

> 

> Automatic Clock Gating is a feature used for the power

> consumption optimisation. It turned out that

> during early init phase it may prevent the stable voltage

> switch to 1.8V - due to that on some platfroms an endless


platfroms -> platforms

> printout in dmesg can be observed:

> "mmc1: 1.8V regulator output did not became stable"

> Fix the problem by disabling the ACG at very beginning

> of the sdhci_init and let that be enabled later.

> 

> Fixes: 3a3748dba881 ("mmc: sdhci-xenon: Add Marvell Xenon SDHC core functionality")

> Signed-off-by: Alex Leibovich <alexl@marvell.com>

> Signed-off-by: Marcin Wojtas <mw@semihalf.com>

> Cc: stable@vger.kernel.org


Acked-by: Adrian Hunter <adrian.hunter@intel.com>


> ---

>  drivers/mmc/host/sdhci-xenon.c | 7 ++++++-

>  1 file changed, 6 insertions(+), 1 deletion(-)

> 

> diff --git a/drivers/mmc/host/sdhci-xenon.c b/drivers/mmc/host/sdhci-xenon.c

> index c67611fdaa8a..4b05f6fdefb4 100644

> --- a/drivers/mmc/host/sdhci-xenon.c

> +++ b/drivers/mmc/host/sdhci-xenon.c

> @@ -168,7 +168,12 @@ static void xenon_reset_exit(struct sdhci_host *host,

>  	/* Disable tuning request and auto-retuning again */

>  	xenon_retune_setup(host);

>  

> -	xenon_set_acg(host, true);

> +	/*

> +	 * The ACG should be turned off at the early init time, in order

> +	 * to solve a possile issues with the 1.8V regulator stabilization.


a possile -> possible

> +	 * The feature is enabled in later stage.

> +	 */

> +	xenon_set_acg(host, false);

>  

>  	xenon_set_sdclk_off_idle(host, sdhc_id, false);

>  

>
Marcin Wojtas Dec. 15, 2020, 9:17 a.m. UTC | #2
wt., 15 gru 2020 o 09:04 Adrian Hunter <adrian.hunter@intel.com> napisał(a):
>

> On 11/12/20 4:16 pm, Marcin Wojtas wrote:

> > From: Alex Leibovich <alexl@marvell.com>

> >

> > Automatic Clock Gating is a feature used for the power

> > consumption optimisation. It turned out that

> > during early init phase it may prevent the stable voltage

> > switch to 1.8V - due to that on some platfroms an endless

>

> platfroms -> platforms

>

> > printout in dmesg can be observed:

> > "mmc1: 1.8V regulator output did not became stable"

> > Fix the problem by disabling the ACG at very beginning

> > of the sdhci_init and let that be enabled later.

> >

> > Fixes: 3a3748dba881 ("mmc: sdhci-xenon: Add Marvell Xenon SDHC core functionality")

> > Signed-off-by: Alex Leibovich <alexl@marvell.com>

> > Signed-off-by: Marcin Wojtas <mw@semihalf.com>

> > Cc: stable@vger.kernel.org

>

> Acked-by: Adrian Hunter <adrian.hunter@intel.com>

>


Thank you, I'll repost right away with the typos correction.

Best regards,
Marcin

> > ---

> >  drivers/mmc/host/sdhci-xenon.c | 7 ++++++-

> >  1 file changed, 6 insertions(+), 1 deletion(-)

> >

> > diff --git a/drivers/mmc/host/sdhci-xenon.c b/drivers/mmc/host/sdhci-xenon.c

> > index c67611fdaa8a..4b05f6fdefb4 100644

> > --- a/drivers/mmc/host/sdhci-xenon.c

> > +++ b/drivers/mmc/host/sdhci-xenon.c

> > @@ -168,7 +168,12 @@ static void xenon_reset_exit(struct sdhci_host *host,

> >       /* Disable tuning request and auto-retuning again */

> >       xenon_retune_setup(host);

> >

> > -     xenon_set_acg(host, true);

> > +     /*

> > +      * The ACG should be turned off at the early init time, in order

> > +      * to solve a possile issues with the 1.8V regulator stabilization.

>

> a possile -> possible

>

> > +      * The feature is enabled in later stage.

> > +      */

> > +     xenon_set_acg(host, false);

> >

> >       xenon_set_sdclk_off_idle(host, sdhc_id, false);

> >

> >

>
Ulf Hansson Jan. 11, 2021, 6:06 p.m. UTC | #3
On Fri, 11 Dec 2020 at 15:17, Marcin Wojtas <mw@semihalf.com> wrote:
>
> From: Alex Leibovich <alexl@marvell.com>
>
> Automatic Clock Gating is a feature used for the power
> consumption optimisation. It turned out that
> during early init phase it may prevent the stable voltage
> switch to 1.8V - due to that on some platfroms an endless
> printout in dmesg can be observed:
> "mmc1: 1.8V regulator output did not became stable"
> Fix the problem by disabling the ACG at very beginning
> of the sdhci_init and let that be enabled later.
>
> Fixes: 3a3748dba881 ("mmc: sdhci-xenon: Add Marvell Xenon SDHC core functionality")
> Signed-off-by: Alex Leibovich <alexl@marvell.com>
> Signed-off-by: Marcin Wojtas <mw@semihalf.com>
> Cc: stable@vger.kernel.org

Applied for fixes (by fixing the typos), thanks!

Kind regards
Uffe


> ---
>  drivers/mmc/host/sdhci-xenon.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/sdhci-xenon.c b/drivers/mmc/host/sdhci-xenon.c
> index c67611fdaa8a..4b05f6fdefb4 100644
> --- a/drivers/mmc/host/sdhci-xenon.c
> +++ b/drivers/mmc/host/sdhci-xenon.c
> @@ -168,7 +168,12 @@ static void xenon_reset_exit(struct sdhci_host *host,
>         /* Disable tuning request and auto-retuning again */
>         xenon_retune_setup(host);
>
> -       xenon_set_acg(host, true);
> +       /*
> +        * The ACG should be turned off at the early init time, in order
> +        * to solve a possile issues with the 1.8V regulator stabilization.
> +        * The feature is enabled in later stage.
> +        */
> +       xenon_set_acg(host, false);
>
>         xenon_set_sdclk_off_idle(host, sdhc_id, false);
>
> --
> 2.29.0
>
Pali Rohár March 14, 2022, 3:40 p.m. UTC | #4
On Monday 11 January 2021 19:06:24 Ulf Hansson wrote:
> On Fri, 11 Dec 2020 at 15:17, Marcin Wojtas <mw@semihalf.com> wrote:
> >
> > From: Alex Leibovich <alexl@marvell.com>
> >
> > Automatic Clock Gating is a feature used for the power
> > consumption optimisation. It turned out that
> > during early init phase it may prevent the stable voltage
> > switch to 1.8V - due to that on some platfroms an endless
> > printout in dmesg can be observed:
> > "mmc1: 1.8V regulator output did not became stable"
> > Fix the problem by disabling the ACG at very beginning
> > of the sdhci_init and let that be enabled later.
> >
> > Fixes: 3a3748dba881 ("mmc: sdhci-xenon: Add Marvell Xenon SDHC core functionality")
> > Signed-off-by: Alex Leibovich <alexl@marvell.com>
> > Signed-off-by: Marcin Wojtas <mw@semihalf.com>
> > Cc: stable@vger.kernel.org
> 
> Applied for fixes (by fixing the typos), thanks!

Hello!

Is not this patch address same issue which was fixed by patch which was
merged earlier?

bb32e1987bc5 ("mmc: sdhci-xenon: fix annoying 1.8V regulator warning")
https://lore.kernel.org/linux-mmc/CAPDyKFqAsvgAjfL-c9ukFNWeGJmufQosR2Eg9SKjXMVpNitdkA@mail.gmail.com/

> Kind regards
> Uffe
> 
> 
> > ---
> >  drivers/mmc/host/sdhci-xenon.c | 7 ++++++-
> >  1 file changed, 6 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/mmc/host/sdhci-xenon.c b/drivers/mmc/host/sdhci-xenon.c
> > index c67611fdaa8a..4b05f6fdefb4 100644
> > --- a/drivers/mmc/host/sdhci-xenon.c
> > +++ b/drivers/mmc/host/sdhci-xenon.c
> > @@ -168,7 +168,12 @@ static void xenon_reset_exit(struct sdhci_host *host,
> >         /* Disable tuning request and auto-retuning again */
> >         xenon_retune_setup(host);
> >
> > -       xenon_set_acg(host, true);
> > +       /*
> > +        * The ACG should be turned off at the early init time, in order
> > +        * to solve a possile issues with the 1.8V regulator stabilization.
> > +        * The feature is enabled in later stage.
> > +        */
> > +       xenon_set_acg(host, false);
> >
> >         xenon_set_sdclk_off_idle(host, sdhc_id, false);
> >
> > --
> > 2.29.0
> >
Marcin Wojtas March 14, 2022, 3:51 p.m. UTC | #5
Hi Pali,


pon., 14 mar 2022 o 16:40 Pali Rohár <pali@kernel.org> napisał(a):
>
> On Monday 11 January 2021 19:06:24 Ulf Hansson wrote:
> > On Fri, 11 Dec 2020 at 15:17, Marcin Wojtas <mw@semihalf.com> wrote:
> > >
> > > From: Alex Leibovich <alexl@marvell.com>
> > >
> > > Automatic Clock Gating is a feature used for the power
> > > consumption optimisation. It turned out that
> > > during early init phase it may prevent the stable voltage
> > > switch to 1.8V - due to that on some platfroms an endless
> > > printout in dmesg can be observed:
> > > "mmc1: 1.8V regulator output did not became stable"
> > > Fix the problem by disabling the ACG at very beginning
> > > of the sdhci_init and let that be enabled later.
> > >
> > > Fixes: 3a3748dba881 ("mmc: sdhci-xenon: Add Marvell Xenon SDHC core functionality")
> > > Signed-off-by: Alex Leibovich <alexl@marvell.com>
> > > Signed-off-by: Marcin Wojtas <mw@semihalf.com>
> > > Cc: stable@vger.kernel.org
> >
> > Applied for fixes (by fixing the typos), thanks!
>
> Hello!
>
> Is not this patch address same issue which was fixed by patch which was
> merged earlier?
>
> bb32e1987bc5 ("mmc: sdhci-xenon: fix annoying 1.8V regulator warning")
> https://lore.kernel.org/linux-mmc/CAPDyKFqAsvgAjfL-c9ukFNWeGJmufQosR2Eg9SKjXMVpNitdkA@mail.gmail.com/
>

This indeed look similar. This fix was originally developed for CN913x
platform without the mentioned patch (I'm wondering if it would also
suffice to fix A3k board's problem). Anyway, I don't think we have an
issue here, as everything seems to work fine on top of mainline Linux
with both changes.

Best regards,
Marcin

> > Kind regards
> > Uffe
> >
> >
> > > ---
> > >  drivers/mmc/host/sdhci-xenon.c | 7 ++++++-
> > >  1 file changed, 6 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/mmc/host/sdhci-xenon.c b/drivers/mmc/host/sdhci-xenon.c
> > > index c67611fdaa8a..4b05f6fdefb4 100644
> > > --- a/drivers/mmc/host/sdhci-xenon.c
> > > +++ b/drivers/mmc/host/sdhci-xenon.c
> > > @@ -168,7 +168,12 @@ static void xenon_reset_exit(struct sdhci_host *host,
> > >         /* Disable tuning request and auto-retuning again */
> > >         xenon_retune_setup(host);
> > >
> > > -       xenon_set_acg(host, true);
> > > +       /*
> > > +        * The ACG should be turned off at the early init time, in order
> > > +        * to solve a possile issues with the 1.8V regulator stabilization.
> > > +        * The feature is enabled in later stage.
> > > +        */
> > > +       xenon_set_acg(host, false);
> > >
> > >         xenon_set_sdclk_off_idle(host, sdhc_id, false);
> > >
> > > --
> > > 2.29.0
> > >
diff mbox series

Patch

diff --git a/drivers/mmc/host/sdhci-xenon.c b/drivers/mmc/host/sdhci-xenon.c
index c67611fdaa8a..4b05f6fdefb4 100644
--- a/drivers/mmc/host/sdhci-xenon.c
+++ b/drivers/mmc/host/sdhci-xenon.c
@@ -168,7 +168,12 @@  static void xenon_reset_exit(struct sdhci_host *host,
 	/* Disable tuning request and auto-retuning again */
 	xenon_retune_setup(host);
 
-	xenon_set_acg(host, true);
+	/*
+	 * The ACG should be turned off at the early init time, in order
+	 * to solve a possile issues with the 1.8V regulator stabilization.
+	 * The feature is enabled in later stage.
+	 */
+	xenon_set_acg(host, false);
 
 	xenon_set_sdclk_off_idle(host, sdhc_id, false);