]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
mediatek: filogic: add USB VBUS regulator for Globitel BT-R320 24063/head
authorsolodecode <zikwarface134@gmail.com>
Fri, 3 Jul 2026 20:01:42 +0000 (23:01 +0300)
committerRobert Marko <robimarko@gmail.com>
Sat, 4 Jul 2026 16:03:29 +0000 (18:03 +0200)
USB VBUS on the BT-R320 is controlled by GPIO14.

Add a fixed regulator and hook it up to the xHCI controller.
GPIO_ACTIVE_HIGH was tested on the device: the dummy regulator warning is gone and a USB device enumerates.

Signed-off-by: solodecode <zikwarface134@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24063
Signed-off-by: Robert Marko <robimarko@gmail.com>
target/linux/mediatek/dts/mt7981b-globitel-bt-r320.dts

index b3cad53c16d7e5b8809af6e9036a60f30a200de2..9d868ab06531807f05c862de828f7ca34111af3f 100644 (file)
                reg = <0 0x40000000 0 0x40000000>;
        };
 
+       usb_vbus: regulator-usb-vbus {
+               compatible = "regulator-fixed";
+               regulator-name = "usb_vbus";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               gpios = <&pio 14 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+               regulator-boot-on;
+       };
+
        gpio-keys {
                compatible = "gpio-keys";
 
 };
 
 &xhci {
+       vbus-supply = <&usb_vbus>;
        status = "okay";
 };