SCMI clocks on RK356x
Subsystems (3)
Heiko Stuebner
maintainercover SCMI clocks on RK356x
This cleans up the existing use of SCMI clocks on the RK356x SoCs.
Heiko Stuebner (3):
dt-bindings: clock: rk3568: Add SCMI clock ids
arm64: dts: rockchip: use SCMI clock id for cpu clock on rk356x
arm64: dts: rockchip: add missing clocks for cpu cores on rk356
arch/arm64/boot/dts/rockchip/rk356x-base.dtsi | 5 ++++- include/dt-bindings/clock/rk3568-cru.h | 6 ++++++ 2 files changed, 10 insertions(+), 1 deletion(-)
Signature · 1 line
2.47.2
Heiko Stuebner
maintainerPATCH 1/3 dt-bindings: clock: rk3568: Add SCMI clock ids
The Trusted Firmware on RK3568 exposes 3 clocks via the SCMI clock interface. Add descriptive IDs for them.
The clock ids are used in both the older vendor-binary TF-A, as well as the recently merged upstream SCMI clock implementation.
--- include/dt-bindings/clock/rk3568-cru.h | 6 ++++++ 1 file changed, 6 insertions(+)
include/dt-bindings/clock/rk3568-cru.h +6 -0
@@ -483,6 +483,12 @@#define PCLK_CORE_PVTM 450 +/* scmi-clocks indices */ + +#define SCMI_CLK_CPU 0 +#define SCMI_CLK_GPU 1 +#define SCMI_CLK_NPU 2 +/* pmu soft-reset indices */ /* pmucru_softrst_con0 */ #define SRST_P_PDPMU_NIU 0
Signature · 1 line
2.47.2
Re: [PATCH 1/3] dt-bindings: clock: rk3568: Add SCMI clock ids
pw-bot: not-applicable
Re: [PATCH 1/3] dt-bindings: clock: rk3568: Add SCMI clock ids
In reply to Heiko StuebnerQuoted 17 lines · Heiko Stuebner
The Trusted Firmware on RK3568 exposes 3 clocks via the SCMI clock interface. Add descriptive IDs for them.
The clock ids are used in both the older vendor-binary TF-A, as well as the recently merged upstream SCMI clock implementation.
Signed-off-by Heiko Stuebner <[email protected]>--- include/dt-bindings/clock/rk3568-cru.h | 6 ++++++ 1 file changed, 6 insertions(+)include/dt-bindings/clock/rk3568-cru.h +0
-0
include/dt-bindings/clock/rk3568-cru.h line 491
Quoted 9 lines
include/dt-bindings/clock/rk3568-cru.h +6
-0@@ -483,6 +483,12 @@#define PCLK_CORE_PVTM 450 +/* scmi-clocks indices */ + +#define SCMI_CLK_CPU 0 +#define SCMI_CLK_GPU 1 +#define SCMI_CLK_NPU 2 +
This corresponds with the id's in ``clock_table`` in TF-A's ``plat/rockchip/rk3568/drivers/scmi/rk3568_clk.c`` file, so
Quoted 3 lines
include/dt-bindings/clock/rk3568-cru.h +0
-0/* pmu soft-reset indices */ /* pmucru_softrst_con0 */ #define SRST_P_PDPMU_NIU 0
Heiko Stuebner
maintainerPATCH 2/3 arm64: dts: rockchip: use SCMI clock id for cpu clock on rk356x
In reply to Heiko StuebnerInstead of hard-coding 0, use the more descriptive ID from the binding to reference the SCMI clock for the cpu on rk356x.
--- arch/arm64/boot/dts/rockchip/rk356x-base.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/rockchip/rk356x-base.dtsi +1 -1
@@ -53,7 +53,7 @@ cpu0: cpu@0 { device_type = "cpu"; compatible = "arm,cortex-a55"; reg = <0x0 0x0>; - clocks = <&scmi_clk 0>; + clocks = <&scmi_clk SCMI_CLK_CPU>; #cooling-cells = <2>; enable-method = "psci"; i-cache-size = <0x8000>;
Signature · 1 line
2.47.2
Re: [PATCH 2/3] arm64: dts: rockchip: use SCMI clock id for cpu clock on rk356x
Hi Heiko,
Quoted 2 lines · Heiko Stuebner
Instead of hard-coding 0, use the more descriptive ID from the binding to reference the SCMI clock for the cpu on rk356x.
Any particular reason you only did it for the cpu, but not the gpu?
Quoted 10 lines
Signed-off-by Heiko Stuebner <[email protected]>--- arch/arm64/boot/dts/rockchip/rk356x-base.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/arm64/boot/dts/rockchip/rk356x-base.dtsi +0
-0
arch/arm64/boot/dts/rockchip/rk356x-base.dtsi cpu0: cpu@0 { · line 56
Quoted 5 lines
arch/arm64/boot/dts/rockchip/rk356x-base.dtsi +1
-1@@ -53,7 +53,7 @@ cpu0: cpu@0 { device_type = "cpu"; compatible = "arm,cortex-a55"; reg = <0x0 0x0>; - clocks = <&scmi_clk 0>; + clocks = <&scmi_clk SCMI_CLK_CPU>;
Regardless of the above comment, feel free to add
Cheers,
Diederik
Quoted 3 lines
arch/arm64/boot/dts/rockchip/rk356x-base.dtsi +0
-0#cooling-cells = <2>; enable-method = "psci"; i-cache-size = <0x8000>;
Heiko Stuebner
maintainerRe: [PATCH 2/3] arm64: dts: rockchip: use SCMI clock id for cpu clock on rk356x
Am Mittwoch, 5. November 2025, 14:16:42 Mitteleuropäische Normalzeit schrieb Diederik de Haas:
Quoted 7 lines
Hi Heiko,
Quoted 2 lines · Heiko Stuebner
Instead of hard-coding 0, use the more descriptive ID from the binding to reference the SCMI clock for the cpu on rk356x.
Any particular reason you only did it for the cpu, but not the gpu?
Didn't think of if at the time :-) .
Will prepare another one for the GPU.
Heiko
Quoted 29 lines
Quoted 11 lines
Signed-off-by Heiko Stuebner <[email protected]>--- arch/arm64/boot/dts/rockchip/rk356x-base.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/arm64/boot/dts/rockchip/rk356x-base.dtsi +0
-0arch/arm64/boot/dts/rockchip/rk356x-base.dtsi cpu0: cpu@0 { · line 56
Quoted 5 lines
arch/arm64/boot/dts/rockchip/rk356x-base.dtsi +1
-1@@ -53,7 +53,7 @@ cpu0: cpu@0 { device_type = "cpu"; compatible = "arm,cortex-a55"; reg = <0x0 0x0>; - clocks = <&scmi_clk 0>; + clocks = <&scmi_clk SCMI_CLK_CPU>;Regardless of the above comment, feel free to add
Reviewed-by Diederik de Haas <[email protected]>Cheers,
DiederikQuoted 3 lines
arch/arm64/boot/dts/rockchip/rk356x-base.dtsi +0
-0#cooling-cells = <2>; enable-method = "psci"; i-cache-size = <0x8000>;
Heiko Stuebner
maintainerPATCH 3/3 arm64: dts: rockchip: add missing clocks for cpu cores on rk356x
In reply to Heiko StuebnerAll cpu cores are supplied by the same clock, but all except the first core are missing that clocks reference - add the missing ones.
--- arch/arm64/boot/dts/rockchip/rk356x-base.dtsi | 3 +++ 1 file changed, 3 insertions(+)
arch/arm64/boot/dts/rockchip/rk356x-base.dtsi +3 -0
@@ -69,6 +69,7 @@ cpu1: cpu@100 { device_type = "cpu"; compatible = "arm,cortex-a55"; reg = <0x0 0x100>; + clocks = <&scmi_clk SCMI_CLK_CPU>; #cooling-cells = <2>; enable-method = "psci"; i-cache-size = <0x8000>;
@@ -84,6 +85,7 @@ cpu2: cpu@200 { device_type = "cpu"; compatible = "arm,cortex-a55"; reg = <0x0 0x200>; + clocks = <&scmi_clk SCMI_CLK_CPU>; #cooling-cells = <2>; enable-method = "psci"; i-cache-size = <0x8000>;
@@ -99,6 +101,7 @@ cpu3: cpu@300 { device_type = "cpu"; compatible = "arm,cortex-a55"; reg = <0x0 0x300>; + clocks = <&scmi_clk SCMI_CLK_CPU>; #cooling-cells = <2>; enable-method = "psci"; i-cache-size = <0x8000>;
Signature · 1 line
2.47.2
Re: [PATCH 3/3] arm64: dts: rockchip: add missing clocks for cpu cores on rk356x
Quoted 2 lines · Heiko Stuebner
All cpu cores are supplied by the same clock, but all except the first core are missing that clocks reference - add the missing ones.
I noticed it myself some time ago (but failed to sent a patch), so
Cheers,
Diederik
Quoted 33 lines
Signed-off-by Heiko Stuebner <[email protected]>--- arch/arm64/boot/dts/rockchip/rk356x-base.dtsi | 3 +++ 1 file changed, 3 insertions(+)arch/arm64/boot/dts/rockchip/rk356x-base.dtsi +3
-0@@ -69,6 +69,7 @@ cpu1: cpu@100 { device_type = "cpu"; compatible = "arm,cortex-a55"; reg = <0x0 0x100>; + clocks = <&scmi_clk SCMI_CLK_CPU>; #cooling-cells = <2>; enable-method = "psci"; i-cache-size = <0x8000>;@@ -84,6 +85,7 @@ cpu2: cpu@200 { device_type = "cpu"; compatible = "arm,cortex-a55"; reg = <0x0 0x200>; + clocks = <&scmi_clk SCMI_CLK_CPU>; #cooling-cells = <2>; enable-method = "psci"; i-cache-size = <0x8000>;@@ -99,6 +101,7 @@ cpu3: cpu@300 { device_type = "cpu"; compatible = "arm,cortex-a55"; reg = <0x0 0x300>; + clocks = <&scmi_clk SCMI_CLK_CPU>; #cooling-cells = <2>; enable-method = "psci"; i-cache-size = <0x8000>;
Quoted 9 lines · Heiko Stuebner
This cleans up the existing use of SCMI clocks on the RK356x SoCs.
Heiko Stuebner (3):
dt-bindings: clock: rk3568: Add SCMI clock ids
arm64: dts: rockchip: use SCMI clock id for cpu clock on rk356x
arm64: dts: rockchip: add missing clocks for cpu cores on rk356[...]
Applied, thanks!
[1/3] dt-bindings: clock: rk3568: Add SCMI clock ids
commit: 88b6a93af4345e901206d0576bdb4e88ea3eaeb8
[2/3] arm64: dts: rockchip: use SCMI clock id for cpu clock on rk356x
commit: ff8912700f31782021ec28c530de1482fa99eab3
[3/3] arm64: dts: rockchip: add missing clocks for cpu cores on rk356x
commit: e06a419eaab9cee7cd5bbb0cfcfbe49e443a9d75Best regards,
Signature · 1 line
Heiko Stuebner <[email protected]>