ath79: qihoo,c301: use phy-supply for usb vbus
authorChuanhong Guo <gch981213@gmail.com>
Sun, 12 Jul 2020 07:39:18 +0000 (15:39 +0800)
committerChuanhong Guo <gch981213@gmail.com>
Sun, 12 Jul 2020 07:39:18 +0000 (15:39 +0800)
Linux phy subsystem provides support for a phy regulator defined via
phy-supply property. Use it to turn on usb power only when usb is
probed.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
target/linux/ath79/dts/ar9344_qihoo_c301.dts

index 2d5b5b3ab22b66d90a00fc65984076014ecd789c..2b5d920b8bafb9fb2d63ba6c0d2454064e81f969 100644 (file)
                gpio = <&gpio 18 GPIO_ACTIVE_LOW>;
        };
 
-       reg_usb_vbus {
+       usb_vbus: reg_usb_vbus {
                compatible = "regulator-fixed";
                regulator-name = "usb_vbus";
                regulator-min-microvolt = <5000000>;
                regulator-max-microvolt = <5000000>;
                enable-active-high;
-               regulator-always-on;
                gpio = <&gpio 19 GPIO_ACTIVE_HIGH>;
        };
 };
 
 &usb_phy {
        status = "okay";
+       phy-supply = <&usb_vbus>;
 };
 
 &pcie {