public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH 0/2] ARM: dts: Add CPU clock and OPP table for i.MX7ULP
@ 2026-02-26 11:04 Peng Fan (OSS)
  2026-02-26 11:04 ` [PATCH 1/2] dt-bindings: fsl: fsl,imx7ulp-smc1: Add #clock-cells Peng Fan (OSS)
  2026-02-26 11:04 ` [PATCH 2/2] ARM: dts: imx7ulp: Add CPU clock and OPP table support Peng Fan (OSS)
  0 siblings, 2 replies; 5+ messages in thread
From: Peng Fan (OSS) @ 2026-02-26 11:04 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Frank Li,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam, A.s. Dong
  Cc: devicetree, imx, linux-arm-kernel, linux-kernel, Peng Fan

Patch 1 is a binding update to add missing #clock-cells, otherwise
there is CHECK_DTBS warning.
clock-controller@40410000 (fsl,imx7ulp-smc1): '#clock-cells' does not match any of the regexes: '^pinctrl-[0-9]+$'

And the clock will be used for cpufreq as done in patch 2.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
Peng Fan (2):
      dt-bindings: fsl: fsl,imx7ulp-smc1: Add #clock-cells
      ARM: dts: imx7ulp: Add CPU clock and OPP table support

 .../bindings/arm/freescale/fsl,imx7ulp-pm.yaml     |  5 ++++
 arch/arm/boot/dts/nxp/imx/imx7ulp.dtsi             | 28 ++++++++++++++++++++++
 2 files changed, 33 insertions(+)
---
base-commit: 3ef088b0c5772a6f75634e54aa34f5fc0a2c041c
change-id: 20260226-imx7ulp-c48516ee22b4

Best regards,
-- 
Peng Fan <peng.fan@nxp.com>



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

* [PATCH 1/2] dt-bindings: fsl: fsl,imx7ulp-smc1: Add #clock-cells
  2026-02-26 11:04 [PATCH 0/2] ARM: dts: Add CPU clock and OPP table for i.MX7ULP Peng Fan (OSS)
@ 2026-02-26 11:04 ` Peng Fan (OSS)
  2026-02-26 18:32   ` Conor Dooley
  2026-02-26 11:04 ` [PATCH 2/2] ARM: dts: imx7ulp: Add CPU clock and OPP table support Peng Fan (OSS)
  1 sibling, 1 reply; 5+ messages in thread
From: Peng Fan (OSS) @ 2026-02-26 11:04 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Frank Li,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam, A.s. Dong
  Cc: devicetree, imx, linux-arm-kernel, linux-kernel, Peng Fan

From: Peng Fan <peng.fan@nxp.com>

Add missing #clock-cells to make it work as a clock controller.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 Documentation/devicetree/bindings/arm/freescale/fsl,imx7ulp-pm.yaml | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/Documentation/devicetree/bindings/arm/freescale/fsl,imx7ulp-pm.yaml b/Documentation/devicetree/bindings/arm/freescale/fsl,imx7ulp-pm.yaml
index 9d377e193c123c7de0ec4db4d4a649ed966b2d9a..7ad470260c0d08bd1e7146ef49e5f60dd6c6d4d7 100644
--- a/Documentation/devicetree/bindings/arm/freescale/fsl,imx7ulp-pm.yaml
+++ b/Documentation/devicetree/bindings/arm/freescale/fsl,imx7ulp-pm.yaml
@@ -28,6 +28,9 @@ properties:
   reg:
     maxItems: 1
 
+  '#clock-cells':
+    const: 1
+
   clocks:
     maxItems: 2
 
@@ -39,6 +42,7 @@ properties:
 required:
   - compatible
   - reg
+  - '#clock-cells'
 
 additionalProperties: false
 
@@ -47,4 +51,5 @@ examples:
     smc1@40410000 {
         compatible = "fsl,imx7ulp-smc1";
         reg = <0x40410000 0x1000>;
+        #clock-cells = <1>;
     };

-- 
2.37.1



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

* [PATCH 2/2] ARM: dts: imx7ulp: Add CPU clock and OPP table support
  2026-02-26 11:04 [PATCH 0/2] ARM: dts: Add CPU clock and OPP table for i.MX7ULP Peng Fan (OSS)
  2026-02-26 11:04 ` [PATCH 1/2] dt-bindings: fsl: fsl,imx7ulp-smc1: Add #clock-cells Peng Fan (OSS)
@ 2026-02-26 11:04 ` Peng Fan (OSS)
  1 sibling, 0 replies; 5+ messages in thread
From: Peng Fan (OSS) @ 2026-02-26 11:04 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Frank Li,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam, A.s. Dong
  Cc: devicetree, imx, linux-arm-kernel, linux-kernel, Peng Fan

From: Peng Fan <peng.fan@nxp.com>

Add missing CPU clock definitions and operating-points-v2 table for the
Cortex-A7 on i.MX7ULP to enable proper CPU frequency scaling and
integration with the cpufreq/OPP frameworks.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 arch/arm/boot/dts/nxp/imx/imx7ulp.dtsi | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/arch/arm/boot/dts/nxp/imx/imx7ulp.dtsi b/arch/arm/boot/dts/nxp/imx/imx7ulp.dtsi
index 880b9a4f32b0846a773dbf9ad30715c84ac2fda6..1355feda1aa72d88dcf56033dfdeaae631c108f8 100644
--- a/arch/arm/boot/dts/nxp/imx/imx7ulp.dtsi
+++ b/arch/arm/boot/dts/nxp/imx/imx7ulp.dtsi
@@ -41,6 +41,34 @@ cpu0: cpu@f00 {
 			compatible = "arm,cortex-a7";
 			device_type = "cpu";
 			reg = <0xf00>;
+			clocks = <&smc1 IMX7ULP_CLK_ARM>,
+				 <&scg1 IMX7ULP_CLK_CORE>,
+				 <&scg1 IMX7ULP_CLK_SYS_SEL>,
+				 <&scg1 IMX7ULP_CLK_HSRUN_CORE>,
+				 <&scg1 IMX7ULP_CLK_HSRUN_SYS_SEL>,
+				 <&scg1 IMX7ULP_CLK_FIRC>;
+			clock-names = "arm", "core", "scs_sel",
+				      "hsrun_core", "hsrun_scs_sel",
+				      "firc";
+			operating-points-v2 = <&cpu0_opp_table>;
+		};
+	};
+
+	cpu0_opp_table: opp-table {
+		compatible = "operating-points-v2";
+		opp-shared;
+
+		opp-500210000 {
+			opp-hz = /bits/ 64 <500210000>;
+			opp-microvolt = <1025000>;
+			clock-latency-ns = <150000>;
+			opp-suspend;
+		};
+
+		opp-720000000 {
+			opp-hz = /bits/ 64 <720000000>;
+			opp-microvolt = <1125000>;
+			clock-latency-ns = <150000>;
 		};
 	};
 

-- 
2.37.1



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

* Re: [PATCH 1/2] dt-bindings: fsl: fsl,imx7ulp-smc1: Add #clock-cells
  2026-02-26 11:04 ` [PATCH 1/2] dt-bindings: fsl: fsl,imx7ulp-smc1: Add #clock-cells Peng Fan (OSS)
@ 2026-02-26 18:32   ` Conor Dooley
  2026-02-27  1:11     ` Peng Fan
  0 siblings, 1 reply; 5+ messages in thread
From: Conor Dooley @ 2026-02-26 18:32 UTC (permalink / raw)
  To: Peng Fan (OSS)
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Frank Li,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam, A.s. Dong,
	devicetree, imx, linux-arm-kernel, linux-kernel, Peng Fan

[-- Attachment #1: Type: text/plain, Size: 1394 bytes --]

On Thu, Feb 26, 2026 at 07:04:15PM +0800, Peng Fan (OSS) wrote:
> From: Peng Fan <peng.fan@nxp.com>
> 
> Add missing #clock-cells to make it work as a clock controller.

Yes, that is what adding #clock-cells would do, but why is it correct to
do? That's what your commit message needs to explain.

> 
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
>  Documentation/devicetree/bindings/arm/freescale/fsl,imx7ulp-pm.yaml | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/arm/freescale/fsl,imx7ulp-pm.yaml b/Documentation/devicetree/bindings/arm/freescale/fsl,imx7ulp-pm.yaml
> index 9d377e193c123c7de0ec4db4d4a649ed966b2d9a..7ad470260c0d08bd1e7146ef49e5f60dd6c6d4d7 100644
> --- a/Documentation/devicetree/bindings/arm/freescale/fsl,imx7ulp-pm.yaml
> +++ b/Documentation/devicetree/bindings/arm/freescale/fsl,imx7ulp-pm.yaml
> @@ -28,6 +28,9 @@ properties:
>    reg:
>      maxItems: 1
>  
> +  '#clock-cells':
> +    const: 1
> +
>    clocks:
>      maxItems: 2
>  
> @@ -39,6 +42,7 @@ properties:
>  required:
>    - compatible
>    - reg
> +  - '#clock-cells'
>  
>  additionalProperties: false
>  
> @@ -47,4 +51,5 @@ examples:
>      smc1@40410000 {
>          compatible = "fsl,imx7ulp-smc1";
>          reg = <0x40410000 0x1000>;
> +        #clock-cells = <1>;
>      };
> 
> -- 
> 2.37.1
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

* RE: [PATCH 1/2] dt-bindings: fsl: fsl,imx7ulp-smc1: Add #clock-cells
  2026-02-26 18:32   ` Conor Dooley
@ 2026-02-27  1:11     ` Peng Fan
  0 siblings, 0 replies; 5+ messages in thread
From: Peng Fan @ 2026-02-27  1:11 UTC (permalink / raw)
  To: Conor Dooley, Peng Fan (OSS)
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Frank Li,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	Aisheng Dong, devicetree@vger.kernel.org, imx@lists.linux.dev,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org

Hi Conor,

> Subject: Re: [PATCH 1/2] dt-bindings: fsl: fsl,imx7ulp-smc1: Add #clock-
> cells
> 
> On Thu, Feb 26, 2026 at 07:04:15PM +0800, Peng Fan (OSS) wrote:
> > From: Peng Fan <peng.fan@nxp.com>
> >
> > Add missing #clock-cells to make it work as a clock controller.
> 
> Yes, that is what adding #clock-cells would do, but why is it correct to
> do? That's what your commit message needs to explain.

Without #clock-cells, there is CHECK_DTBS error, #clock-cells
was added in imx7ulp.dtsi, but missed in dt-bindings.

smc1 supports run mode control
00b - Normal Run mode (RUN)
01b - Reserved
10b - Very-Low-Power Run mode (VLPR)
11b - High Speed Run mode (HSRUN)

This is taken as cpu clock settings. When set this registers,
the cpu will be configured to run as specified frequencies as written
in patch 2(OPP table).

I will update commit msg in V2.

Thanks,
Peng.

> 
> >
> > Signed-off-by: Peng Fan <peng.fan@nxp.com>
> > ---
> >  Documentation/devicetree/bindings/arm/freescale/fsl,imx7ulp-
> pm.yaml |
> > 5 +++++
> >  1 file changed, 5 insertions(+)
> >
> > diff --git
> > a/Documentation/devicetree/bindings/arm/freescale/fsl,imx7ulp-
> pm.yaml
> > b/Documentation/devicetree/bindings/arm/freescale/fsl,imx7ulp-
> pm.yaml
> > index
> >
> 9d377e193c123c7de0ec4db4d4a649ed966b2d9a..7ad470260c0d08b
> d1e7146ef49e5
> > f60dd6c6d4d7 100644
> > ---
> > a/Documentation/devicetree/bindings/arm/freescale/fsl,imx7ulp-
> pm.yaml
> > +++
> b/Documentation/devicetree/bindings/arm/freescale/fsl,imx7ulp-pm.y
> > +++ aml
> > @@ -28,6 +28,9 @@ properties:
> >    reg:
> >      maxItems: 1
> >
> > +  '#clock-cells':
> > +    const: 1
> > +
> >    clocks:
> >      maxItems: 2
> >
> > @@ -39,6 +42,7 @@ properties:
> >  required:
> >    - compatible
> >    - reg
> > +  - '#clock-cells'
> >
> >  additionalProperties: false
> >
> > @@ -47,4 +51,5 @@ examples:
> >      smc1@40410000 {
> >          compatible = "fsl,imx7ulp-smc1";
> >          reg = <0x40410000 0x1000>;
> > +        #clock-cells = <1>;
> >      };
> >
> > --
> > 2.37.1
> >


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

end of thread, other threads:[~2026-02-27  1:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-26 11:04 [PATCH 0/2] ARM: dts: Add CPU clock and OPP table for i.MX7ULP Peng Fan (OSS)
2026-02-26 11:04 ` [PATCH 1/2] dt-bindings: fsl: fsl,imx7ulp-smc1: Add #clock-cells Peng Fan (OSS)
2026-02-26 18:32   ` Conor Dooley
2026-02-27  1:11     ` Peng Fan
2026-02-26 11:04 ` [PATCH 2/2] ARM: dts: imx7ulp: Add CPU clock and OPP table support Peng Fan (OSS)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox