ARM: dts: Add CPU clock and OPP table for i.MX7ULP
Subsystems (2)
v2 cover ARM: dts: Add CPU clock and OPP table for i.MX7ULP
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.
---
Changes in v2:
- Update commig message in patch 1
- Link to v1: https://lore.kernel.org/r/[email protected]
---
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,
Signature · 1 line
Peng Fan <[email protected]>
PATCH v2 1/2 dt-bindings: fsl: imx7ulp-smc1: Add #clock-cells property
From: Peng Fan <[email protected]>
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.
--- Documentation/devicetree/bindings/arm/freescale/fsl,imx7ulp-pm.yaml | 5 +++++ 1 file changed, 5 insertions(+)
Documentation/devicetree/bindings/arm/freescale/fsl,imx7ulp-pm.yaml +5 -0
@@ -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>; };
Signature · 1 line
2.37.1
Re: [PATCH v2 1/2] dt-bindings: fsl: imx7ulp-smc1: Add #clock-cells property
Quoted 12 lines · Peng Fan (OSS)
From: Peng Fan <[email protected]>
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 inCHECK_DTBSschema 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)
Quoted 6 lines
These run modes determine the effective CPU operating point, and their programming is tied to the OPP table.
Add the missing
#clock-cellsdefinition so the dt-binding schema is consistent with the DTS and validates correctly.
This looks like a fix, especially that you make the cells required, so missing Fixes tag.
Best regards,
Krzysztof
PATCH v2 2/2 ARM: dts: imx7ulp: Add CPU clock and OPP table support
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
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.
--- arch/arm/boot/dts/nxp/imx/imx7ulp.dtsi | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+)
arch/arm/boot/dts/nxp/imx/imx7ulp.dtsi +28 -0
@@ -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>; }; };
Signature · 1 line
2.37.1