All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] clk: imx8m: Do not set IMX_COMPOSITE_CORE for non-regular composites
@ 2021-11-03 12:39 ` Alexander Stein
  0 siblings, 0 replies; 14+ messages in thread
From: Alexander Stein @ 2021-11-03 12:39 UTC (permalink / raw)
  To: Abel Vesa, Michael Turquette, Stephen Boyd, Shawn Guo, Sascha Hauer
  Cc: Alexander Stein, Pengutronix Kernel Team, NXP Linux Team,
	linux-clk, linux-arm-kernel, Fabio Estevam

Only imx8m_clk_hw_composite_core needs to set this flag.

Fixes: a60fe746df94 ("clk: imx: Rework all imx_clk_hw_composite wrappers")
Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
---
This is from clk_summary on a imx8mq custom board where you can clearly
see the before the divider is limited to 8 (core composite)

before:
video_pll1_out        2        2        0  1031999997          0     0  50000         Y
   dsi_phy_ref        1        1        0   129000000          0     0  50000         Y
   lcdif_pixel        2        2        0   129000000          0     0  50000         Y

after:
video_pll1_out        2        2        0  1031999997          0     0  50000         Y
   dsi_phy_ref        1        1        0    24000000          0     0  50000         Y
   lcdif_pixel        2        2        0    68800000          0     0  50000         Y

 drivers/clk/imx/clk.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/clk/imx/clk.h b/drivers/clk/imx/clk.h
index 819949973db1..7d220a01de1f 100644
--- a/drivers/clk/imx/clk.h
+++ b/drivers/clk/imx/clk.h
@@ -391,11 +391,11 @@ struct clk_hw *__imx8m_clk_hw_composite(const char *name,
 
 #define imx8m_clk_hw_composite(name, parent_names, reg) \
 	_imx8m_clk_hw_composite(name, parent_names, reg, \
-			IMX_COMPOSITE_CORE, IMX_COMPOSITE_CLK_FLAGS_DEFAULT)
+			0, IMX_COMPOSITE_CLK_FLAGS_DEFAULT)
 
 #define imx8m_clk_hw_composite_critical(name, parent_names, reg) \
 	_imx8m_clk_hw_composite(name, parent_names, reg, \
-			IMX_COMPOSITE_CORE, IMX_COMPOSITE_CLK_FLAGS_CRITICAL)
+			0, IMX_COMPOSITE_CLK_FLAGS_CRITICAL)
 
 #define imx8m_clk_hw_composite_bus(name, parent_names, reg)	\
 	_imx8m_clk_hw_composite(name, parent_names, reg, \
-- 
2.25.1


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

* [PATCH 1/1] clk: imx8m: Do not set IMX_COMPOSITE_CORE for non-regular composites
@ 2021-11-03 12:39 ` Alexander Stein
  0 siblings, 0 replies; 14+ messages in thread
From: Alexander Stein @ 2021-11-03 12:39 UTC (permalink / raw)
  To: Abel Vesa, Michael Turquette, Stephen Boyd, Shawn Guo, Sascha Hauer
  Cc: Alexander Stein, Pengutronix Kernel Team, NXP Linux Team,
	linux-clk, linux-arm-kernel, Fabio Estevam

Only imx8m_clk_hw_composite_core needs to set this flag.

Fixes: a60fe746df94 ("clk: imx: Rework all imx_clk_hw_composite wrappers")
Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
---
This is from clk_summary on a imx8mq custom board where you can clearly
see the before the divider is limited to 8 (core composite)

before:
video_pll1_out        2        2        0  1031999997          0     0  50000         Y
   dsi_phy_ref        1        1        0   129000000          0     0  50000         Y
   lcdif_pixel        2        2        0   129000000          0     0  50000         Y

after:
video_pll1_out        2        2        0  1031999997          0     0  50000         Y
   dsi_phy_ref        1        1        0    24000000          0     0  50000         Y
   lcdif_pixel        2        2        0    68800000          0     0  50000         Y

 drivers/clk/imx/clk.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/clk/imx/clk.h b/drivers/clk/imx/clk.h
index 819949973db1..7d220a01de1f 100644
--- a/drivers/clk/imx/clk.h
+++ b/drivers/clk/imx/clk.h
@@ -391,11 +391,11 @@ struct clk_hw *__imx8m_clk_hw_composite(const char *name,
 
 #define imx8m_clk_hw_composite(name, parent_names, reg) \
 	_imx8m_clk_hw_composite(name, parent_names, reg, \
-			IMX_COMPOSITE_CORE, IMX_COMPOSITE_CLK_FLAGS_DEFAULT)
+			0, IMX_COMPOSITE_CLK_FLAGS_DEFAULT)
 
 #define imx8m_clk_hw_composite_critical(name, parent_names, reg) \
 	_imx8m_clk_hw_composite(name, parent_names, reg, \
-			IMX_COMPOSITE_CORE, IMX_COMPOSITE_CLK_FLAGS_CRITICAL)
+			0, IMX_COMPOSITE_CLK_FLAGS_CRITICAL)
 
 #define imx8m_clk_hw_composite_bus(name, parent_names, reg)	\
 	_imx8m_clk_hw_composite(name, parent_names, reg, \
-- 
2.25.1


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

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

* Re: [PATCH 1/1] clk: imx8m: Do not set IMX_COMPOSITE_CORE for non-regular composites
  2021-11-03 12:39 ` Alexander Stein
@ 2021-11-03 14:25   ` Adam Ford
  -1 siblings, 0 replies; 14+ messages in thread
From: Adam Ford @ 2021-11-03 14:25 UTC (permalink / raw)
  To: Alexander Stein
  Cc: Abel Vesa, Michael Turquette, Stephen Boyd, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, NXP Linux Team, linux-clk,
	arm-soc, Fabio Estevam

On Wed, Nov 3, 2021 at 7:41 AM Alexander Stein
<alexander.stein@ew.tq-group.com> wrote:
>
> Only imx8m_clk_hw_composite_core needs to set this flag.
>
> Fixes: a60fe746df94 ("clk: imx: Rework all imx_clk_hw_composite wrappers")
> Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
> ---
> This is from clk_summary on a imx8mq custom board where you can clearly
> see the before the divider is limited to 8 (core composite)
>
> before:
> video_pll1_out        2        2        0  1031999997          0     0  50000         Y
>    dsi_phy_ref        1        1        0   129000000          0     0  50000         Y
>    lcdif_pixel        2        2        0   129000000          0     0  50000         Y
>
> after:
> video_pll1_out        2        2        0  1031999997          0     0  50000         Y
>    dsi_phy_ref        1        1        0    24000000          0     0  50000         Y
>    lcdif_pixel        2        2        0    68800000          0     0  50000         Y
>
>  drivers/clk/imx/clk.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/clk/imx/clk.h b/drivers/clk/imx/clk.h

I attempted to apply this against linux/master and it doesn't apply.
What branch did you use?

adam

> index 819949973db1..7d220a01de1f 100644
> --- a/drivers/clk/imx/clk.h
> +++ b/drivers/clk/imx/clk.h
> @@ -391,11 +391,11 @@ struct clk_hw *__imx8m_clk_hw_composite(const char *name,
>
>  #define imx8m_clk_hw_composite(name, parent_names, reg) \
>         _imx8m_clk_hw_composite(name, parent_names, reg, \
> -                       IMX_COMPOSITE_CORE, IMX_COMPOSITE_CLK_FLAGS_DEFAULT)
> +                       0, IMX_COMPOSITE_CLK_FLAGS_DEFAULT)
>
>  #define imx8m_clk_hw_composite_critical(name, parent_names, reg) \
>         _imx8m_clk_hw_composite(name, parent_names, reg, \
> -                       IMX_COMPOSITE_CORE, IMX_COMPOSITE_CLK_FLAGS_CRITICAL)
> +                       0, IMX_COMPOSITE_CLK_FLAGS_CRITICAL)
>
>  #define imx8m_clk_hw_composite_bus(name, parent_names, reg)    \
>         _imx8m_clk_hw_composite(name, parent_names, reg, \
> --
> 2.25.1
>

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

* Re: [PATCH 1/1] clk: imx8m: Do not set IMX_COMPOSITE_CORE for non-regular composites
@ 2021-11-03 14:25   ` Adam Ford
  0 siblings, 0 replies; 14+ messages in thread
From: Adam Ford @ 2021-11-03 14:25 UTC (permalink / raw)
  To: Alexander Stein
  Cc: Abel Vesa, Michael Turquette, Stephen Boyd, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, NXP Linux Team, linux-clk,
	arm-soc, Fabio Estevam

On Wed, Nov 3, 2021 at 7:41 AM Alexander Stein
<alexander.stein@ew.tq-group.com> wrote:
>
> Only imx8m_clk_hw_composite_core needs to set this flag.
>
> Fixes: a60fe746df94 ("clk: imx: Rework all imx_clk_hw_composite wrappers")
> Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
> ---
> This is from clk_summary on a imx8mq custom board where you can clearly
> see the before the divider is limited to 8 (core composite)
>
> before:
> video_pll1_out        2        2        0  1031999997          0     0  50000         Y
>    dsi_phy_ref        1        1        0   129000000          0     0  50000         Y
>    lcdif_pixel        2        2        0   129000000          0     0  50000         Y
>
> after:
> video_pll1_out        2        2        0  1031999997          0     0  50000         Y
>    dsi_phy_ref        1        1        0    24000000          0     0  50000         Y
>    lcdif_pixel        2        2        0    68800000          0     0  50000         Y
>
>  drivers/clk/imx/clk.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/clk/imx/clk.h b/drivers/clk/imx/clk.h

I attempted to apply this against linux/master and it doesn't apply.
What branch did you use?

adam

> index 819949973db1..7d220a01de1f 100644
> --- a/drivers/clk/imx/clk.h
> +++ b/drivers/clk/imx/clk.h
> @@ -391,11 +391,11 @@ struct clk_hw *__imx8m_clk_hw_composite(const char *name,
>
>  #define imx8m_clk_hw_composite(name, parent_names, reg) \
>         _imx8m_clk_hw_composite(name, parent_names, reg, \
> -                       IMX_COMPOSITE_CORE, IMX_COMPOSITE_CLK_FLAGS_DEFAULT)
> +                       0, IMX_COMPOSITE_CLK_FLAGS_DEFAULT)
>
>  #define imx8m_clk_hw_composite_critical(name, parent_names, reg) \
>         _imx8m_clk_hw_composite(name, parent_names, reg, \
> -                       IMX_COMPOSITE_CORE, IMX_COMPOSITE_CLK_FLAGS_CRITICAL)
> +                       0, IMX_COMPOSITE_CLK_FLAGS_CRITICAL)
>
>  #define imx8m_clk_hw_composite_bus(name, parent_names, reg)    \
>         _imx8m_clk_hw_composite(name, parent_names, reg, \
> --
> 2.25.1
>

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

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

* Re: (EXT) Re: [PATCH 1/1] clk: imx8m: Do not set IMX_COMPOSITE_CORE for non-regular composites
  2021-11-03 14:25   ` Adam Ford
@ 2021-11-03 14:33     ` Alexander Stein
  -1 siblings, 0 replies; 14+ messages in thread
From: Alexander Stein @ 2021-11-03 14:33 UTC (permalink / raw)
  To: Adam Ford
  Cc: Abel Vesa, Michael Turquette, Stephen Boyd, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, NXP Linux Team, linux-clk,
	arm-soc, Fabio Estevam

Am Mittwoch, dem 03.11.2021 um 09:25 -0500 schrieb Adam Ford:
> On Wed, Nov 3, 2021 at 7:41 AM Alexander Stein
> <
> alexander.stein@ew.tq-group.com
> > wrote:
> > Only imx8m_clk_hw_composite_core needs to set this flag.
> > 
> > Fixes: a60fe746df94 ("clk: imx: Rework all imx_clk_hw_composite
> > wrappers")
> > Signed-off-by: Alexander Stein <
> > alexander.stein@ew.tq-group.com
> > >
> > ---
> > This is from clk_summary on a imx8mq custom board where you can
> > clearly
> > see the before the divider is limited to 8 (core composite)
> > 
> > before:
> > video_pll1_out        2        2        0  1031999997          0   
> >   0  50000         Y
> >    dsi_phy_ref        1        1        0   129000000          0   
> >   0  50000         Y
> >    lcdif_pixel        2        2        0   129000000          0   
> >   0  50000         Y
> > 
> > after:
> > video_pll1_out        2        2        0  1031999997          0   
> >   0  50000         Y
> >    dsi_phy_ref        1        1        0    24000000          0   
> >   0  50000         Y
> >    lcdif_pixel        2        2        0    68800000          0   
> >   0  50000         Y
> > 
> >  drivers/clk/imx/clk.h | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/clk/imx/clk.h b/drivers/clk/imx/clk.h
> 
> I attempted to apply this against linux/master and it doesn't apply.
> What branch did you use?

The referenced commit a60fe746df94 is not in Linus' tree yet, but in
linux-next. My patch is based on linux-next/next-20211101. Sorry missed
to mention that.

Best regards,
Alexander

> > > 
> > index 819949973db1..7d220a01de1f 100644
> > --- a/drivers/clk/imx/clk.h
> > +++ b/drivers/clk/imx/clk.h
> > @@ -391,11 +391,11 @@ struct clk_hw *__imx8m_clk_hw_composite(const
> > char *name,
> > 
> >  #define imx8m_clk_hw_composite(name, parent_names, reg) \
> >         _imx8m_clk_hw_composite(name, parent_names, reg, \
> > -                       IMX_COMPOSITE_CORE,
> > IMX_COMPOSITE_CLK_FLAGS_DEFAULT)
> > +                       0, IMX_COMPOSITE_CLK_FLAGS_DEFAULT)
> > 
> >  #define imx8m_clk_hw_composite_critical(name, parent_names, reg) \
> >         _imx8m_clk_hw_composite(name, parent_names, reg, \
> > -                       IMX_COMPOSITE_CORE,
> > IMX_COMPOSITE_CLK_FLAGS_CRITICAL)
> > +                       0, IMX_COMPOSITE_CLK_FLAGS_CRITICAL)
> > 
> >  #define imx8m_clk_hw_composite_bus(name, parent_names, reg)    \
> >         _imx8m_clk_hw_composite(name, parent_names, reg, \
> > --
> > 2.25.1
> > 



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

* Re: (EXT) Re: [PATCH 1/1] clk: imx8m: Do not set IMX_COMPOSITE_CORE for non-regular composites
@ 2021-11-03 14:33     ` Alexander Stein
  0 siblings, 0 replies; 14+ messages in thread
From: Alexander Stein @ 2021-11-03 14:33 UTC (permalink / raw)
  To: Adam Ford
  Cc: Abel Vesa, Michael Turquette, Stephen Boyd, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, NXP Linux Team, linux-clk,
	arm-soc, Fabio Estevam

Am Mittwoch, dem 03.11.2021 um 09:25 -0500 schrieb Adam Ford:
> On Wed, Nov 3, 2021 at 7:41 AM Alexander Stein
> <
> alexander.stein@ew.tq-group.com
> > wrote:
> > Only imx8m_clk_hw_composite_core needs to set this flag.
> > 
> > Fixes: a60fe746df94 ("clk: imx: Rework all imx_clk_hw_composite
> > wrappers")
> > Signed-off-by: Alexander Stein <
> > alexander.stein@ew.tq-group.com
> > >
> > ---
> > This is from clk_summary on a imx8mq custom board where you can
> > clearly
> > see the before the divider is limited to 8 (core composite)
> > 
> > before:
> > video_pll1_out        2        2        0  1031999997          0   
> >   0  50000         Y
> >    dsi_phy_ref        1        1        0   129000000          0   
> >   0  50000         Y
> >    lcdif_pixel        2        2        0   129000000          0   
> >   0  50000         Y
> > 
> > after:
> > video_pll1_out        2        2        0  1031999997          0   
> >   0  50000         Y
> >    dsi_phy_ref        1        1        0    24000000          0   
> >   0  50000         Y
> >    lcdif_pixel        2        2        0    68800000          0   
> >   0  50000         Y
> > 
> >  drivers/clk/imx/clk.h | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/clk/imx/clk.h b/drivers/clk/imx/clk.h
> 
> I attempted to apply this against linux/master and it doesn't apply.
> What branch did you use?

The referenced commit a60fe746df94 is not in Linus' tree yet, but in
linux-next. My patch is based on linux-next/next-20211101. Sorry missed
to mention that.

Best regards,
Alexander

> > > 
> > index 819949973db1..7d220a01de1f 100644
> > --- a/drivers/clk/imx/clk.h
> > +++ b/drivers/clk/imx/clk.h
> > @@ -391,11 +391,11 @@ struct clk_hw *__imx8m_clk_hw_composite(const
> > char *name,
> > 
> >  #define imx8m_clk_hw_composite(name, parent_names, reg) \
> >         _imx8m_clk_hw_composite(name, parent_names, reg, \
> > -                       IMX_COMPOSITE_CORE,
> > IMX_COMPOSITE_CLK_FLAGS_DEFAULT)
> > +                       0, IMX_COMPOSITE_CLK_FLAGS_DEFAULT)
> > 
> >  #define imx8m_clk_hw_composite_critical(name, parent_names, reg) \
> >         _imx8m_clk_hw_composite(name, parent_names, reg, \
> > -                       IMX_COMPOSITE_CORE,
> > IMX_COMPOSITE_CLK_FLAGS_CRITICAL)
> > +                       0, IMX_COMPOSITE_CLK_FLAGS_CRITICAL)
> > 
> >  #define imx8m_clk_hw_composite_bus(name, parent_names, reg)    \
> >         _imx8m_clk_hw_composite(name, parent_names, reg, \
> > --
> > 2.25.1
> > 



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

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

* Re: (EXT) Re: [PATCH 1/1] clk: imx8m: Do not set IMX_COMPOSITE_CORE for non-regular composites
  2021-11-03 14:33     ` Alexander Stein
@ 2021-11-03 18:23       ` Adam Ford
  -1 siblings, 0 replies; 14+ messages in thread
From: Adam Ford @ 2021-11-03 18:23 UTC (permalink / raw)
  To: Alexander Stein
  Cc: Abel Vesa, Michael Turquette, Stephen Boyd, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, NXP Linux Team, linux-clk,
	arm-soc, Fabio Estevam

On Wed, Nov 3, 2021 at 9:33 AM Alexander Stein
<alexander.stein@ew.tq-group.com> wrote:
>
> Am Mittwoch, dem 03.11.2021 um 09:25 -0500 schrieb Adam Ford:
> > On Wed, Nov 3, 2021 at 7:41 AM Alexander Stein
> > <
> > alexander.stein@ew.tq-group.com
> > > wrote:
> > > Only imx8m_clk_hw_composite_core needs to set this flag.
> > >

Tested-by: Adam Ford <aford173@gmail.com> #imx8mm-beacon

> > > Fixes: a60fe746df94 ("clk: imx: Rework all imx_clk_hw_composite
> > > wrappers")
> > > Signed-off-by: Alexander Stein <
> > > alexander.stein@ew.tq-group.com
> > > >
> > > ---
> > > This is from clk_summary on a imx8mq custom board where you can
> > > clearly
> > > see the before the divider is limited to 8 (core composite)
> > >
> > > before:
> > > video_pll1_out        2        2        0  1031999997          0
> > >   0  50000         Y
> > >    dsi_phy_ref        1        1        0   129000000          0
> > >   0  50000         Y
> > >    lcdif_pixel        2        2        0   129000000          0
> > >   0  50000         Y
> > >
> > > after:
> > > video_pll1_out        2        2        0  1031999997          0
> > >   0  50000         Y
> > >    dsi_phy_ref        1        1        0    24000000          0
> > >   0  50000         Y
> > >    lcdif_pixel        2        2        0    68800000          0
> > >   0  50000         Y
> > >

This appears to fix a couple clocks on the imx8mm as well.

root@beacon-imx8mm-kit:~# diff before.txt after.txt
225c225
<                 dsi_phy_ref           0        0        0
99000000          0     0  50000         N
---
>                 dsi_phy_ref           0        0        0    27000000          0     0  50000         N
234,235c234,235
<                 sai3                  0        0        0
49152000          0     0  50000         N
<                    sai3_root_clk       0        0        0
49152000          0     0  50000         N
---
>                 sai3                  0        0        0    24576000          0     0  50000         N
>                    sai3_root_clk       0        0        0    24576000          0     0  50000         N

At least for sai3 on the beacon board,  24576000 is the desired clock rate.

> > >  drivers/clk/imx/clk.h | 4 ++--
> > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/drivers/clk/imx/clk.h b/drivers/clk/imx/clk.h
> >
> > I attempted to apply this against linux/master and it doesn't apply.
> > What branch did you use?
>
> The referenced commit a60fe746df94 is not in Linus' tree yet, but in
> linux-next. My patch is based on linux-next/next-20211101. Sorry missed
> to mention that.
>
> Best regards,
> Alexander
>
> > > >
> > > index 819949973db1..7d220a01de1f 100644
> > > --- a/drivers/clk/imx/clk.h
> > > +++ b/drivers/clk/imx/clk.h
> > > @@ -391,11 +391,11 @@ struct clk_hw *__imx8m_clk_hw_composite(const
> > > char *name,
> > >
> > >  #define imx8m_clk_hw_composite(name, parent_names, reg) \
> > >         _imx8m_clk_hw_composite(name, parent_names, reg, \
> > > -                       IMX_COMPOSITE_CORE,
> > > IMX_COMPOSITE_CLK_FLAGS_DEFAULT)
> > > +                       0, IMX_COMPOSITE_CLK_FLAGS_DEFAULT)
> > >
> > >  #define imx8m_clk_hw_composite_critical(name, parent_names, reg) \
> > >         _imx8m_clk_hw_composite(name, parent_names, reg, \
> > > -                       IMX_COMPOSITE_CORE,
> > > IMX_COMPOSITE_CLK_FLAGS_CRITICAL)
> > > +                       0, IMX_COMPOSITE_CLK_FLAGS_CRITICAL)
> > >
> > >  #define imx8m_clk_hw_composite_bus(name, parent_names, reg)    \
> > >         _imx8m_clk_hw_composite(name, parent_names, reg, \
> > > --
> > > 2.25.1
> > >
>
>

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

* Re: (EXT) Re: [PATCH 1/1] clk: imx8m: Do not set IMX_COMPOSITE_CORE for non-regular composites
@ 2021-11-03 18:23       ` Adam Ford
  0 siblings, 0 replies; 14+ messages in thread
From: Adam Ford @ 2021-11-03 18:23 UTC (permalink / raw)
  To: Alexander Stein
  Cc: Abel Vesa, Michael Turquette, Stephen Boyd, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, NXP Linux Team, linux-clk,
	arm-soc, Fabio Estevam

On Wed, Nov 3, 2021 at 9:33 AM Alexander Stein
<alexander.stein@ew.tq-group.com> wrote:
>
> Am Mittwoch, dem 03.11.2021 um 09:25 -0500 schrieb Adam Ford:
> > On Wed, Nov 3, 2021 at 7:41 AM Alexander Stein
> > <
> > alexander.stein@ew.tq-group.com
> > > wrote:
> > > Only imx8m_clk_hw_composite_core needs to set this flag.
> > >

Tested-by: Adam Ford <aford173@gmail.com> #imx8mm-beacon

> > > Fixes: a60fe746df94 ("clk: imx: Rework all imx_clk_hw_composite
> > > wrappers")
> > > Signed-off-by: Alexander Stein <
> > > alexander.stein@ew.tq-group.com
> > > >
> > > ---
> > > This is from clk_summary on a imx8mq custom board where you can
> > > clearly
> > > see the before the divider is limited to 8 (core composite)
> > >
> > > before:
> > > video_pll1_out        2        2        0  1031999997          0
> > >   0  50000         Y
> > >    dsi_phy_ref        1        1        0   129000000          0
> > >   0  50000         Y
> > >    lcdif_pixel        2        2        0   129000000          0
> > >   0  50000         Y
> > >
> > > after:
> > > video_pll1_out        2        2        0  1031999997          0
> > >   0  50000         Y
> > >    dsi_phy_ref        1        1        0    24000000          0
> > >   0  50000         Y
> > >    lcdif_pixel        2        2        0    68800000          0
> > >   0  50000         Y
> > >

This appears to fix a couple clocks on the imx8mm as well.

root@beacon-imx8mm-kit:~# diff before.txt after.txt
225c225
<                 dsi_phy_ref           0        0        0
99000000          0     0  50000         N
---
>                 dsi_phy_ref           0        0        0    27000000          0     0  50000         N
234,235c234,235
<                 sai3                  0        0        0
49152000          0     0  50000         N
<                    sai3_root_clk       0        0        0
49152000          0     0  50000         N
---
>                 sai3                  0        0        0    24576000          0     0  50000         N
>                    sai3_root_clk       0        0        0    24576000          0     0  50000         N

At least for sai3 on the beacon board,  24576000 is the desired clock rate.

> > >  drivers/clk/imx/clk.h | 4 ++--
> > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/drivers/clk/imx/clk.h b/drivers/clk/imx/clk.h
> >
> > I attempted to apply this against linux/master and it doesn't apply.
> > What branch did you use?
>
> The referenced commit a60fe746df94 is not in Linus' tree yet, but in
> linux-next. My patch is based on linux-next/next-20211101. Sorry missed
> to mention that.
>
> Best regards,
> Alexander
>
> > > >
> > > index 819949973db1..7d220a01de1f 100644
> > > --- a/drivers/clk/imx/clk.h
> > > +++ b/drivers/clk/imx/clk.h
> > > @@ -391,11 +391,11 @@ struct clk_hw *__imx8m_clk_hw_composite(const
> > > char *name,
> > >
> > >  #define imx8m_clk_hw_composite(name, parent_names, reg) \
> > >         _imx8m_clk_hw_composite(name, parent_names, reg, \
> > > -                       IMX_COMPOSITE_CORE,
> > > IMX_COMPOSITE_CLK_FLAGS_DEFAULT)
> > > +                       0, IMX_COMPOSITE_CLK_FLAGS_DEFAULT)
> > >
> > >  #define imx8m_clk_hw_composite_critical(name, parent_names, reg) \
> > >         _imx8m_clk_hw_composite(name, parent_names, reg, \
> > > -                       IMX_COMPOSITE_CORE,
> > > IMX_COMPOSITE_CLK_FLAGS_CRITICAL)
> > > +                       0, IMX_COMPOSITE_CLK_FLAGS_CRITICAL)
> > >
> > >  #define imx8m_clk_hw_composite_bus(name, parent_names, reg)    \
> > >         _imx8m_clk_hw_composite(name, parent_names, reg, \
> > > --
> > > 2.25.1
> > >
>
>

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

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

* Re: [PATCH 1/1] clk: imx8m: Do not set IMX_COMPOSITE_CORE for non-regular composites
  2021-11-03 12:39 ` Alexander Stein
@ 2021-11-03 20:45   ` Abel Vesa
  -1 siblings, 0 replies; 14+ messages in thread
From: Abel Vesa @ 2021-11-03 20:45 UTC (permalink / raw)
  To: Alexander Stein, Stephen Boyd
  Cc: Michael Turquette, Stephen Boyd, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, NXP Linux Team, linux-clk,
	linux-arm-kernel, Fabio Estevam

On 21-11-03 13:39:47, Alexander Stein wrote:
> Only imx8m_clk_hw_composite_core needs to set this flag.
> 
> Fixes: a60fe746df94 ("clk: imx: Rework all imx_clk_hw_composite wrappers")
> Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>

Looking at the commit a60fe746df94 it's obvious this change reverts the
flags as they were before.

Reviewed-by: Abel Vesa <abel.vesa@nxp.com>

Stephen, will you apply this on clk/next or should I send a subsequent
pull request ?

> ---
> This is from clk_summary on a imx8mq custom board where you can clearly
> see the before the divider is limited to 8 (core composite)
> 
> before:
> video_pll1_out        2        2        0  1031999997          0     0  50000         Y
>    dsi_phy_ref        1        1        0   129000000          0     0  50000         Y
>    lcdif_pixel        2        2        0   129000000          0     0  50000         Y
> 
> after:
> video_pll1_out        2        2        0  1031999997          0     0  50000         Y
>    dsi_phy_ref        1        1        0    24000000          0     0  50000         Y
>    lcdif_pixel        2        2        0    68800000          0     0  50000         Y
> 
>  drivers/clk/imx/clk.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/clk/imx/clk.h b/drivers/clk/imx/clk.h
> index 819949973db1..7d220a01de1f 100644
> --- a/drivers/clk/imx/clk.h
> +++ b/drivers/clk/imx/clk.h
> @@ -391,11 +391,11 @@ struct clk_hw *__imx8m_clk_hw_composite(const char *name,
>  
>  #define imx8m_clk_hw_composite(name, parent_names, reg) \
>  	_imx8m_clk_hw_composite(name, parent_names, reg, \
> -			IMX_COMPOSITE_CORE, IMX_COMPOSITE_CLK_FLAGS_DEFAULT)
> +			0, IMX_COMPOSITE_CLK_FLAGS_DEFAULT)
>  
>  #define imx8m_clk_hw_composite_critical(name, parent_names, reg) \
>  	_imx8m_clk_hw_composite(name, parent_names, reg, \
> -			IMX_COMPOSITE_CORE, IMX_COMPOSITE_CLK_FLAGS_CRITICAL)
> +			0, IMX_COMPOSITE_CLK_FLAGS_CRITICAL)
>  
>  #define imx8m_clk_hw_composite_bus(name, parent_names, reg)	\
>  	_imx8m_clk_hw_composite(name, parent_names, reg, \
> -- 
> 2.25.1
>

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

* Re: [PATCH 1/1] clk: imx8m: Do not set IMX_COMPOSITE_CORE for non-regular composites
@ 2021-11-03 20:45   ` Abel Vesa
  0 siblings, 0 replies; 14+ messages in thread
From: Abel Vesa @ 2021-11-03 20:45 UTC (permalink / raw)
  To: Alexander Stein, Stephen Boyd
  Cc: Michael Turquette, Stephen Boyd, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, NXP Linux Team, linux-clk,
	linux-arm-kernel, Fabio Estevam

On 21-11-03 13:39:47, Alexander Stein wrote:
> Only imx8m_clk_hw_composite_core needs to set this flag.
> 
> Fixes: a60fe746df94 ("clk: imx: Rework all imx_clk_hw_composite wrappers")
> Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>

Looking at the commit a60fe746df94 it's obvious this change reverts the
flags as they were before.

Reviewed-by: Abel Vesa <abel.vesa@nxp.com>

Stephen, will you apply this on clk/next or should I send a subsequent
pull request ?

> ---
> This is from clk_summary on a imx8mq custom board where you can clearly
> see the before the divider is limited to 8 (core composite)
> 
> before:
> video_pll1_out        2        2        0  1031999997          0     0  50000         Y
>    dsi_phy_ref        1        1        0   129000000          0     0  50000         Y
>    lcdif_pixel        2        2        0   129000000          0     0  50000         Y
> 
> after:
> video_pll1_out        2        2        0  1031999997          0     0  50000         Y
>    dsi_phy_ref        1        1        0    24000000          0     0  50000         Y
>    lcdif_pixel        2        2        0    68800000          0     0  50000         Y
> 
>  drivers/clk/imx/clk.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/clk/imx/clk.h b/drivers/clk/imx/clk.h
> index 819949973db1..7d220a01de1f 100644
> --- a/drivers/clk/imx/clk.h
> +++ b/drivers/clk/imx/clk.h
> @@ -391,11 +391,11 @@ struct clk_hw *__imx8m_clk_hw_composite(const char *name,
>  
>  #define imx8m_clk_hw_composite(name, parent_names, reg) \
>  	_imx8m_clk_hw_composite(name, parent_names, reg, \
> -			IMX_COMPOSITE_CORE, IMX_COMPOSITE_CLK_FLAGS_DEFAULT)
> +			0, IMX_COMPOSITE_CLK_FLAGS_DEFAULT)
>  
>  #define imx8m_clk_hw_composite_critical(name, parent_names, reg) \
>  	_imx8m_clk_hw_composite(name, parent_names, reg, \
> -			IMX_COMPOSITE_CORE, IMX_COMPOSITE_CLK_FLAGS_CRITICAL)
> +			0, IMX_COMPOSITE_CLK_FLAGS_CRITICAL)
>  
>  #define imx8m_clk_hw_composite_bus(name, parent_names, reg)	\
>  	_imx8m_clk_hw_composite(name, parent_names, reg, \
> -- 
> 2.25.1
>

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

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

* Re: [PATCH 1/1] clk: imx8m: Do not set IMX_COMPOSITE_CORE for non-regular composites
  2021-11-03 20:45   ` Abel Vesa
@ 2021-11-05 22:26     ` Stephen Boyd
  -1 siblings, 0 replies; 14+ messages in thread
From: Stephen Boyd @ 2021-11-05 22:26 UTC (permalink / raw)
  To: Abel Vesa, Alexander Stein
  Cc: Michael Turquette, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, NXP Linux Team, linux-clk,
	linux-arm-kernel, Fabio Estevam

Quoting Abel Vesa (2021-11-03 13:45:50)
> On 21-11-03 13:39:47, Alexander Stein wrote:
> > Only imx8m_clk_hw_composite_core needs to set this flag.
> > 
> > Fixes: a60fe746df94 ("clk: imx: Rework all imx_clk_hw_composite wrappers")
> > Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
> 
> Looking at the commit a60fe746df94 it's obvious this change reverts the
> flags as they were before.
> 
> Reviewed-by: Abel Vesa <abel.vesa@nxp.com>
> 
> Stephen, will you apply this on clk/next or should I send a subsequent
> pull request ?
> 

I picked it up.

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

* Re: [PATCH 1/1] clk: imx8m: Do not set IMX_COMPOSITE_CORE for non-regular composites
@ 2021-11-05 22:26     ` Stephen Boyd
  0 siblings, 0 replies; 14+ messages in thread
From: Stephen Boyd @ 2021-11-05 22:26 UTC (permalink / raw)
  To: Abel Vesa, Alexander Stein
  Cc: Michael Turquette, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, NXP Linux Team, linux-clk,
	linux-arm-kernel, Fabio Estevam

Quoting Abel Vesa (2021-11-03 13:45:50)
> On 21-11-03 13:39:47, Alexander Stein wrote:
> > Only imx8m_clk_hw_composite_core needs to set this flag.
> > 
> > Fixes: a60fe746df94 ("clk: imx: Rework all imx_clk_hw_composite wrappers")
> > Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
> 
> Looking at the commit a60fe746df94 it's obvious this change reverts the
> flags as they were before.
> 
> Reviewed-by: Abel Vesa <abel.vesa@nxp.com>
> 
> Stephen, will you apply this on clk/next or should I send a subsequent
> pull request ?
> 

I picked it up.

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

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

* Re: [PATCH 1/1] clk: imx8m: Do not set IMX_COMPOSITE_CORE for non-regular composites
  2021-11-03 12:39 ` Alexander Stein
@ 2021-11-05 22:27   ` Stephen Boyd
  -1 siblings, 0 replies; 14+ messages in thread
From: Stephen Boyd @ 2021-11-05 22:27 UTC (permalink / raw)
  To: Abel Vesa, Alexander Stein, Michael Turquette, Sascha Hauer, Shawn Guo
  Cc: Alexander Stein, Pengutronix Kernel Team, NXP Linux Team,
	linux-clk, linux-arm-kernel, Fabio Estevam

Quoting Alexander Stein (2021-11-03 05:39:47)
> Only imx8m_clk_hw_composite_core needs to set this flag.
> 
> Fixes: a60fe746df94 ("clk: imx: Rework all imx_clk_hw_composite wrappers")
> Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
> ---

Applied to clk-next

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

* Re: [PATCH 1/1] clk: imx8m: Do not set IMX_COMPOSITE_CORE for non-regular composites
@ 2021-11-05 22:27   ` Stephen Boyd
  0 siblings, 0 replies; 14+ messages in thread
From: Stephen Boyd @ 2021-11-05 22:27 UTC (permalink / raw)
  To: Abel Vesa, Alexander Stein, Michael Turquette, Sascha Hauer, Shawn Guo
  Cc: Alexander Stein, Pengutronix Kernel Team, NXP Linux Team,
	linux-clk, linux-arm-kernel, Fabio Estevam

Quoting Alexander Stein (2021-11-03 05:39:47)
> Only imx8m_clk_hw_composite_core needs to set this flag.
> 
> Fixes: a60fe746df94 ("clk: imx: Rework all imx_clk_hw_composite wrappers")
> Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
> ---

Applied to clk-next

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

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

end of thread, other threads:[~2021-11-05 22:28 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-03 12:39 [PATCH 1/1] clk: imx8m: Do not set IMX_COMPOSITE_CORE for non-regular composites Alexander Stein
2021-11-03 12:39 ` Alexander Stein
2021-11-03 14:25 ` Adam Ford
2021-11-03 14:25   ` Adam Ford
2021-11-03 14:33   ` (EXT) " Alexander Stein
2021-11-03 14:33     ` Alexander Stein
2021-11-03 18:23     ` Adam Ford
2021-11-03 18:23       ` Adam Ford
2021-11-03 20:45 ` Abel Vesa
2021-11-03 20:45   ` Abel Vesa
2021-11-05 22:26   ` Stephen Boyd
2021-11-05 22:26     ` Stephen Boyd
2021-11-05 22:27 ` Stephen Boyd
2021-11-05 22:27   ` Stephen Boyd

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.