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>
This commit is contained in:
parent
4363b5362f
commit
8110bf18f4
2 changed files with 14 additions and 9 deletions
|
@ -66,16 +66,19 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
gpio_export {
|
reg_usb_vbus: reg_usb_vbus {
|
||||||
compatible = "gpio-export";
|
compatible = "regulator-fixed";
|
||||||
#size-cells = <0>;
|
regulator-name = "usb_vbus";
|
||||||
|
regulator-min-microvolt = <5000000>;
|
||||||
usbpower {
|
regulator-max-microvolt = <5000000>;
|
||||||
gpio-export,name = "usbpower";
|
gpio = <&gpio0 12 GPIO_ACTIVE_HIGH>;
|
||||||
gpio-export,output = <1>;
|
enable-active-high;
|
||||||
gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
&xhci {
|
||||||
|
vbus-supply = <®_usb_vbus>;
|
||||||
};
|
};
|
||||||
|
|
||||||
&nand {
|
&nand {
|
||||||
|
|
|
@ -227,6 +227,8 @@ CONFIG_RCU_STALL_COMMON=y
|
||||||
CONFIG_REGMAP=y
|
CONFIG_REGMAP=y
|
||||||
CONFIG_REGMAP_I2C=y
|
CONFIG_REGMAP_I2C=y
|
||||||
CONFIG_REGMAP_SPI=y
|
CONFIG_REGMAP_SPI=y
|
||||||
|
CONFIG_REGULATOR=y
|
||||||
|
CONFIG_REGULATOR_FIXED_VOLTAGE=y
|
||||||
CONFIG_RESET_CONTROLLER=y
|
CONFIG_RESET_CONTROLLER=y
|
||||||
CONFIG_RFS_ACCEL=y
|
CONFIG_RFS_ACCEL=y
|
||||||
CONFIG_RPS=y
|
CONFIG_RPS=y
|
||||||
|
|
Loading…
Reference in a new issue