diff options
author | Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk> | 2018-06-07 16:33:57 +0000 |
---|---|---|
committer | John Crispin <john@phrozen.org> | 2018-06-08 09:31:36 +0200 |
commit | 8110bf18f4c1d04e8dfe94438caeadf78ceac892 (patch) | |
tree | 33a068d618a341fb8ee013b732de18f7f38191cc /target/linux/ramips/dts | |
parent | 4363b5362fc48cf3d3ae9d7f5363d4efeba8bf7c (diff) | |
download | upstream-8110bf18f4c1d04e8dfe94438caeadf78ceac892.tar.gz upstream-8110bf18f4c1d04e8dfe94438caeadf78ceac892.tar.bz2 upstream-8110bf18f4c1d04e8dfe94438caeadf78ceac892.zip |
ramips: mir3g dts define usb port Vcc volt regulator GPIO
Define USB port power on/off GPO as voltage regulator type instead of
exposing as a normal GPIO.
The GPO is now controlled by the USB driver via the voltage regulator
definition. The regulator is of fixed output type (5V for USB) hence the
GPO switches power on/off to USB pin 1 (Vcc)
USB port power is enabled on driver load and disabled on driver unload.
Enable kernel support for fixed voltage regulator types on mt7621.
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
Diffstat (limited to 'target/linux/ramips/dts')
-rw-r--r-- | target/linux/ramips/dts/MIR3G.dts | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/target/linux/ramips/dts/MIR3G.dts b/target/linux/ramips/dts/MIR3G.dts index efe98b0e10..44dfc1796c 100644 --- a/target/linux/ramips/dts/MIR3G.dts +++ b/target/linux/ramips/dts/MIR3G.dts @@ -66,16 +66,19 @@ }; }; - gpio_export { - compatible = "gpio-export"; - #size-cells = <0>; - - usbpower { - gpio-export,name = "usbpower"; - gpio-export,output = <1>; - gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>; - }; + reg_usb_vbus: reg_usb_vbus { + compatible = "regulator-fixed"; + regulator-name = "usb_vbus"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + gpio = <&gpio0 12 GPIO_ACTIVE_HIGH>; + enable-active-high; }; + +}; + +&xhci { + vbus-supply = <®_usb_vbus>; }; &nand { |