]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
riscv: dts: spacemit: enable PMIC on OrangePi R2S
authorChukun Pan <amadeus@jmu.edu.cn>
Wed, 20 May 2026 10:00:00 +0000 (18:00 +0800)
committerYixun Lan <dlan@kernel.org>
Mon, 1 Jun 2026 06:32:42 +0000 (06:32 +0000)
Enable the i2c8 interface and add the connected SpacemiT P1 PMIC and
its associated regulators to support voltage regulation on the board.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Reviewed-by: Yixun lan <dlan@kernel.org>
Link: https://patch.msgid.link/20260520100000.575719-1-amadeus@jmu.edu.cn
Signed-off-by: Yixun Lan <dlan@kernel.org>
arch/riscv/boot/dts/spacemit/k1-orangepi-r2s.dts

index 1ecc40749e5ac10717a2e3e83363b4e1e8ee08fb..b13a8d6a2670e34a11cb8f8c9b33fbbb3666c132 100644 (file)
@@ -13,6 +13,7 @@
        compatible = "xunlong,orangepi-r2s", "spacemit,k1";
 
        aliases {
+               i2c8 = &i2c8;
                serial0 = &uart0;
                ethernet0 = &eth0;
                ethernet1 = &eth1;
                stdout-path = "serial0";
        };
 
+       vcc4v0: regulator-vcc4v0 {
+               compatible = "regulator-fixed";
+               regulator-name = "vcc4v0";
+               regulator-always-on;
+               regulator-boot-on;
+               regulator-min-microvolt = <4000000>;
+               regulator-max-microvolt = <4000000>;
+       };
+
        vcc5v0_usb: regulator-vcc5v0-usb {
                compatible = "regulator-fixed";
                enable-active-high;
        };
 };
 
+&i2c8 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c8_cfg>;
+       status = "okay";
+
+       pmic@41 {
+               compatible = "spacemit,p1";
+               reg = <0x41>;
+               interrupts = <64>;
+               vin1-supply = <&vcc4v0>;
+               vin2-supply = <&vcc4v0>;
+               vin3-supply = <&vcc4v0>;
+               vin4-supply = <&vcc4v0>;
+               vin5-supply = <&vcc4v0>;
+               vin6-supply = <&vcc4v0>;
+               aldoin-supply = <&vcc4v0>;
+               dldoin1-supply = <&buck5>;
+               dldoin2-supply = <&buck5>;
+
+               regulators {
+                       buck1 {
+                               regulator-min-microvolt = <500000>;
+                               regulator-max-microvolt = <3450000>;
+                               regulator-ramp-delay = <5000>;
+                               regulator-always-on;
+                       };
+
+                       buck2 {
+                               regulator-min-microvolt = <500000>;
+                               regulator-max-microvolt = <3450000>;
+                               regulator-ramp-delay = <5000>;
+                               regulator-always-on;
+                       };
+
+                       buck3_1v8: buck3 {
+                               regulator-min-microvolt = <500000>;
+                               regulator-max-microvolt = <1800000>;
+                               regulator-ramp-delay = <5000>;
+                               regulator-always-on;
+                       };
+
+                       buck4_3v3: buck4 {
+                               regulator-min-microvolt = <500000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-ramp-delay = <5000>;
+                               regulator-always-on;
+                       };
+
+                       buck5: buck5 {
+                               regulator-min-microvolt = <500000>;
+                               regulator-max-microvolt = <3450000>;
+                               regulator-ramp-delay = <5000>;
+                               regulator-always-on;
+                       };
+
+                       buck6 {
+                               regulator-min-microvolt = <500000>;
+                               regulator-max-microvolt = <3450000>;
+                               regulator-ramp-delay = <5000>;
+                               regulator-always-on;
+                       };
+
+                       aldo1_3v3: aldo1 {
+                               regulator-min-microvolt = <500000>;
+                               regulator-max-microvolt = <3400000>;
+                               regulator-boot-on;
+                       };
+
+                       aldo2 {
+                               regulator-min-microvolt = <500000>;
+                               regulator-max-microvolt = <3400000>;
+                       };
+
+                       aldo3 {
+                               regulator-min-microvolt = <500000>;
+                               regulator-max-microvolt = <3400000>;
+                       };
+
+                       aldo4 {
+                               regulator-min-microvolt = <500000>;
+                               regulator-max-microvolt = <3400000>;
+                       };
+
+                       dldo1 {
+                               regulator-min-microvolt = <500000>;
+                               regulator-max-microvolt = <3400000>;
+                               regulator-boot-on;
+                       };
+
+                       dldo2 {
+                               regulator-min-microvolt = <500000>;
+                               regulator-max-microvolt = <3400000>;
+                       };
+
+                       dldo3 {
+                               regulator-min-microvolt = <500000>;
+                               regulator-max-microvolt = <3400000>;
+                       };
+
+                       dldo4 {
+                               regulator-min-microvolt = <500000>;
+                               regulator-max-microvolt = <3400000>;
+                               regulator-always-on;
+                       };
+
+                       dldo5 {
+                               regulator-min-microvolt = <500000>;
+                               regulator-max-microvolt = <3400000>;
+                       };
+
+                       dldo6 {
+                               regulator-min-microvolt = <500000>;
+                               regulator-max-microvolt = <3400000>;
+                               regulator-always-on;
+                       };
+
+                       dldo7 {
+                               regulator-min-microvolt = <500000>;
+                               regulator-max-microvolt = <3400000>;
+                       };
+               };
+       };
+};
+
 &pdma {
        status = "okay";
 };