Linux-Clk Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH V3 0/5] dt-binding: clk: prepare for imx8qm clock support
@ 2019-01-24 13:22 Aisheng Dong
  2019-01-24 13:22 ` [PATCH V3 1/5] dt-bindings: fsl: scu: add fallback compatible string for clock Aisheng Dong
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Aisheng Dong @ 2019-01-24 13:22 UTC (permalink / raw)
  To: linux-clk
  Cc: linux-arm-kernel, sboyd, mturquette, shawnguo, Fabio Estevam,
	dl-linux-imx, kernel, robh+dt, devicetree, Aisheng Dong

After a bit more investigation on IMX8QM, it seemed SCU clock can be used
in a similar way as IMX8QXP. So update the binding and driver to be a bit
generic for easily extension of IMX8QM support later.

Dong Aisheng (5):
  dt-bindings: fsl: scu: add fallback compatible string for clock
  dt-bindings: fsl: scu: add imx8qm scu clock support
  dt-bindings: clock: update CPU clock ID name
  dt-bindings: imx8-clock: add a53 and a72 clock id
  clk: imx: scu: add fallback compatible string support

 Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt | 7 +++++--
 drivers/clk/imx/clk-imx8qxp.c                               | 1 +
 include/dt-bindings/clock/imx8-clock.h                      | 7 +++++--
 3 files changed, 11 insertions(+), 4 deletions(-)

-- 
2.7.4


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

* [PATCH V3 1/5] dt-bindings: fsl: scu: add fallback compatible string for clock
  2019-01-24 13:22 [PATCH V3 0/5] dt-binding: clk: prepare for imx8qm clock support Aisheng Dong
@ 2019-01-24 13:22 ` Aisheng Dong
  2019-02-01  6:21   ` Shawn Guo
  2019-01-24 13:22 ` [PATCH V3 2/5] dt-bindings: fsl: scu: add imx8qm scu clock support Aisheng Dong
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 13+ messages in thread
From: Aisheng Dong @ 2019-01-24 13:22 UTC (permalink / raw)
  To: linux-clk
  Cc: linux-arm-kernel, sboyd, mturquette, shawnguo, Fabio Estevam,
	dl-linux-imx, kernel, robh+dt, devicetree, Aisheng Dong

SCU clock can be used in a similar way by IMX8QXP and IMX8QM SoCs.
Let's add a "fsl,scu-clk" fallback compatible string to allow other
SoCs to reuse the common part.

Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Sascha Hauer <kernel@pengutronix.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Michael Turquette <mturquette@baylibre.com>
Acked-by: Stephen Boyd <sboyd@kernel.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
---
 Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt b/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt
index fd2bed2..6b4e24a 100644
--- a/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt
+++ b/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt
@@ -74,7 +74,9 @@ Clock bindings based on SCU Message Protocol
 This binding uses the common clock binding[1].
 
 Required properties:
-- compatible:		Should be "fsl,imx8qxp-clock".
+- compatible:		Should be one of:
+			  "fsl,imx8qxp-clock"
+			followed by "fsl,scu-clk"
 - #clock-cells:		Should be 1. Contains the Clock ID value.
 - clocks:		List of clock specifiers, must contain an entry for
 			each required entry in clock-names
@@ -141,7 +143,7 @@ firmware {
 			  &lsio_mu1 1 3>;
 
 		clk: clk {
-			compatible = "fsl,imx8qxp-clk";
+			compatible = "fsl,imx8qxp-clk", "fsl,scu-clk";
 			#clock-cells = <1>;
 		};
 
-- 
2.7.4


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

* [PATCH V3 2/5] dt-bindings: fsl: scu: add imx8qm scu clock support
  2019-01-24 13:22 [PATCH V3 0/5] dt-binding: clk: prepare for imx8qm clock support Aisheng Dong
  2019-01-24 13:22 ` [PATCH V3 1/5] dt-bindings: fsl: scu: add fallback compatible string for clock Aisheng Dong
@ 2019-01-24 13:22 ` Aisheng Dong
  2019-02-01  6:22   ` Shawn Guo
  2019-01-24 13:22 ` [PATCH V3 3/5] dt-bindings: clock: update CPU clock ID name Aisheng Dong
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 13+ messages in thread
From: Aisheng Dong @ 2019-01-24 13:22 UTC (permalink / raw)
  To: linux-clk
  Cc: linux-arm-kernel, sboyd, mturquette, shawnguo, Fabio Estevam,
	dl-linux-imx, kernel, robh+dt, devicetree, Aisheng Dong

Add imx8qm scu clock support

Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Sascha Hauer <kernel@pengutronix.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Michael Turquette <mturquette@baylibre.com>
Acked-by: Stephen Boyd <sboyd@kernel.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
---
 Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt b/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt
index 6b4e24a..72d481c 100644
--- a/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt
+++ b/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt
@@ -75,6 +75,7 @@ This binding uses the common clock binding[1].
 
 Required properties:
 - compatible:		Should be one of:
+			  "fsl,imx8qm-clock"
 			  "fsl,imx8qxp-clock"
 			followed by "fsl,scu-clk"
 - #clock-cells:		Should be 1. Contains the Clock ID value.
-- 
2.7.4


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

* [PATCH V3 3/5] dt-bindings: clock: update CPU clock ID name
  2019-01-24 13:22 [PATCH V3 0/5] dt-binding: clk: prepare for imx8qm clock support Aisheng Dong
  2019-01-24 13:22 ` [PATCH V3 1/5] dt-bindings: fsl: scu: add fallback compatible string for clock Aisheng Dong
  2019-01-24 13:22 ` [PATCH V3 2/5] dt-bindings: fsl: scu: add imx8qm scu clock support Aisheng Dong
@ 2019-01-24 13:22 ` Aisheng Dong
  2019-01-24 13:22 ` [PATCH V3 4/5] dt-bindings: imx8-clock: add a53 and a72 clock id Aisheng Dong
  2019-01-24 13:22 ` [PATCH V3 5/5] clk: imx: scu: add fallback compatible string support Aisheng Dong
  4 siblings, 0 replies; 13+ messages in thread
From: Aisheng Dong @ 2019-01-24 13:22 UTC (permalink / raw)
  To: linux-clk
  Cc: linux-arm-kernel, sboyd, mturquette, shawnguo, Fabio Estevam,
	dl-linux-imx, kernel, robh+dt, devicetree, Aisheng Dong

Update the CPU clocks to CPU cluster clock.

Cc: Stephen Boyd <sboyd@kernel.org>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: devicetree@vger.kernel.org
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Sascha Hauer <kernel@pengutronix.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Michael Turquette <mturquette@baylibre.com>
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
---
v1->v2:
 * change name to cpu cluster clock according to Rob's suggestion
v2->v3:
 * keep IMX_CLK_A35 to not break building as clk driver already uses it
---
 include/dt-bindings/clock/imx8-clock.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/dt-bindings/clock/imx8-clock.h b/include/dt-bindings/clock/imx8-clock.h
index 4236818..b149e63 100644
--- a/include/dt-bindings/clock/imx8-clock.h
+++ b/include/dt-bindings/clock/imx8-clock.h
@@ -13,6 +13,7 @@
 
 /* CPU */
 #define IMX_A35_CLK					1
+#define IMX_CPU_CLUSTER_A35_CLK				1
 
 /* LSIO SS */
 #define IMX_LSIO_MEM_CLK				2
-- 
2.7.4


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

* [PATCH V3 4/5] dt-bindings: imx8-clock: add a53 and a72 clock id
  2019-01-24 13:22 [PATCH V3 0/5] dt-binding: clk: prepare for imx8qm clock support Aisheng Dong
                   ` (2 preceding siblings ...)
  2019-01-24 13:22 ` [PATCH V3 3/5] dt-bindings: clock: update CPU clock ID name Aisheng Dong
@ 2019-01-24 13:22 ` Aisheng Dong
  2019-02-13 22:18   ` Rob Herring
  2019-01-24 13:22 ` [PATCH V3 5/5] clk: imx: scu: add fallback compatible string support Aisheng Dong
  4 siblings, 1 reply; 13+ messages in thread
From: Aisheng Dong @ 2019-01-24 13:22 UTC (permalink / raw)
  To: linux-clk
  Cc: linux-arm-kernel, sboyd, mturquette, shawnguo, Fabio Estevam,
	dl-linux-imx, kernel, robh+dt, devicetree, Aisheng Dong

Add a53 and a72 clock id, as there's still no users, we update
IMX_LSIO_MEM_CLK base to start from 6 to allow a53 and a72 clock
id to be continued with a35 clk.

Cc: Stephen Boyd <sboyd@kernel.org>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: devicetree@vger.kernel.org
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Sascha Hauer <kernel@pengutronix.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Michael Turquette <mturquette@baylibre.com>
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
---
v1->v2:
 * change cpu clock to cpu cluster clock per Rob's suggestion
---
 include/dt-bindings/clock/imx8-clock.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/include/dt-bindings/clock/imx8-clock.h b/include/dt-bindings/clock/imx8-clock.h
index b149e63..dcce744 100644
--- a/include/dt-bindings/clock/imx8-clock.h
+++ b/include/dt-bindings/clock/imx8-clock.h
@@ -14,10 +14,12 @@
 /* CPU */
 #define IMX_A35_CLK					1
 #define IMX_CPU_CLUSTER_A35_CLK				1
+#define IMX_CPU_CLUSTER_A53_CLK				2
+#define IMX_CPU_CLUSTER_A72_CLK				3
 
 /* LSIO SS */
-#define IMX_LSIO_MEM_CLK				2
-#define IMX_LSIO_BUS_CLK				3
+#define IMX_LSIO_MEM_CLK				6
+#define IMX_LSIO_BUS_CLK				7
 #define IMX_LSIO_PWM0_CLK				10
 #define IMX_LSIO_PWM1_CLK				11
 #define IMX_LSIO_PWM2_CLK				12
-- 
2.7.4


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

* [PATCH V3 5/5] clk: imx: scu: add fallback compatible string support
  2019-01-24 13:22 [PATCH V3 0/5] dt-binding: clk: prepare for imx8qm clock support Aisheng Dong
                   ` (3 preceding siblings ...)
  2019-01-24 13:22 ` [PATCH V3 4/5] dt-bindings: imx8-clock: add a53 and a72 clock id Aisheng Dong
@ 2019-01-24 13:22 ` Aisheng Dong
  2019-02-20  7:09   ` Aisheng Dong
  4 siblings, 1 reply; 13+ messages in thread
From: Aisheng Dong @ 2019-01-24 13:22 UTC (permalink / raw)
  To: linux-clk
  Cc: linux-arm-kernel, sboyd, mturquette, shawnguo, Fabio Estevam,
	dl-linux-imx, kernel, robh+dt, devicetree, Aisheng Dong

SCU clock can be used in a similar way by IMX8QXP and IMX8QM SoCs.
Make the driver support "fsl,scu-clk" fallback compatible string
to allow other SoCs to reuse the common part.

Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Sascha Hauer <kernel@pengutronix.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Stephen Boyd <sboyd@kernel.org>
Cc: Michael Turquette <mturquette@baylibre.com>
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
---
 drivers/clk/imx/clk-imx8qxp.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/clk/imx/clk-imx8qxp.c b/drivers/clk/imx/clk-imx8qxp.c
index 83e2ef9..5e2903e 100644
--- a/drivers/clk/imx/clk-imx8qxp.c
+++ b/drivers/clk/imx/clk-imx8qxp.c
@@ -138,6 +138,7 @@ static int imx8qxp_clk_probe(struct platform_device *pdev)
 }
 
 static const struct of_device_id imx8qxp_match[] = {
+	{ .compatible = "fsl,scu-clk", },
 	{ .compatible = "fsl,imx8qxp-clk", },
 	{ /* sentinel */ }
 };
-- 
2.7.4


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

* Re: [PATCH V3 1/5] dt-bindings: fsl: scu: add fallback compatible string for clock
  2019-01-24 13:22 ` [PATCH V3 1/5] dt-bindings: fsl: scu: add fallback compatible string for clock Aisheng Dong
@ 2019-02-01  6:21   ` Shawn Guo
  0 siblings, 0 replies; 13+ messages in thread
From: Shawn Guo @ 2019-02-01  6:21 UTC (permalink / raw)
  To: Aisheng Dong
  Cc: linux-clk, linux-arm-kernel, sboyd, mturquette, Fabio Estevam,
	dl-linux-imx, kernel, robh+dt, devicetree

On Thu, Jan 24, 2019 at 01:22:32PM +0000, Aisheng Dong wrote:
> SCU clock can be used in a similar way by IMX8QXP and IMX8QM SoCs.
> Let's add a "fsl,scu-clk" fallback compatible string to allow other
> SoCs to reuse the common part.
> 
> Cc: Shawn Guo <shawnguo@kernel.org>
> Cc: Sascha Hauer <kernel@pengutronix.de>
> Cc: Fabio Estevam <fabio.estevam@nxp.com>
> Cc: Michael Turquette <mturquette@baylibre.com>
> Acked-by: Stephen Boyd <sboyd@kernel.org>
> Reviewed-by: Rob Herring <robh@kernel.org>
> Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>

Applied, thanks.

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

* Re: [PATCH V3 2/5] dt-bindings: fsl: scu: add imx8qm scu clock support
  2019-01-24 13:22 ` [PATCH V3 2/5] dt-bindings: fsl: scu: add imx8qm scu clock support Aisheng Dong
@ 2019-02-01  6:22   ` Shawn Guo
  0 siblings, 0 replies; 13+ messages in thread
From: Shawn Guo @ 2019-02-01  6:22 UTC (permalink / raw)
  To: Aisheng Dong
  Cc: linux-clk, linux-arm-kernel, sboyd, mturquette, Fabio Estevam,
	dl-linux-imx, kernel, robh+dt, devicetree

On Thu, Jan 24, 2019 at 01:22:36PM +0000, Aisheng Dong wrote:
> Add imx8qm scu clock support
> 
> Cc: Shawn Guo <shawnguo@kernel.org>
> Cc: Sascha Hauer <kernel@pengutronix.de>
> Cc: Fabio Estevam <fabio.estevam@nxp.com>
> Cc: Michael Turquette <mturquette@baylibre.com>
> Acked-by: Stephen Boyd <sboyd@kernel.org>
> Reviewed-by: Rob Herring <robh@kernel.org>
> Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>

Applied, thanks.

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

* Re: [PATCH V3 4/5] dt-bindings: imx8-clock: add a53 and a72 clock id
  2019-01-24 13:22 ` [PATCH V3 4/5] dt-bindings: imx8-clock: add a53 and a72 clock id Aisheng Dong
@ 2019-02-13 22:18   ` Rob Herring
  2019-02-20  7:07     ` Aisheng Dong
  0 siblings, 1 reply; 13+ messages in thread
From: Rob Herring @ 2019-02-13 22:18 UTC (permalink / raw)
  To: Aisheng Dong
  Cc: linux-clk, linux-arm-kernel, sboyd, mturquette, shawnguo,
	Fabio Estevam, dl-linux-imx, kernel, devicetree

On Thu, Jan 24, 2019 at 01:22:45PM +0000, Aisheng Dong wrote:
> Add a53 and a72 clock id, as there's still no users, we update
> IMX_LSIO_MEM_CLK base to start from 6 to allow a53 and a72 clock
> id to be continued with a35 clk.
> 
> Cc: Stephen Boyd <sboyd@kernel.org>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: devicetree@vger.kernel.org
> Cc: Shawn Guo <shawnguo@kernel.org>
> Cc: Sascha Hauer <kernel@pengutronix.de>
> Cc: Fabio Estevam <fabio.estevam@nxp.com>
> Cc: Michael Turquette <mturquette@baylibre.com>
> Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
> ---
> v1->v2:
>  * change cpu clock to cpu cluster clock per Rob's suggestion
> ---
>  include/dt-bindings/clock/imx8-clock.h | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/include/dt-bindings/clock/imx8-clock.h b/include/dt-bindings/clock/imx8-clock.h
> index b149e63..dcce744 100644
> --- a/include/dt-bindings/clock/imx8-clock.h
> +++ b/include/dt-bindings/clock/imx8-clock.h
> @@ -14,10 +14,12 @@
>  /* CPU */
>  #define IMX_A35_CLK					1
>  #define IMX_CPU_CLUSTER_A35_CLK				1
> +#define IMX_CPU_CLUSTER_A53_CLK				2
> +#define IMX_CPU_CLUSTER_A72_CLK				3

I still don't get this. How many clock outputs does the clock controller 
have for CPUs? If 3, then this is correct. If it's the same clock 
controller bits across different SoCs, then just name it something like 
IMX_CPU_CLUSTER_CLK and reuse the same ID.

>  /* LSIO SS */
> -#define IMX_LSIO_MEM_CLK				2
> -#define IMX_LSIO_BUS_CLK				3
> +#define IMX_LSIO_MEM_CLK				6
> +#define IMX_LSIO_BUS_CLK				7

Changing numbering is not good, but I guess it's early for imx8.

>  #define IMX_LSIO_PWM0_CLK				10
>  #define IMX_LSIO_PWM1_CLK				11
>  #define IMX_LSIO_PWM2_CLK				12
> -- 
> 2.7.4
> 

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

* RE: [PATCH V3 4/5] dt-bindings: imx8-clock: add a53 and a72 clock id
  2019-02-13 22:18   ` Rob Herring
@ 2019-02-20  7:07     ` Aisheng Dong
  2019-02-20 20:56       ` Stephen Boyd
  0 siblings, 1 reply; 13+ messages in thread
From: Aisheng Dong @ 2019-02-20  7:07 UTC (permalink / raw)
  To: Rob Herring
  Cc: linux-clk, linux-arm-kernel, sboyd, mturquette, shawnguo,
	Fabio Estevam, dl-linux-imx, kernel, devicetree

> From: Rob Herring [mailto:robh@kernel.org]
> Sent: Thursday, February 14, 2019 6:18 AM
> On Thu, Jan 24, 2019 at 01:22:45PM +0000, Aisheng Dong wrote:
> > Add a53 and a72 clock id, as there's still no users, we update
> > IMX_LSIO_MEM_CLK base to start from 6 to allow a53 and a72 clock id to
> > be continued with a35 clk.
> >
> > Cc: Stephen Boyd <sboyd@kernel.org>
> > Cc: Rob Herring <robh+dt@kernel.org>
> > Cc: devicetree@vger.kernel.org
> > Cc: Shawn Guo <shawnguo@kernel.org>
> > Cc: Sascha Hauer <kernel@pengutronix.de>
> > Cc: Fabio Estevam <fabio.estevam@nxp.com>
> > Cc: Michael Turquette <mturquette@baylibre.com>
> > Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
> > ---
> > v1->v2:
> >  * change cpu clock to cpu cluster clock per Rob's suggestion
> > ---
> >  include/dt-bindings/clock/imx8-clock.h | 6 ++++--
> >  1 file changed, 4 insertions(+), 2 deletions(-)
> >
> > diff --git a/include/dt-bindings/clock/imx8-clock.h
> > b/include/dt-bindings/clock/imx8-clock.h
> > index b149e63..dcce744 100644
> > --- a/include/dt-bindings/clock/imx8-clock.h
> > +++ b/include/dt-bindings/clock/imx8-clock.h
> > @@ -14,10 +14,12 @@
> >  /* CPU */
> >  #define IMX_A35_CLK					1
> >  #define IMX_CPU_CLUSTER_A35_CLK				1
> > +#define IMX_CPU_CLUSTER_A53_CLK				2
> > +#define IMX_CPU_CLUSTER_A72_CLK				3
> 
> I still don't get this. How many clock outputs does the clock controller have for
> CPUs? If 3, then this is correct. If it's the same clock controller bits across
> different SoCs, then just name it something like IMX_CPU_CLUSTER_CLK and
> reuse the same ID.
> 

For SCU firmware based platforms like mx8qxp/qm, the clocks are provided
by SCU firmware via SCU firmware call with unique IDs. So it's safe to use a common
Clock IDs file.

But please ignore patch 3 and 4 first because we still met a few limitations with
current approach due to the device availability may vary a bit across CPUs and
Subsystems.

We formerly planned to add all new IDs for each SS and dynamically check availability
in driver. That can be done but that may involve a lot effort and may result in more
changes In driver. Also hard to upstream device tree code due to dependency on Clock IDs.

To relief this situation, we want to move the clock definition into device tree which
can fully decouple the dependency of Clock ID definition from device tree.
And no frequent changes required in clock driver.

I will send a patch set to do it later.

Regards
Dong Aisheng

> >  /* LSIO SS */
> > -#define IMX_LSIO_MEM_CLK				2
> > -#define IMX_LSIO_BUS_CLK				3
> > +#define IMX_LSIO_MEM_CLK				6
> > +#define IMX_LSIO_BUS_CLK				7
> 
> Changing numbering is not good, but I guess it's early for imx8.
> 
> >  #define IMX_LSIO_PWM0_CLK				10
> >  #define IMX_LSIO_PWM1_CLK				11
> >  #define IMX_LSIO_PWM2_CLK				12
> > --
> > 2.7.4
> >

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

* RE: [PATCH V3 5/5] clk: imx: scu: add fallback compatible string support
  2019-01-24 13:22 ` [PATCH V3 5/5] clk: imx: scu: add fallback compatible string support Aisheng Dong
@ 2019-02-20  7:09   ` Aisheng Dong
  2019-02-20 20:57     ` Stephen Boyd
  0 siblings, 1 reply; 13+ messages in thread
From: Aisheng Dong @ 2019-02-20  7:09 UTC (permalink / raw)
  To: linux-clk, Stephen Boyd
  Cc: linux-arm-kernel, mturquette, shawnguo, Fabio Estevam,
	dl-linux-imx, kernel, robh+dt, devicetree

Hi Stephen,

Can you help picked this one?
SCU clock is likely to be common, so we add a common
compatible string to handle it.

BTW Patch 1~2 already picked up by Shawn.
Patch 3~4 dropped.

Regards
Dong Aisheng

> -----Original Message-----
> From: Aisheng Dong
> Sent: Thursday, January 24, 2019 9:23 PM
> To: linux-clk@vger.kernel.org
> Cc: linux-arm-kernel@lists.infradead.org; sboyd@kernel.org;
> mturquette@baylibre.com; shawnguo@kernel.org; Fabio Estevam
> <fabio.estevam@nxp.com>; dl-linux-imx <linux-imx@nxp.com>;
> kernel@pengutronix.de; robh+dt@kernel.org; devicetree@vger.kernel.org;
> Aisheng Dong <aisheng.dong@nxp.com>
> Subject: [PATCH V3 5/5] clk: imx: scu: add fallback compatible string support
> 
> SCU clock can be used in a similar way by IMX8QXP and IMX8QM SoCs.
> Make the driver support "fsl,scu-clk" fallback compatible string to allow other
> SoCs to reuse the common part.
> 
> Cc: Shawn Guo <shawnguo@kernel.org>
> Cc: Sascha Hauer <kernel@pengutronix.de>
> Cc: Fabio Estevam <fabio.estevam@nxp.com>
> Cc: Stephen Boyd <sboyd@kernel.org>
> Cc: Michael Turquette <mturquette@baylibre.com>
> Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
> ---
>  drivers/clk/imx/clk-imx8qxp.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/clk/imx/clk-imx8qxp.c b/drivers/clk/imx/clk-imx8qxp.c index
> 83e2ef9..5e2903e 100644
> --- a/drivers/clk/imx/clk-imx8qxp.c
> +++ b/drivers/clk/imx/clk-imx8qxp.c
> @@ -138,6 +138,7 @@ static int imx8qxp_clk_probe(struct platform_device
> *pdev)  }
> 
>  static const struct of_device_id imx8qxp_match[] = {
> +	{ .compatible = "fsl,scu-clk", },
>  	{ .compatible = "fsl,imx8qxp-clk", },
>  	{ /* sentinel */ }
>  };
> --
> 2.7.4


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

* RE: [PATCH V3 4/5] dt-bindings: imx8-clock: add a53 and a72 clock id
  2019-02-20  7:07     ` Aisheng Dong
@ 2019-02-20 20:56       ` Stephen Boyd
  0 siblings, 0 replies; 13+ messages in thread
From: Stephen Boyd @ 2019-02-20 20:56 UTC (permalink / raw)
  To: Aisheng Dong, Rob Herring
  Cc: linux-clk, linux-arm-kernel, mturquette, shawnguo, Fabio Estevam,
	dl-linux-imx, kernel, devicetree

Quoting Aisheng Dong (2019-02-19 23:07:46)
> > From: Rob Herring [mailto:robh@kernel.org]
> > Sent: Thursday, February 14, 2019 6:18 AM
> > On Thu, Jan 24, 2019 at 01:22:45PM +0000, Aisheng Dong wrote:
> > > Add a53 and a72 clock id, as there's still no users, we update
> > > IMX_LSIO_MEM_CLK base to start from 6 to allow a53 and a72 clock id to
> > > be continued with a35 clk.
> > >
> > > Cc: Stephen Boyd <sboyd@kernel.org>
> > > Cc: Rob Herring <robh+dt@kernel.org>
> > > Cc: devicetree@vger.kernel.org
> > > Cc: Shawn Guo <shawnguo@kernel.org>
> > > Cc: Sascha Hauer <kernel@pengutronix.de>
> > > Cc: Fabio Estevam <fabio.estevam@nxp.com>
> > > Cc: Michael Turquette <mturquette@baylibre.com>
> > > Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
> > > ---
> > > v1->v2:
> > >  * change cpu clock to cpu cluster clock per Rob's suggestion
> > > ---
> > >  include/dt-bindings/clock/imx8-clock.h | 6 ++++--
> > >  1 file changed, 4 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/include/dt-bindings/clock/imx8-clock.h
> > > b/include/dt-bindings/clock/imx8-clock.h
> > > index b149e63..dcce744 100644
> > > --- a/include/dt-bindings/clock/imx8-clock.h
> > > +++ b/include/dt-bindings/clock/imx8-clock.h
> > > @@ -14,10 +14,12 @@
> > >  /* CPU */
> > >  #define IMX_A35_CLK                                        1
> > >  #define IMX_CPU_CLUSTER_A35_CLK                            1
> > > +#define IMX_CPU_CLUSTER_A53_CLK                            2
> > > +#define IMX_CPU_CLUSTER_A72_CLK                            3
> > 
> > I still don't get this. How many clock outputs does the clock controller have for
> > CPUs? If 3, then this is correct. If it's the same clock controller bits across
> > different SoCs, then just name it something like IMX_CPU_CLUSTER_CLK and
> > reuse the same ID.
> > 
> 
> For SCU firmware based platforms like mx8qxp/qm, the clocks are provided
> by SCU firmware via SCU firmware call with unique IDs. So it's safe to use a common
> Clock IDs file.
> 
> But please ignore patch 3 and 4 first because we still met a few limitations with
> current approach due to the device availability may vary a bit across CPUs and
> Subsystems.
> 
> We formerly planned to add all new IDs for each SS and dynamically check availability
> in driver. That can be done but that may involve a lot effort and may result in more
> changes In driver. Also hard to upstream device tree code due to dependency on Clock IDs.
> 
> To relief this situation, we want to move the clock definition into device tree which
> can fully decouple the dependency of Clock ID definition from device tree.
> And no frequent changes required in clock driver.
> 
> I will send a patch set to do it later.
> 

Ok. I'll take this as a signal to drop these from the clk review queue.
Thanks.

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

* RE: [PATCH V3 5/5] clk: imx: scu: add fallback compatible string support
  2019-02-20  7:09   ` Aisheng Dong
@ 2019-02-20 20:57     ` Stephen Boyd
  0 siblings, 0 replies; 13+ messages in thread
From: Stephen Boyd @ 2019-02-20 20:57 UTC (permalink / raw)
  To: linux-clk, Aisheng Dong, Stephen Boyd
  Cc: linux-arm-kernel, mturquette, shawnguo, Fabio Estevam,
	dl-linux-imx, kernel, robh+dt, devicetree

Quoting Aisheng Dong (2019-02-19 23:09:57)
> Hi Stephen,
> 
> Can you help picked this one?
> SCU clock is likely to be common, so we add a common
> compatible string to handle it.
> 
> BTW Patch 1~2 already picked up by Shawn.
> Patch 3~4 dropped.
> 

Sure. Picked into clk-next.


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

end of thread, back to index

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-24 13:22 [PATCH V3 0/5] dt-binding: clk: prepare for imx8qm clock support Aisheng Dong
2019-01-24 13:22 ` [PATCH V3 1/5] dt-bindings: fsl: scu: add fallback compatible string for clock Aisheng Dong
2019-02-01  6:21   ` Shawn Guo
2019-01-24 13:22 ` [PATCH V3 2/5] dt-bindings: fsl: scu: add imx8qm scu clock support Aisheng Dong
2019-02-01  6:22   ` Shawn Guo
2019-01-24 13:22 ` [PATCH V3 3/5] dt-bindings: clock: update CPU clock ID name Aisheng Dong
2019-01-24 13:22 ` [PATCH V3 4/5] dt-bindings: imx8-clock: add a53 and a72 clock id Aisheng Dong
2019-02-13 22:18   ` Rob Herring
2019-02-20  7:07     ` Aisheng Dong
2019-02-20 20:56       ` Stephen Boyd
2019-01-24 13:22 ` [PATCH V3 5/5] clk: imx: scu: add fallback compatible string support Aisheng Dong
2019-02-20  7:09   ` Aisheng Dong
2019-02-20 20:57     ` Stephen Boyd

Linux-Clk Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-clk/0 linux-clk/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-clk linux-clk/ https://lore.kernel.org/linux-clk \
		linux-clk@vger.kernel.org linux-clk@archiver.kernel.org
	public-inbox-index linux-clk


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-clk


AGPL code for this site: git clone https://public-inbox.org/ public-inbox