arm64: dts: rockchip: Fix power routing to support POE on rk3399-roc-pc
authorJagan Teki <jagan@amarulasolutions.com>
Tue, 18 Aug 2020 18:45:05 +0000 (00:15 +0530)
committerHeiko Stuebner <heiko@sntech.de>
Sun, 30 Aug 2020 18:56:59 +0000 (20:56 +0200)
When POE used, the current power routing is failing to power-up
the PMIC regulators which cause Linux boot hangs.

This patch is trying to update the power routing in order to
support Type C0 and POE powering methods.

As per the schematics, sys_12v is a common output power regulator
when type c and POE power being used. sys_12v is supplied by dc_12v
which is supplied from MP8859 in type c0 power routing and sys_12v
is supplied by MP8009 PoE PD in POE power supply routing.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Tested-by: Suniel Mahesh <sunil@amarulasolutions.com>
Link: https://lore.kernel.org/r/20200818184505.30064-1-jagan@amarulasolutions.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
arch/arm64/boot/dts/rockchip/rk3399-roc-pc-mezzanine.dts
arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi

index 2acb3d5..754627d 100644 (file)
        model = "Firefly ROC-RK3399-PC Mezzanine Board";
        compatible = "firefly,roc-rk3399-pc-mezzanine", "rockchip,rk3399";
 
+       /* MP8009 PoE PD */
+       poe_12v: poe-12v {
+               compatible = "regulator-fixed";
+               regulator-name = "poe_12v";
+               regulator-always-on;
+               regulator-boot-on;
+               regulator-min-microvolt = <12000000>;
+               regulator-max-microvolt = <12000000>;
+       };
+
        vcc3v3_ngff: vcc3v3-ngff {
                compatible = "regulator-fixed";
                regulator-name = "vcc3v3_ngff";
@@ -22,7 +32,7 @@
                regulator-boot-on;
                regulator-min-microvolt = <3300000>;
                regulator-max-microvolt = <3300000>;
-               vin-supply = <&dc_12v>;
+               vin-supply = <&sys_12v>;
        };
 
        vcc3v3_pcie: vcc3v3-pcie {
                pinctrl-0 = <&vcc3v3_pcie_en>;
                regulator-min-microvolt = <3300000>;
                regulator-max-microvolt = <3300000>;
-               vin-supply = <&dc_12v>;
+               vin-supply = <&sys_12v>;
        };
 };
 
+&sys_12v {
+       vin-supply = <&poe_12v>;
+};
+
 &pcie_phy {
        status = "okay";
 };
index b85ec31..e7a459f 100644 (file)
                regulator-max-microvolt = <5000000>;
        };
 
+       sys_12v: sys-12v {
+               compatible = "regulator-fixed";
+               regulator-name = "sys_12v";
+               regulator-always-on;
+               regulator-boot-on;
+               vin-supply = <&dc_12v>;
+       };
+
        /* switched by pmic_sleep */
        vcc1v8_s3: vcca1v8_s3: vcc1v8-s3 {
                compatible = "regulator-fixed";
                regulator-boot-on;
                regulator-min-microvolt = <3300000>;
                regulator-max-microvolt = <3300000>;
-               vin-supply = <&dc_12v>;
+               vin-supply = <&sys_12v>;
        };
 
        vcca_0v9: vcca-0v9 {
                regulator-boot-on;
                regulator-min-microvolt = <5000000>;
                regulator-max-microvolt = <5000000>;
-               vin-supply = <&dc_12v>;
+               vin-supply = <&sys_12v>;
        };
 
        vdd_log: vdd-log {