From: Sean Wang <sean.w...@mediatek.com>

Fix that USB initialization fails as below runtime log is present during
booting on bananapi-r2 board by adding missing regulators the USB device
requires. Current regulators USB device uses are being updated with the
correct ones to reflect real configurations which are all from fixed
regulators rather than MT6323 one's output.

[    6.473958] xhci-mtk 1a1c0000.usb: fail to get vbus
[    6.479313] xhci-mtk 1a240000.usb: fail to get vbus

Cc: sta...@vger.kernel.org
Fixes: f4ff257cd160 ("arm: dts: mt7623: add support for Bananapi R2 (BPI-R2) 
board")
Signed-off-by: Sean Wang <sean.w...@mediatek.com>
---
 arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts | 24 ++++++++++++++++++++++--
 1 file changed, 22 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts 
b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
index ec11e14..f660d15 100644
--- a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
+++ b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
@@ -39,6 +39,24 @@
                };
        };
 
+       reg_3p3v: regulator-3p3v {
+               compatible = "regulator-fixed";
+               regulator-name = "fixed-3.3V";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               regulator-boot-on;
+               regulator-always-on;
+       };
+
+       reg_5v: regulator-5v {
+               compatible = "regulator-fixed";
+               regulator-name = "fixed-5V";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               regulator-boot-on;
+               regulator-always-on;
+       };
+
        gpio_keys {
                compatible = "gpio-keys";
                pinctrl-names = "default";
@@ -502,12 +520,14 @@
 };
 
 &usb1 {
-       vusb33-supply = <&mt6323_vusb_reg>;
+       vusb33-supply = <&reg_3p3v>;
+       vbus-supply = <&reg_5v>;
        status = "okay";
 };
 
 &usb2 {
-       vusb33-supply = <&mt6323_vusb_reg>;
+       vusb33-supply = <&reg_3p3v>;
+       vbus-supply = <&reg_5v>;
        status = "okay";
 };
 
-- 
2.7.4

Reply via email to