ipq40xx: Linksys MR8300: fix the USB port power
authorDaniel González Cabanelas <dgcbueu@gmail.com>
Thu, 16 Feb 2023 22:04:20 +0000 (23:04 +0100)
committerHauke Mehrtens <hauke@hauke-m.de>
Sat, 25 Feb 2023 19:33:40 +0000 (20:33 +0100)
The USB port on the MR8300 randomly fails to feed bus-powered devices.

This is caused by a misconfigured pinmux. The GPIO68 should be used to
enable the USB power (active low), but it's inside the NAND pinmux.

This GPIO pin was found in the original firmware at a startup script in
both MR8300 and EA8300. Therefore apply the fix for both boards.

Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
Reviewed-by: Robert Marko <robimarko@gmail.com>
target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-xx8300.dtsi

index db9ca1e7250ccc59438b6e84e2d24e2d0786bae4..141ea604425a5e52cd9e4e5c270635c1757c5c9e 100644 (file)
                        status = "okay";
                };
        };
+
+       regulator-usb-vbus {
+               compatible = "regulator-fixed";
+               regulator-name = "USB_VBUS";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               regulator-always-on;
+               regulator-boot-on;
+               gpio = <&tlmm 68 GPIO_ACTIVE_LOW>;
+       };
 };
 
 
                        pins =  "gpio55", "gpio56", "gpio57",
                                "gpio60", "gpio62", "gpio63",
                                "gpio64", "gpio65", "gpio66",
-                               "gpio67", "gpio68", "gpio69";
+                               "gpio67", "gpio69";
                        function = "qpic";
                        bias-pull-down;
                };