stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mmc: sdhci-xenon: fix 1.8v regulator stabilization
@ 2020-12-11 14:16 Marcin Wojtas
  2020-12-15  8:03 ` Adrian Hunter
  2021-01-11 18:06 ` Ulf Hansson
  0 siblings, 2 replies; 11+ messages in thread
From: Marcin Wojtas @ 2020-12-11 14:16 UTC (permalink / raw)
  To: linux-kernel, linux-mmc
  Cc: ulf.hansson, huziji, adrian.hunter, jaz, tn, kostap,
	Alex Leibovich, Marcin Wojtas, stable

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(-)

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


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH] mmc: sdhci-xenon: fix 1.8v regulator stabilization
  2020-12-11 14:16 [PATCH] mmc: sdhci-xenon: fix 1.8v regulator stabilization Marcin Wojtas
@ 2020-12-15  8:03 ` Adrian Hunter
  2020-12-15  9:17   ` Marcin Wojtas
  2021-01-11 18:06 ` Ulf Hansson
  1 sibling, 1 reply; 11+ messages in thread
From: Adrian Hunter @ 2020-12-15  8:03 UTC (permalink / raw)
  To: Marcin Wojtas, linux-kernel, linux-mmc
  Cc: ulf.hansson, huziji, jaz, tn, kostap, Alex Leibovich, stable

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);
>  
> 


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] mmc: sdhci-xenon: fix 1.8v regulator stabilization
  2020-12-15  8:03 ` Adrian Hunter
@ 2020-12-15  9:17   ` Marcin Wojtas
  0 siblings, 0 replies; 11+ messages in thread
From: Marcin Wojtas @ 2020-12-15  9:17 UTC (permalink / raw)
  To: Adrian Hunter
  Cc: Linux Kernel Mailing List, linux-mmc, Ulf Hansson, Ziji Hu,
	Grzegorz Jaszczyk, Tomasz Nowicki, Kostya Porotchkin,
	Alex Leibovich, stable

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);
> >
> >
>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] mmc: sdhci-xenon: fix 1.8v regulator stabilization
  2020-12-11 14:16 [PATCH] mmc: sdhci-xenon: fix 1.8v regulator stabilization Marcin Wojtas
  2020-12-15  8:03 ` Adrian Hunter
@ 2021-01-11 18:06 ` Ulf Hansson
  2022-03-14 15:40   ` Pali Rohár
  1 sibling, 1 reply; 11+ messages in thread
From: Ulf Hansson @ 2021-01-11 18:06 UTC (permalink / raw)
  To: Marcin Wojtas
  Cc: Linux Kernel Mailing List, linux-mmc, Ziji Hu, Adrian Hunter,
	jaz, tn, Kostya Porotchkin, Alex Leibovich, # 4.0+

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
>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] mmc: sdhci-xenon: fix 1.8v regulator stabilization
  2021-01-11 18:06 ` Ulf Hansson
@ 2022-03-14 15:40   ` Pali Rohár
  2022-03-14 15:51     ` Marcin Wojtas
  0 siblings, 1 reply; 11+ messages in thread
From: Pali Rohár @ 2022-03-14 15:40 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: Marcin Wojtas, Linux Kernel Mailing List, linux-mmc, Ziji Hu,
	Adrian Hunter, jaz, tn, Kostya Porotchkin, Alex Leibovich, # 4.0+

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
> >

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] mmc: sdhci-xenon: fix 1.8v regulator stabilization
  2022-03-14 15:40   ` Pali Rohár
@ 2022-03-14 15:51     ` Marcin Wojtas
  2022-03-15 23:03       ` Pali Rohár
  0 siblings, 1 reply; 11+ messages in thread
From: Marcin Wojtas @ 2022-03-14 15:51 UTC (permalink / raw)
  To: Pali Rohár
  Cc: Ulf Hansson, Linux Kernel Mailing List, linux-mmc, Ziji Hu,
	Adrian Hunter, Grzegorz Jaszczyk, Tomasz Nowicki,
	Kostya Porotchkin, Alex Leibovich, # 4.0+

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
> > >

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] mmc: sdhci-xenon: fix 1.8v regulator stabilization
  2022-03-14 15:51     ` Marcin Wojtas
@ 2022-03-15 23:03       ` Pali Rohár
  2022-03-16  1:03         ` Marcin Wojtas
  0 siblings, 1 reply; 11+ messages in thread
From: Pali Rohár @ 2022-03-15 23:03 UTC (permalink / raw)
  To: Marcin Wojtas
  Cc: Ulf Hansson, Linux Kernel Mailing List, linux-mmc, Ziji Hu,
	Adrian Hunter, Grzegorz Jaszczyk, Tomasz Nowicki,
	Kostya Porotchkin, Alex Leibovich, # 4.0+

Hello!

On Monday 14 March 2022 16:51:25 Marcin Wojtas wrote:
> 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.

Yea, there should be no issue. Just question is if we need _both_ fixes.

I could probably try to revert bb32e1987bc5 and check what happens on
A3k board.

> 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
> > > >

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] mmc: sdhci-xenon: fix 1.8v regulator stabilization
  2022-03-15 23:03       ` Pali Rohár
@ 2022-03-16  1:03         ` Marcin Wojtas
  2022-03-18 13:01           ` Pali Rohár
  0 siblings, 1 reply; 11+ messages in thread
From: Marcin Wojtas @ 2022-03-16  1:03 UTC (permalink / raw)
  To: Pali Rohár
  Cc: Ulf Hansson, Linux Kernel Mailing List, linux-mmc, Ziji Hu,
	Adrian Hunter, Grzegorz Jaszczyk, Tomasz Nowicki,
	Kostya Porotchkin, Alex Leibovich, # 4.0+

Hi Pali,

śr., 16 mar 2022 o 00:03 Pali Rohár <pali@kernel.org> napisał(a):
>
> Hello!
>
> On Monday 14 March 2022 16:51:25 Marcin Wojtas wrote:
> > 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.
>
> Yea, there should be no issue. Just question is if we need _both_ fixes.
>
> I could probably try to revert bb32e1987bc5 and check what happens on
> A3k board.
>

Yes, that would be interesting. Please let me know whenever you find
time to check.

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.
> > > > > +        * The feature is enabled in later stage.
> > > > > +        */
> > > > > +       xenon_set_acg(host, false);
> > > > >
> > > > >         xenon_set_sdclk_off_idle(host, sdhc_id, false);
> > > > >
> > > > > --
> > > > > 2.29.0
> > > > >

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] mmc: sdhci-xenon: fix 1.8v regulator stabilization
  2022-03-16  1:03         ` Marcin Wojtas
@ 2022-03-18 13:01           ` Pali Rohár
  2022-03-18 13:06             ` Pali Rohár
  0 siblings, 1 reply; 11+ messages in thread
From: Pali Rohár @ 2022-03-18 13:01 UTC (permalink / raw)
  To: Marcin Wojtas
  Cc: Ulf Hansson, Linux Kernel Mailing List, linux-mmc, Ziji Hu,
	Adrian Hunter, Grzegorz Jaszczyk, Tomasz Nowicki,
	Kostya Porotchkin, Alex Leibovich, # 4.0+

On Wednesday 16 March 2022 02:03:35 Marcin Wojtas wrote:
> Hi Pali,
> 
> śr., 16 mar 2022 o 00:03 Pali Rohár <pali@kernel.org> napisał(a):
> >
> > Hello!
> >
> > On Monday 14 March 2022 16:51:25 Marcin Wojtas wrote:
> > > 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.
> >
> > Yea, there should be no issue. Just question is if we need _both_ fixes.
> >
> > I could probably try to revert bb32e1987bc5 and check what happens on
> > A3k board.
> >
> 
> Yes, that would be interesting. Please let me know whenever you find
> time to check.

Hello! Now I tested kernel with reverted commit bb32e1987bc5 ("mmc:
sdhci-xenon: fix annoying 1.8V regulator warning") and issue is still
fixed. I reverted also bb32e1987bc5 ("mmc: sdhci-xenon: fix annoying
1.8V regulator warning") commit and then issue appeared again.

So any of this commit is fixing that issue on Armada 3720.

Should we revert one of them?

> 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.
> > > > > > +        * The feature is enabled in later stage.
> > > > > > +        */
> > > > > > +       xenon_set_acg(host, false);
> > > > > >
> > > > > >         xenon_set_sdclk_off_idle(host, sdhc_id, false);
> > > > > >
> > > > > > --
> > > > > > 2.29.0
> > > > > >

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] mmc: sdhci-xenon: fix 1.8v regulator stabilization
  2022-03-18 13:01           ` Pali Rohár
@ 2022-03-18 13:06             ` Pali Rohár
  2022-03-18 13:39               ` Marcin Wojtas
  0 siblings, 1 reply; 11+ messages in thread
From: Pali Rohár @ 2022-03-18 13:06 UTC (permalink / raw)
  To: Marcin Wojtas
  Cc: Ulf Hansson, Linux Kernel Mailing List, linux-mmc, Ziji Hu,
	Adrian Hunter, Grzegorz Jaszczyk, Tomasz Nowicki,
	Kostya Porotchkin, Alex Leibovich, # 4.0+

On Friday 18 March 2022 14:01:00 Pali Rohár wrote:
> On Wednesday 16 March 2022 02:03:35 Marcin Wojtas wrote:
> > Hi Pali,
> > 
> > śr., 16 mar 2022 o 00:03 Pali Rohár <pali@kernel.org> napisał(a):
> > >
> > > Hello!
> > >
> > > On Monday 14 March 2022 16:51:25 Marcin Wojtas wrote:
> > > > 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.
> > >
> > > Yea, there should be no issue. Just question is if we need _both_ fixes.
> > >
> > > I could probably try to revert bb32e1987bc5 and check what happens on
> > > A3k board.
> > >
> > 
> > Yes, that would be interesting. Please let me know whenever you find
> > time to check.
> 
> Hello! Now I tested kernel with reverted commit bb32e1987bc5 ("mmc:
> sdhci-xenon: fix annoying 1.8V regulator warning") and issue is still
> fixed. I reverted also bb32e1987bc5 ("mmc: sdhci-xenon: fix annoying
> 1.8V regulator warning") commit and then issue appeared again.

I mean that I reverted also 1a3ed0dc3594 ("mmc: sdhci-xenon: fix 1.8v
regulator stabilization") commit and then issue appeared again.

> So any of this commit is fixing that issue on Armada 3720.
> 
> Should we revert one of them?
> 
> > 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.
> > > > > > > +        * The feature is enabled in later stage.
> > > > > > > +        */
> > > > > > > +       xenon_set_acg(host, false);
> > > > > > >
> > > > > > >         xenon_set_sdclk_off_idle(host, sdhc_id, false);
> > > > > > >
> > > > > > > --
> > > > > > > 2.29.0
> > > > > > >

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] mmc: sdhci-xenon: fix 1.8v regulator stabilization
  2022-03-18 13:06             ` Pali Rohár
@ 2022-03-18 13:39               ` Marcin Wojtas
  0 siblings, 0 replies; 11+ messages in thread
From: Marcin Wojtas @ 2022-03-18 13:39 UTC (permalink / raw)
  To: Pali Rohár
  Cc: Ulf Hansson, Linux Kernel Mailing List, linux-mmc, Ziji Hu,
	Adrian Hunter, Grzegorz Jaszczyk, Tomasz Nowicki,
	Kostya Porotchkin, Alex Leibovich, # 4.0+

Hi Pali,

Thanks for testing!

pt., 18 mar 2022 o 14:06 Pali Rohár <pali@kernel.org> napisał(a):
>
> On Friday 18 March 2022 14:01:00 Pali Rohár wrote:
> > On Wednesday 16 March 2022 02:03:35 Marcin Wojtas wrote:
> > > Hi Pali,
> > >
> > > śr., 16 mar 2022 o 00:03 Pali Rohár <pali@kernel.org> napisał(a):
> > > >
> > > > Hello!
> > > >
> > > > On Monday 14 March 2022 16:51:25 Marcin Wojtas wrote:
> > > > > 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.
> > > >
> > > > Yea, there should be no issue. Just question is if we need _both_ fixes.
> > > >
> > > > I could probably try to revert bb32e1987bc5 and check what happens on
> > > > A3k board.
> > > >
> > >
> > > Yes, that would be interesting. Please let me know whenever you find
> > > time to check.
> >
> > Hello! Now I tested kernel with reverted commit bb32e1987bc5 ("mmc:
> > sdhci-xenon: fix annoying 1.8V regulator warning") and issue is still
> > fixed. I reverted also bb32e1987bc5 ("mmc: sdhci-xenon: fix annoying
> > 1.8V regulator warning") commit and then issue appeared again.
>
> I mean that I reverted also 1a3ed0dc3594 ("mmc: sdhci-xenon: fix 1.8v
> regulator stabilization") commit and then issue appeared again.
>
> > So any of this commit is fixing that issue on Armada 3720.
> >

I think both can stay, but if I had to choose, I'd keep 1a3ed0dc3594
("mmc: sdhci-xenon: fix 1.8v regulator stabilization"):
* Now we know for sure it fixes both Armada 3720 and CN913x/Armada 7k8k
* Afaik this patch was checked with HW team (and IMO it looks a bit
less hacky than the extra read :) ).

Best regards,
Marcin


> > Should we revert one of them?
> >
> > > 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.
> > > > > > > > +        * The feature is enabled in later stage.
> > > > > > > > +        */
> > > > > > > > +       xenon_set_acg(host, false);
> > > > > > > >
> > > > > > > >         xenon_set_sdclk_off_idle(host, sdhc_id, false);
> > > > > > > >
> > > > > > > > --
> > > > > > > > 2.29.0
> > > > > > > >

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2022-03-18 13:39 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-11 14:16 [PATCH] mmc: sdhci-xenon: fix 1.8v regulator stabilization Marcin Wojtas
2020-12-15  8:03 ` Adrian Hunter
2020-12-15  9:17   ` Marcin Wojtas
2021-01-11 18:06 ` Ulf Hansson
2022-03-14 15:40   ` Pali Rohár
2022-03-14 15:51     ` Marcin Wojtas
2022-03-15 23:03       ` Pali Rohár
2022-03-16  1:03         ` Marcin Wojtas
2022-03-18 13:01           ` Pali Rohár
2022-03-18 13:06             ` Pali Rohár
2022-03-18 13:39               ` Marcin Wojtas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).