mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v3 0/2] ARM: dts: Add CPU clock and OPP table for i.MX7ULP
@ 2026-03-02 15:07 Peng Fan (OSS)
  2026-03-02 15:07 ` [PATCH v3 1/2] dt-bindings: fsl: imx7ulp-smc1: Add #clock-cells property Peng Fan (OSS)
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Peng Fan (OSS) @ 2026-03-02 15:07 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,
	Krzysztof Kozlowski

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>
---
Changes in v3:
- Add R-b and Fixes tag for patch 1
- Link to v2: https://lore.kernel.org/r/20260227-imx7ulp-v2-0-1c7fa8862ebc@nxp.com

Changes in v2:
- Update commig message in patch 1
- Link to v1: https://lore.kernel.org/r/20260226-imx7ulp-v1-0-3fd611ceb346@nxp.com

---
Peng Fan (2):
      dt-bindings: fsl: imx7ulp-smc1: Add #clock-cells property
      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 v3 1/2] dt-bindings: fsl: imx7ulp-smc1: Add #clock-cells property
  2026-03-02 15:07 [PATCH v3 0/2] ARM: dts: Add CPU clock and OPP table for i.MX7ULP Peng Fan (OSS)
@ 2026-03-02 15:07 ` Peng Fan (OSS)
  2026-03-02 15:07 ` [PATCH v3 2/2] ARM: dts: imx7ulp: Add CPU clock and OPP table support Peng Fan (OSS)
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Peng Fan (OSS) @ 2026-03-02 15:07 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,
	Krzysztof Kozlowski

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

The SMC1 block on i.MX7ULP is already used as a clock provider in
imx7ulp.dtsi, but the corresponding dt-binding schema does not define
the required '#clock-cells' property. This results in CHECK_DTBS schema
validation errors.

Functionally, SMC1 controls the CPU run mode configuration:
  - 00b: Normal Run (RUN)
  - 10b: Very-Low-Power Run (VLPR)
  - 11b: High-Speed Run (HSRUN)

These run modes determine the effective CPU operating point, and their
programming is tied to the OPP table.

Add the missing `#clock-cells` definition so the dt-binding schema is
consistent with the DTS and validates correctly.

Fixes: 8ba41d6bd9893 ("dt-bindings: fsl: Convert i.MX7ULP PM to json-schema")
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
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	[flat|nested] 5+ messages in thread

* [PATCH v3 2/2] ARM: dts: imx7ulp: Add CPU clock and OPP table support
  2026-03-02 15:07 [PATCH v3 0/2] ARM: dts: Add CPU clock and OPP table for i.MX7ULP Peng Fan (OSS)
  2026-03-02 15:07 ` [PATCH v3 1/2] dt-bindings: fsl: imx7ulp-smc1: Add #clock-cells property Peng Fan (OSS)
@ 2026-03-02 15:07 ` Peng Fan (OSS)
  2026-03-09 16:12 ` (subset) [PATCH v3 0/2] ARM: dts: Add CPU clock and OPP table for i.MX7ULP Frank Li
  2026-03-09 16:16 ` Frank Li
  3 siblings, 0 replies; 5+ messages in thread
From: Peng Fan (OSS) @ 2026-03-02 15:07 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	[flat|nested] 5+ messages in thread

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


On Mon, 02 Mar 2026 23:07:40 +0800, Peng Fan (OSS) wrote:
> 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.
> 
> 
> [...]

Applied, thanks!

[1/2] dt-bindings: fsl: imx7ulp-smc1: Add #clock-cells property
      commit: cb794619c2d29b882f6eec3b6ad4a1ca5afab312

Best regards,
-- 
Frank Li <Frank.Li@nxp.com>

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

* Re: (subset) [PATCH v3 0/2] ARM: dts: Add CPU clock and OPP table for i.MX7ULP
  2026-03-02 15:07 [PATCH v3 0/2] ARM: dts: Add CPU clock and OPP table for i.MX7ULP Peng Fan (OSS)
                   ` (2 preceding siblings ...)
  2026-03-09 16:12 ` (subset) [PATCH v3 0/2] ARM: dts: Add CPU clock and OPP table for i.MX7ULP Frank Li
@ 2026-03-09 16:16 ` Frank Li
  3 siblings, 0 replies; 5+ messages in thread
From: Frank Li @ 2026-03-09 16:16 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, A.s. Dong, Peng Fan (OSS)
  Cc: Frank Li, devicetree, imx, linux-arm-kernel, linux-kernel,
	Peng Fan, Krzysztof Kozlowski


On Mon, 02 Mar 2026 23:07:40 +0800, Peng Fan (OSS) wrote:
> 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.
> 
> 
> [...]

Applied, thanks!

[2/2] ARM: dts: imx7ulp: Add CPU clock and OPP table support
      commit: 2314ecf275ae371638e1f35a346823d0b45de6eb

Best regards,
-- 
Frank Li <Frank.Li@nxp.com>

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

end of thread, other threads:[~2026-03-09 16:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-03-02 15:07 [PATCH v3 0/2] ARM: dts: Add CPU clock and OPP table for i.MX7ULP Peng Fan (OSS)
2026-03-02 15:07 ` [PATCH v3 1/2] dt-bindings: fsl: imx7ulp-smc1: Add #clock-cells property Peng Fan (OSS)
2026-03-02 15:07 ` [PATCH v3 2/2] ARM: dts: imx7ulp: Add CPU clock and OPP table support Peng Fan (OSS)
2026-03-09 16:12 ` (subset) [PATCH v3 0/2] ARM: dts: Add CPU clock and OPP table for i.MX7ULP Frank Li
2026-03-09 16:16 ` Frank Li

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

all inboxes | Powered by JetHome®