arm64: dts: rockchip: Add CPU/memory regulator coupling for 2 RK3588 boards
authorAlexey Charkov <alchark@gmail.com>
Mon, 17 Jun 2024 18:28:55 +0000 (22:28 +0400)
committerHeiko Stuebner <heiko@sntech.de>
Mon, 24 Jun 2024 16:14:03 +0000 (18:14 +0200)
RK3588 chips allow for their CPU cores to be powered by a different
supply vs. their corresponding memory interfaces, and two of the
boards currently upstream do that (EVB1 and QuartzPro64).

The voltage of the memory interface though has to match that of the
CPU cores that use it, which downstream kernels achieve by the means
of a custom cpufreq driver which adjusts both at the same time.

It seems that regulator coupling is a more appropriate generic
interface for it, so this patch introduces coupling to affected
device trees to ensure that memory interface voltage is also updated
whenever cpufreq switches between CPU OPPs.

Note that other boards, such as Radxa Rock 5B, define both the CPU
and memory interface regulators as aliases to the same DT node, so
this doesn't apply there.

Signed-off-by: Alexey Charkov <alchark@gmail.com>
Link: https://lore.kernel.org/r/20240617-rk-dts-additions-v5-5-c1f5f3267f1e@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts
arch/arm64/boot/dts/rockchip/rk3588-quartzpro64.dts

index 7c3696a3ad3ad105f806201b8bd8e633ed037517..00f660d50127f75e9f4952fd0ea80bb0680916fe 100644 (file)
                        vdd_cpu_big1_s0: dcdc-reg1 {
                                regulator-always-on;
                                regulator-boot-on;
+                               regulator-coupled-with = <&vdd_cpu_big1_mem_s0>;
+                               regulator-coupled-max-spread = <10000>;
                                regulator-min-microvolt = <550000>;
                                regulator-max-microvolt = <1050000>;
                                regulator-ramp-delay = <12500>;
                        vdd_cpu_big0_s0: dcdc-reg2 {
                                regulator-always-on;
                                regulator-boot-on;
+                               regulator-coupled-with = <&vdd_cpu_big0_mem_s0>;
+                               regulator-coupled-max-spread = <10000>;
                                regulator-min-microvolt = <550000>;
                                regulator-max-microvolt = <1050000>;
                                regulator-ramp-delay = <12500>;
                        vdd_cpu_lit_s0: dcdc-reg3 {
                                regulator-always-on;
                                regulator-boot-on;
+                               regulator-coupled-with = <&vdd_cpu_lit_mem_s0>;
+                               regulator-coupled-max-spread = <10000>;
                                regulator-min-microvolt = <550000>;
                                regulator-max-microvolt = <950000>;
                                regulator-ramp-delay = <12500>;
                        vdd_cpu_big1_mem_s0: dcdc-reg5 {
                                regulator-always-on;
                                regulator-boot-on;
+                               regulator-coupled-with = <&vdd_cpu_big1_s0>;
+                               regulator-coupled-max-spread = <10000>;
                                regulator-min-microvolt = <675000>;
                                regulator-max-microvolt = <1050000>;
                                regulator-ramp-delay = <12500>;
                        vdd_cpu_big0_mem_s0: dcdc-reg6 {
                                regulator-always-on;
                                regulator-boot-on;
+                               regulator-coupled-with = <&vdd_cpu_big0_s0>;
+                               regulator-coupled-max-spread = <10000>;
                                regulator-min-microvolt = <675000>;
                                regulator-max-microvolt = <1050000>;
                                regulator-ramp-delay = <12500>;
                        vdd_cpu_lit_mem_s0: dcdc-reg8 {
                                regulator-always-on;
                                regulator-boot-on;
+                               regulator-coupled-with = <&vdd_cpu_lit_s0>;
+                               regulator-coupled-max-spread = <10000>;
                                regulator-min-microvolt = <675000>;
                                regulator-max-microvolt = <950000>;
                                regulator-ramp-delay = <12500>;
index b4f22d95ac0e1c0a2ac2dbf6f3d154f887275870..baeb08d665c78392a2cac97558950c2b97d61466 100644 (file)
                                regulator-name = "vdd_cpu_big1_s0";
                                regulator-always-on;
                                regulator-boot-on;
+                               regulator-coupled-with = <&vdd_cpu_big1_mem_s0>;
+                               regulator-coupled-max-spread = <10000>;
                                regulator-min-microvolt = <550000>;
                                regulator-max-microvolt = <1050000>;
                                regulator-ramp-delay = <12500>;
                                regulator-name = "vdd_cpu_big0_s0";
                                regulator-always-on;
                                regulator-boot-on;
+                               regulator-coupled-with = <&vdd_cpu_big0_mem_s0>;
+                               regulator-coupled-max-spread = <10000>;
                                regulator-min-microvolt = <550000>;
                                regulator-max-microvolt = <1050000>;
                                regulator-ramp-delay = <12500>;
                                regulator-name = "vdd_cpu_lit_s0";
                                regulator-always-on;
                                regulator-boot-on;
+                               regulator-coupled-with = <&vdd_cpu_lit_mem_s0>;
+                               regulator-coupled-max-spread = <10000>;
                                regulator-min-microvolt = <550000>;
                                regulator-max-microvolt = <950000>;
                                regulator-ramp-delay = <12500>;
                                regulator-name = "vdd_cpu_big1_mem_s0";
                                regulator-always-on;
                                regulator-boot-on;
+                               regulator-coupled-with = <&vdd_cpu_big1_s0>;
+                               regulator-coupled-max-spread = <10000>;
                                regulator-min-microvolt = <675000>;
                                regulator-max-microvolt = <1050000>;
                                regulator-ramp-delay = <12500>;
                                regulator-name = "vdd_cpu_big0_mem_s0";
                                regulator-always-on;
                                regulator-boot-on;
+                               regulator-coupled-with = <&vdd_cpu_big0_s0>;
+                               regulator-coupled-max-spread = <10000>;
                                regulator-min-microvolt = <675000>;
                                regulator-max-microvolt = <1050000>;
                                regulator-ramp-delay = <12500>;
                                regulator-name = "vdd_cpu_lit_mem_s0";
                                regulator-always-on;
                                regulator-boot-on;
+                               regulator-coupled-with = <&vdd_cpu_lit_s0>;
+                               regulator-coupled-max-spread = <10000>;
                                regulator-min-microvolt = <675000>;
                                regulator-max-microvolt = <950000>;
                                regulator-ramp-delay = <12500>;