linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] arm64: dts: imx8mm: Add NOC node
@ 2021-11-03 13:53 Tommaso Merciai
  2021-11-03 18:55 ` Adam Ford
  0 siblings, 1 reply; 4+ messages in thread
From: Tommaso Merciai @ 2021-11-03 13:53 UTC (permalink / raw)
  Cc: tomm.merciai, Rob Herring, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Lucas Stach, Joakim Zhang, Frieder Schrempf, Alice Guo, Peng Fan,
	Adam Ford, devicetree, linux-arm-kernel, linux-kernel

Add support for dynamic frequency scaling of the main NOC configuration
on imx8mm.

References:
 - i.MX 8M Mini Applications Processor RM, Rev. 3, 11/2020
 - f18e6d573b80 arm64: dts: imx8mq: Add NOC node
 - 912b9dacf3f0 arm64: dts: imx8mq: increase NOC clock to 800 MHz
 - https://source.codeaurora.org/external/imx/linux-imx/tree/arch/ \
   arm64/boot/dts/freescale/imx8mm.dtsi?h=lf-5.10.y

---
Changes since v1:
 - Fix noc_opp_table frequencies taking NXP bsp as reference
 - Add reference link to nxp imx8mm dtsi on commit body

 arch/arm64/boot/dts/freescale/imx8mm.dtsi | 25 +++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/arch/arm64/boot/dts/freescale/imx8mm.dtsi b/arch/arm64/boot/dts/freescale/imx8mm.dtsi
index c2f3f118f82e..1bcc5e361ca3 100644
--- a/arch/arm64/boot/dts/freescale/imx8mm.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mm.dtsi
@@ -719,6 +719,31 @@ pgc_mipi: power-domain@11 {
 			};
 		};
 
+		noc: interconnect@32700000 {
+			compatible = "fsl,imx8mm-noc", "fsl,imx8m-noc";
+			reg = <0x32700000 0x100000>;
+			clocks = <&clk IMX8MM_CLK_NOC>;
+			fsl,ddrc = <&ddrc>;
+			#interconnect-cells = <1>;
+			operating-points-v2 = <&noc_opp_table>;
+
+			noc_opp_table: opp-table {
+				compatible = "operating-points-v2";
+
+				opp-150M {
+					opp-hz = /bits/ 64 <150000000>;
+				};
+
+				opp-375M {
+					opp-hz = /bits/ 64 <375000000>;
+				};
+
+				opp-750M {
+					opp-hz = /bits/ 64 <750000000>;
+				};
+			};
+		};
+
 		aips2: bus@30400000 {
 			compatible = "fsl,aips-bus", "simple-bus";
 			reg = <0x30400000 0x400000>;
-- 
2.25.1


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

* Re: [PATCH v2] arm64: dts: imx8mm: Add NOC node
  2021-11-03 13:53 [PATCH v2] arm64: dts: imx8mm: Add NOC node Tommaso Merciai
@ 2021-11-03 18:55 ` Adam Ford
  2021-11-03 23:08   ` Tommaso Merciai
  0 siblings, 1 reply; 4+ messages in thread
From: Adam Ford @ 2021-11-03 18:55 UTC (permalink / raw)
  To: Tommaso Merciai
  Cc: Rob Herring, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, NXP Linux Team, Lucas Stach, Joakim Zhang,
	Frieder Schrempf, Alice Guo, Peng Fan, devicetree, arm-soc,
	Linux Kernel Mailing List

On Wed, Nov 3, 2021 at 8:53 AM Tommaso Merciai <tomm.merciai@gmail.com> wrote:
>
> Add support for dynamic frequency scaling of the main NOC configuration
> on imx8mm.
>
> References:
>  - i.MX 8M Mini Applications Processor RM, Rev. 3, 11/2020
>  - f18e6d573b80 arm64: dts: imx8mq: Add NOC node
>  - 912b9dacf3f0 arm64: dts: imx8mq: increase NOC clock to 800 MHz
>  - https://source.codeaurora.org/external/imx/linux-imx/tree/arch/ \
>    arm64/boot/dts/freescale/imx8mm.dtsi?h=lf-5.10.y
>

You're missing the signed-off-by tag.

From what I can tell, the default NOC clock is 750MHz.  With this
patch enabled, i can manually change the NOC clock to 150, 375 or 750,
but it's not clear to me what this impacts.  In the 8MQ, there are a
couple peripherals that are linked to the NOC, but we don't have those
same peripherals enabled in the 8mm.  The
dt-bindings/interconnect/imx8mq.h list more NOC references than are
used in the device tree, so it's unclear to me if and what we need to
reference anything in the 8MM based on
dt-bindings/interconnect/imx8mm.h

adam

> ---
> Changes since v1:
>  - Fix noc_opp_table frequencies taking NXP bsp as reference
>  - Add reference link to nxp imx8mm dtsi on commit body
>
>  arch/arm64/boot/dts/freescale/imx8mm.dtsi | 25 +++++++++++++++++++++++
>  1 file changed, 25 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/freescale/imx8mm.dtsi b/arch/arm64/boot/dts/freescale/imx8mm.dtsi
> index c2f3f118f82e..1bcc5e361ca3 100644
> --- a/arch/arm64/boot/dts/freescale/imx8mm.dtsi
> +++ b/arch/arm64/boot/dts/freescale/imx8mm.dtsi
> @@ -719,6 +719,31 @@ pgc_mipi: power-domain@11 {
>                         };
>                 };
>
> +               noc: interconnect@32700000 {
> +                       compatible = "fsl,imx8mm-noc", "fsl,imx8m-noc";
> +                       reg = <0x32700000 0x100000>;
> +                       clocks = <&clk IMX8MM_CLK_NOC>;
> +                       fsl,ddrc = <&ddrc>;
> +                       #interconnect-cells = <1>;
> +                       operating-points-v2 = <&noc_opp_table>;
> +
> +                       noc_opp_table: opp-table {
> +                               compatible = "operating-points-v2";
> +
> +                               opp-150M {
> +                                       opp-hz = /bits/ 64 <150000000>;
> +                               };
> +
> +                               opp-375M {
> +                                       opp-hz = /bits/ 64 <375000000>;
> +                               };
> +
> +                               opp-750M {
> +                                       opp-hz = /bits/ 64 <750000000>;
> +                               };
> +                       };
> +               };
> +
>                 aips2: bus@30400000 {
>                         compatible = "fsl,aips-bus", "simple-bus";
>                         reg = <0x30400000 0x400000>;
> --
> 2.25.1
>

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

* Re: [PATCH v2] arm64: dts: imx8mm: Add NOC node
  2021-11-03 18:55 ` Adam Ford
@ 2021-11-03 23:08   ` Tommaso Merciai
  2021-11-03 23:21     ` Adam Ford
  0 siblings, 1 reply; 4+ messages in thread
From: Tommaso Merciai @ 2021-11-03 23:08 UTC (permalink / raw)
  To: Adam Ford
  Cc: Rob Herring, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, NXP Linux Team, Lucas Stach, Joakim Zhang,
	Frieder Schrempf, Alice Guo, Peng Fan, devicetree, arm-soc,
	Linux Kernel Mailing List

On Wed, Nov 03, 2021 at 01:55:54PM -0500, Adam Ford wrote:
> On Wed, Nov 3, 2021 at 8:53 AM Tommaso Merciai <tomm.merciai@gmail.com> wrote:
> >
> > Add support for dynamic frequency scaling of the main NOC configuration
> > on imx8mm.
> >
> > References:
> >  - i.MX 8M Mini Applications Processor RM, Rev. 3, 11/2020
> >  - f18e6d573b80 arm64: dts: imx8mq: Add NOC node
> >  - 912b9dacf3f0 arm64: dts: imx8mq: increase NOC clock to 800 MHz
> >  - https://source.codeaurora.org/external/imx/linux-imx/tree/arch/ \
> >    arm64/boot/dts/freescale/imx8mm.dtsi?h=lf-5.10.y
> >
> 
> You're missing the signed-off-by tag.
  
  Yes, sorry.
> 
> From what I can tell, the default NOC clock is 750MHz.  With this
> patch enabled, i can manually change the NOC clock to 150, 375 or 750,
> but it's not clear to me what this impacts.  In the 8MQ, there are a
> couple peripherals that are linked to the NOC, but we don't have those
> same peripherals enabled in the 8mm.  The
> dt-bindings/interconnect/imx8mq.h list more NOC references than are
> used in the device tree, so it's unclear to me if and what we need to
> reference anything in the 8MM based on
> dt-bindings/interconnect/imx8mm.h
> 
> adam

 Hi Adam,
 Yes you are right, you mean that NOC is using default frequencies than
 this this node at the moment is only a duplicate. But on the other
 side, maybe in the future someone will need to modify default table and
 use it. What do you think about? Let me know.

 Thanks,
 Tommaso
> 
> > ---
> > Changes since v1:
> >  - Fix noc_opp_table frequencies taking NXP bsp as reference
> >  - Add reference link to nxp imx8mm dtsi on commit body
> >
> >  arch/arm64/boot/dts/freescale/imx8mm.dtsi | 25 +++++++++++++++++++++++
> >  1 file changed, 25 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/freescale/imx8mm.dtsi b/arch/arm64/boot/dts/freescale/imx8mm.dtsi
> > index c2f3f118f82e..1bcc5e361ca3 100644
> > --- a/arch/arm64/boot/dts/freescale/imx8mm.dtsi
> > +++ b/arch/arm64/boot/dts/freescale/imx8mm.dtsi
> > @@ -719,6 +719,31 @@ pgc_mipi: power-domain@11 {
> >                         };
> >                 };
> >
> > +               noc: interconnect@32700000 {
> > +                       compatible = "fsl,imx8mm-noc", "fsl,imx8m-noc";
> > +                       reg = <0x32700000 0x100000>;
> > +                       clocks = <&clk IMX8MM_CLK_NOC>;
> > +                       fsl,ddrc = <&ddrc>;
> > +                       #interconnect-cells = <1>;
> > +                       operating-points-v2 = <&noc_opp_table>;
> > +
> > +                       noc_opp_table: opp-table {
> > +                               compatible = "operating-points-v2";
> > +
> > +                               opp-150M {
> > +                                       opp-hz = /bits/ 64 <150000000>;
> > +                               };
> > +
> > +                               opp-375M {
> > +                                       opp-hz = /bits/ 64 <375000000>;
> > +                               };
> > +
> > +                               opp-750M {
> > +                                       opp-hz = /bits/ 64 <750000000>;
> > +                               };
> > +                       };
> > +               };
> > +
> >                 aips2: bus@30400000 {
> >                         compatible = "fsl,aips-bus", "simple-bus";
> >                         reg = <0x30400000 0x400000>;
> > --
> > 2.25.1
> >

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

* Re: [PATCH v2] arm64: dts: imx8mm: Add NOC node
  2021-11-03 23:08   ` Tommaso Merciai
@ 2021-11-03 23:21     ` Adam Ford
  0 siblings, 0 replies; 4+ messages in thread
From: Adam Ford @ 2021-11-03 23:21 UTC (permalink / raw)
  To: Tommaso Merciai
  Cc: Rob Herring, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, NXP Linux Team, Lucas Stach, Joakim Zhang,
	Frieder Schrempf, Alice Guo, Peng Fan, devicetree, arm-soc,
	Linux Kernel Mailing List, Abel Vesa

On Wed, Nov 3, 2021 at 6:08 PM Tommaso Merciai <tomm.merciai@gmail.com> wrote:
>
> On Wed, Nov 03, 2021 at 01:55:54PM -0500, Adam Ford wrote:
> > On Wed, Nov 3, 2021 at 8:53 AM Tommaso Merciai <tomm.merciai@gmail.com> wrote:
> > >
> > > Add support for dynamic frequency scaling of the main NOC configuration
> > > on imx8mm.
> > >
> > > References:
> > >  - i.MX 8M Mini Applications Processor RM, Rev. 3, 11/2020
> > >  - f18e6d573b80 arm64: dts: imx8mq: Add NOC node
> > >  - 912b9dacf3f0 arm64: dts: imx8mq: increase NOC clock to 800 MHz
> > >  - https://source.codeaurora.org/external/imx/linux-imx/tree/arch/ \
> > >    arm64/boot/dts/freescale/imx8mm.dtsi?h=lf-5.10.y
> > >
> >
> > You're missing the signed-off-by tag.
>
>   Yes, sorry.
> >
> > From what I can tell, the default NOC clock is 750MHz.  With this
> > patch enabled, i can manually change the NOC clock to 150, 375 or 750,
> > but it's not clear to me what this impacts.  In the 8MQ, there are a
> > couple peripherals that are linked to the NOC, but we don't have those
> > same peripherals enabled in the 8mm.  The
> > dt-bindings/interconnect/imx8mq.h list more NOC references than are
> > used in the device tree, so it's unclear to me if and what we need to
> > reference anything in the 8MM based on
> > dt-bindings/interconnect/imx8mm.h
> >
> > adam
>

+ Abel

>  Hi Adam,
>  Yes you are right, you mean that NOC is using default frequencies than
>  this this node at the moment is only a duplicate. But on the other
>  side, maybe in the future someone will need to modify default table and
>  use it. What do you think about? Let me know.

There is some discussion with Abel at [1].  I would defer to him to
see what he wants to do.  At a minimum, I would resubmit the patch
with the s-o-b tag enabled, but I'd wait to see if there is any
objection.

[1] - https://lkml.org/lkml/2021/10/25/259

adam
>
>  Thanks,
>  Tommaso
> >
> > > ---
> > > Changes since v1:
> > >  - Fix noc_opp_table frequencies taking NXP bsp as reference
> > >  - Add reference link to nxp imx8mm dtsi on commit body
> > >
> > >  arch/arm64/boot/dts/freescale/imx8mm.dtsi | 25 +++++++++++++++++++++++
> > >  1 file changed, 25 insertions(+)
> > >
> > > diff --git a/arch/arm64/boot/dts/freescale/imx8mm.dtsi b/arch/arm64/boot/dts/freescale/imx8mm.dtsi
> > > index c2f3f118f82e..1bcc5e361ca3 100644
> > > --- a/arch/arm64/boot/dts/freescale/imx8mm.dtsi
> > > +++ b/arch/arm64/boot/dts/freescale/imx8mm.dtsi
> > > @@ -719,6 +719,31 @@ pgc_mipi: power-domain@11 {
> > >                         };
> > >                 };
> > >
> > > +               noc: interconnect@32700000 {
> > > +                       compatible = "fsl,imx8mm-noc", "fsl,imx8m-noc";
> > > +                       reg = <0x32700000 0x100000>;
> > > +                       clocks = <&clk IMX8MM_CLK_NOC>;
> > > +                       fsl,ddrc = <&ddrc>;
> > > +                       #interconnect-cells = <1>;
> > > +                       operating-points-v2 = <&noc_opp_table>;
> > > +
> > > +                       noc_opp_table: opp-table {
> > > +                               compatible = "operating-points-v2";
> > > +
> > > +                               opp-150M {
> > > +                                       opp-hz = /bits/ 64 <150000000>;
> > > +                               };
> > > +
> > > +                               opp-375M {
> > > +                                       opp-hz = /bits/ 64 <375000000>;
> > > +                               };
> > > +
> > > +                               opp-750M {
> > > +                                       opp-hz = /bits/ 64 <750000000>;
> > > +                               };
> > > +                       };
> > > +               };
> > > +
> > >                 aips2: bus@30400000 {
> > >                         compatible = "fsl,aips-bus", "simple-bus";
> > >                         reg = <0x30400000 0x400000>;
> > > --
> > > 2.25.1
> > >

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

end of thread, other threads:[~2021-11-03 23:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-03 13:53 [PATCH v2] arm64: dts: imx8mm: Add NOC node Tommaso Merciai
2021-11-03 18:55 ` Adam Ford
2021-11-03 23:08   ` Tommaso Merciai
2021-11-03 23:21     ` Adam Ford

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