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>
gpio = <&gpio 18 GPIO_ACTIVE_LOW>;
};
gpio = <&gpio 18 GPIO_ACTIVE_LOW>;
};
+ usb_vbus: reg_usb_vbus {
compatible = "regulator-fixed";
regulator-name = "usb_vbus";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
enable-active-high;
compatible = "regulator-fixed";
regulator-name = "usb_vbus";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
enable-active-high;
gpio = <&gpio 19 GPIO_ACTIVE_HIGH>;
};
};
gpio = <&gpio 19 GPIO_ACTIVE_HIGH>;
};
};
&usb_phy {
status = "okay";
&usb_phy {
status = "okay";
+ phy-supply = <&usb_vbus>;