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 (4): dt-bindings: fsl: scu: add fallback compatible string for clock dt-bindings: fsl: scu: add imx8qm scu clock support clk: imx: scu: add fallback compatible string support dt-bindings: imx8-clock: add a53 and a72 clock id Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt | 7 +++++-- drivers/clk/imx/clk-imx8qxp.c | 1 + include/dt-bindings/clock/imx8-clock.h | 6 ++++-- 3 files changed, 10 insertions(+), 4 deletions(-) -- 2.7.4
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: 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> --- 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 27784b6..5ec6dca 100644 --- a/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt +++ b/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt @@ -70,7 +70,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 @@ -137,7 +139,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
Add imx8qm scu clock support 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> --- Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt b/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt index 5ec6dca..b6a883e 100644 --- a/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt +++ b/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt @@ -71,7 +71,8 @@ This binding uses the common clock binding[1]. Required properties: - compatible: Should be one of: - "fsl,imx8qxp-clock" + "fsl,imx8qm-clock", + "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 -- 2.7.4
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: 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> --- 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
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> --- 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 4236818..2f1aa2f 100644 --- a/include/dt-bindings/clock/imx8-clock.h +++ b/include/dt-bindings/clock/imx8-clock.h @@ -13,10 +13,12 @@ /* CPU */ #define IMX_A35_CLK 1 +#define IMX_A53_CLK 2 +#define IMX_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
Ping...
BTW, as the first two patches change the same firmware binding doc fs.scu.txt.
I'm not sure whether it should go to Shawn's tree for the binding part, or Stephen's clock tree.
Shawn & Stephen,
What's your suggestion?
Regards
Dong Aisheng
> From: Aisheng Dong [mailto:aisheng.dong@nxp.com]
> Sent: Friday, January 11, 2019 7:56 PM
>
> 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 (4):
> dt-bindings: fsl: scu: add fallback compatible string for clock
> dt-bindings: fsl: scu: add imx8qm scu clock support
> clk: imx: scu: add fallback compatible string support
> dt-bindings: imx8-clock: add a53 and a72 clock id
>
> Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt | 7 +++++--
> drivers/clk/imx/clk-imx8qxp.c | 1 +
> include/dt-bindings/clock/imx8-clock.h | 6 ++++--
> 3 files changed, 10 insertions(+), 4 deletions(-)
>
> --
> 2.7.4
On Wed, Jan 16, 2019 at 05:40:01AM +0000, Aisheng Dong wrote: > Ping... > > BTW, as the first two patches change the same firmware binding doc fs.scu.txt. > I'm not sure whether it should go to Shawn's tree for the binding part, or Stephen's clock tree. > > Shawn & Stephen, > What's your suggestion? I can apply the first two to my tree as long as Rob and Stephen ack on them. Shawn > > Regards > Dong Aisheng > > > From: Aisheng Dong [mailto:aisheng.dong@nxp.com] > > Sent: Friday, January 11, 2019 7:56 PM > > > > 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 (4): > > dt-bindings: fsl: scu: add fallback compatible string for clock > > dt-bindings: fsl: scu: add imx8qm scu clock support > > clk: imx: scu: add fallback compatible string support > > dt-bindings: imx8-clock: add a53 and a72 clock id > > > > Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt | 7 +++++-- > > drivers/clk/imx/clk-imx8qxp.c | 1 + > > include/dt-bindings/clock/imx8-clock.h | 6 ++++-- > > 3 files changed, 10 insertions(+), 4 deletions(-) > > > > -- > > 2.7.4 >
On Fri, 11 Jan 2019 11:55:56 +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: 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>
> ---
> Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
Reviewed-by: Rob Herring <robh@kernel.org>
On Fri, Jan 11, 2019 at 11:56:00AM +0000, Aisheng Dong wrote: > Add imx8qm scu clock support > > 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> > --- > Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt b/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt > index 5ec6dca..b6a883e 100644 > --- a/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt > +++ b/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt > @@ -71,7 +71,8 @@ This binding uses the common clock binding[1]. > > Required properties: > - compatible: Should be one of: > - "fsl,imx8qxp-clock" > + "fsl,imx8qm-clock", > + "fsl,imx8qxp-clock". No need for the punctuation here. The whole point of one per line is to have 1 line changes. Otherwise, Reviewed-by: Rob Herring <robh@kernel.org> > 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 > -- > 2.7.4 >
On Fri, Jan 11, 2019 at 11:56:09AM +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> > --- > 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 4236818..2f1aa2f 100644 > --- a/include/dt-bindings/clock/imx8-clock.h > +++ b/include/dt-bindings/clock/imx8-clock.h > @@ -13,10 +13,12 @@ > > /* CPU */ > #define IMX_A35_CLK 1 > +#define IMX_A53_CLK 2 > +#define IMX_A72_CLK 3 All 3 cores in one chip? If not maybe these should be split or define them as cpu cluster x clocks. > > /* 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 >
> > Required properties: > > - compatible: Should be one of: > > - "fsl,imx8qxp-clock" > > + "fsl,imx8qm-clock", > > + "fsl,imx8qxp-clock". > > No need for the punctuation here. The whole point of one per line is to have 1 > line changes. Otherwise, > Got it, thanks. I will update it later. > Reviewed-by: Rob Herring <robh@kernel.org> > > > 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 > > -- > > 2.7.4 > >
> From: Rob Herring [mailto:robh@kernel.org] > Sent: Tuesday, January 22, 2019 8:10 AM > > On Fri, Jan 11, 2019 at 11:56:09AM +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> > > --- > > 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 4236818..2f1aa2f 100644 > > --- a/include/dt-bindings/clock/imx8-clock.h > > +++ b/include/dt-bindings/clock/imx8-clock.h > > @@ -13,10 +13,12 @@ > > > > /* CPU */ > > #define IMX_A35_CLK 1 > > +#define IMX_A53_CLK 2 > > +#define IMX_A72_CLK 3 > > All 3 cores in one chip? If not maybe these should be split or define them as > cpu cluster x clocks. > Not in one chip. Here are common clock IDs used for both MX8QXP and MX8QM. You mean change to something like below? #define IMX_CPU_CLUSTER_A53_CLK 2 #define IMX_CPU_CLUSTER_A72_CLK 3 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 > > #define IMX_LSIO_PWM0_CLK 10 > > #define IMX_LSIO_PWM1_CLK 11 > > #define IMX_LSIO_PWM2_CLK 12 > > -- > > 2.7.4 > >
Quoting Aisheng Dong (2019-01-11 03:55:56)
> 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: 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>
> ---
Acked-by: Stephen Boyd <sboyd@kernel.org>
Quoting Aisheng Dong (2019-01-11 03:56:00)
> Add imx8qm scu clock support
>
> 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>
> ---
Acked-by: Stephen Boyd <sboyd@kernel.org>
Quoting Shawn Guo (2019-01-16 03:02:17)
> On Wed, Jan 16, 2019 at 05:40:01AM +0000, Aisheng Dong wrote:
> > Ping...
> >
> > BTW, as the first two patches change the same firmware binding doc fs.scu.txt.
> > I'm not sure whether it should go to Shawn's tree for the binding part, or Stephen's clock tree.
> >
> > Shawn & Stephen,
> > What's your suggestion?
>
> I can apply the first two to my tree as long as Rob and Stephen ack on
> them.
>
The first two are documentation updates? I don't care really either way,
so I gave my ack in case you want to pick them up before I get around to
the rest of the series.
On Tue, Jan 22, 2019 at 6:59 AM Aisheng Dong <aisheng.dong@nxp.com> wrote:
>
> > From: Rob Herring [mailto:robh@kernel.org]
> > Sent: Tuesday, January 22, 2019 8:10 AM
> >
> > On Fri, Jan 11, 2019 at 11:56:09AM +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>
> > > ---
> > > 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 4236818..2f1aa2f 100644
> > > --- a/include/dt-bindings/clock/imx8-clock.h
> > > +++ b/include/dt-bindings/clock/imx8-clock.h
> > > @@ -13,10 +13,12 @@
> > >
> > > /* CPU */
> > > #define IMX_A35_CLK 1
> > > +#define IMX_A53_CLK 2
> > > +#define IMX_A72_CLK 3
> >
> > All 3 cores in one chip? If not maybe these should be split or define them as
> > cpu cluster x clocks.
> >
>
> Not in one chip.
> Here are common clock IDs used for both MX8QXP and MX8QM.
> You mean change to something like below?
>
> #define IMX_CPU_CLUSTER_A53_CLK 2
> #define IMX_CPU_CLUSTER_A72_CLK 3
What happened to A35? What I'm saying is if the same clock controller
registers are used across chips even if the cores are different, use
the same clock ID. Ideally, clock IDs have some relationship to the
h/w such as their control register address and offset.
To put it another way, don't create a common number space of clock IDs
across SoCs unless they are strictly subsets and supersets of each
other.
Rob