arm64: dts: rockchip: Enable regulators for Radxa E20C
authorChukun Pan <amadeus@jmu.edu.cn>
Tue, 1 Apr 2025 12:00:20 +0000 (20:00 +0800)
committerHeiko Stuebner <heiko@sntech.de>
Tue, 6 May 2025 08:09:48 +0000 (10:09 +0200)
Enable pwm and fixed regulators for Radxa E20C. The pwm regulator is
used to power the CPU and GPU. Note that the LPDDR4 voltage is 1.1V.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Reviewed-by: Jonas Karlman <jonas@kwiboo.se>
Link: https://lore.kernel.org/r/20250401120020.976343-3-amadeus@jmu.edu.cn
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts

index 6e77f7753ff7841689f930b1777612e98a71edd2..0942baba6b8fe164a2da23b3866327e17567b226 100644 (file)
@@ -9,6 +9,7 @@
 
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/leds/common.h>
+#include <dt-bindings/pwm/pwm.h>
 #include "rk3528.dtsi"
 
 / {
                };
        };
 
+       vdd_0v9: regulator-0v9-vdd {
+               compatible = "regulator-fixed";
+               regulator-name = "vdd_0v9";
+               regulator-always-on;
+               regulator-boot-on;
+               regulator-min-microvolt = <900000>;
+               regulator-max-microvolt = <900000>;
+               vin-supply = <&vcc5v0_sys>;
+       };
+
+       vcc_ddr: regulator-1v1-vcc-ddr {
+               compatible = "regulator-fixed";
+               regulator-name = "vcc_ddr";
+               regulator-always-on;
+               regulator-boot-on;
+               regulator-min-microvolt = <1100000>;
+               regulator-max-microvolt = <1100000>;
+               vin-supply = <&vcc5v0_sys>;
+       };
+
        vcc_1v8: regulator-1v8-vcc {
                compatible = "regulator-fixed";
                regulator-name = "vcc_1v8";
                regulator-min-microvolt = <5000000>;
                regulator-max-microvolt = <5000000>;
        };
+
+       vdd_arm: regulator-vdd-arm {
+               compatible = "pwm-regulator";
+               pwms = <&pwm1 0 5000 PWM_POLARITY_INVERTED>;
+               pwm-supply = <&vcc5v0_sys>;
+               regulator-name = "vdd_arm";
+               regulator-always-on;
+               regulator-boot-on;
+               regulator-min-microvolt = <746000>;
+               regulator-max-microvolt = <1201000>;
+               regulator-settling-time-up-us = <250>;
+       };
+
+       vdd_logic: regulator-vdd-logic {
+               compatible = "pwm-regulator";
+               pwms = <&pwm2 0 5000 PWM_POLARITY_INVERTED>;
+               pwm-supply = <&vcc5v0_sys>;
+               regulator-name = "vdd_logic";
+               regulator-always-on;
+               regulator-boot-on;
+               regulator-min-microvolt = <705000>;
+               regulator-max-microvolt = <1006000>;
+               regulator-settling-time-up-us = <250>;
+       };
+};
+
+&cpu0 {
+       cpu-supply = <&vdd_arm>;
+};
+
+&cpu1 {
+       cpu-supply = <&vdd_arm>;
+};
+
+&cpu2 {
+       cpu-supply = <&vdd_arm>;
+};
+
+&cpu3 {
+       cpu-supply = <&vdd_arm>;
 };
 
 &i2c1 {
        };
 };
 
+&pwm1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pwm1m0_pins>;
+       status = "okay";
+};
+
+&pwm2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pwm2m0_pins>;
+       status = "okay";
+};
+
 &saradc {
        vref-supply = <&vcc_1v8>;
        status = "okay";