lantiq: dts: Move the &usb_vbus nodes out of &gpio
authorMartin Blumenstingl <martin.blumenstingl@googlemail.com>
Mon, 6 Jul 2020 17:46:34 +0000 (19:46 +0200)
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>
Mon, 6 Jul 2020 18:23:33 +0000 (20:23 +0200)
Move the USB VBUS regulator nodes out of the GPIO controller node. This
fixes a problem where the "regulator-fixed" driver wasn't probed for
these regulators because the GPIO driver doesn't scan the child-nodes
and based on the dt-bindings documentation it's not supposed to.

This fixed the following error reported by Luca Olivetti:
  ...
  dwc2 1e101000.usb: DWC OTG Controller
  dwc2 1e101000.usb: new USB bus registered, assigned bus number 1
  dwc2 1e101000.usb: irq 62, io mem 0x1e101000
  dwc2 1e101000.usb: startup error -517
  dwc2 1e101000.usb: USB bus 1 deregistered
  dwc2 1e101000.usb: dwc2_hcd_init() FAILED, returning -517

Fixes: FS#1634
Cc: Luca Olivetti <luca@ventoso.org>
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/ar9_zyxel_p-2601hn.dts
target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7510pw22.dts
target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7518pw.dts
target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw.dts
target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/ar9_zyxel_p-2601hn.dts
target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7510pw22.dts
target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7518pw.dts
target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw.dts

index 79896c6478d63f21fb2985cce3b686ebdfeda952..267788319cca07595342ad5b7a0bd1b7a47d2c29 100644 (file)
                        gpios = <&gpio 50 GPIO_ACTIVE_HIGH>;
                };
        };
-};
-
-&gpio {
-       pinctrl-names = "default";
-       pinctrl-0 = <&state_default>;
-
-       state_default: pinmux {
-               exin {
-                       lantiq,groups = "exin1";
-                       lantiq,function = "exin";
-               };
-       };
 
        usb_vbus: regulator-usb-vbus {
                compatible = "regulator-fixed";
        };
 };
 
+&gpio {
+       pinctrl-names = "default";
+       pinctrl-0 = <&state_default>;
+
+       state_default: pinmux {
+               exin {
+                       lantiq,groups = "exin1";
+                       lantiq,function = "exin";
+               };
+       };
+};
+
 &gsw {
        phy-mode = "rmii";
 };
index e5fd05fe4013317277e44b42c8ba2ed0be5a8384..063be778d4fc19a4d613d76cb83e3694ea409fd7 100644 (file)
                        gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
                };
        };
+
+       usb_vbus: regulator-usb-vbus {
+               compatible = "regulator-fixed";
+
+               regulator-name = "USB_VBUS";
+
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+
+               gpio = <&gpio 8 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+       };
 };
 
 &gpio {
                        lantiq,output = <0>;
                };
        };
-
-       usb_vbus: regulator-usb-vbus {
-               compatible = "regulator-fixed";
-
-               regulator-name = "USB_VBUS";
-
-               regulator-min-microvolt = <5000000>;
-               regulator-max-microvolt = <5000000>;
-
-               gpio = <&gpio 8 GPIO_ACTIVE_HIGH>;
-               enable-active-high;
-       };
 };
 
 &gsw {
index ae0d27a0426936d4af7ab1cdc6e4174315cb6867..b5e88455765355249bb3e97b8fa25d2344debbe3 100644 (file)
                        gpios = <&gpiomm 6 GPIO_ACTIVE_LOW>;
                };
        };
+
+       usb_vbus: regulator-usb-vbus {
+               compatible = "regulator-fixed";
+
+               regulator-name = "USB_VBUS";
+
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+
+               gpio = <&gpio 14 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+       };
 };
 
 &gpio {
                        lantiq,open-drain = <1>;
                };
        };
-
-       usb_vbus: regulator-usb-vbus {
-               compatible = "regulator-fixed";
-
-               regulator-name = "USB_VBUS";
-
-               regulator-min-microvolt = <5000000>;
-               regulator-max-microvolt = <5000000>;
-
-               gpio = <&gpio 14 GPIO_ACTIVE_HIGH>;
-               enable-active-high;
-       };
 };
 
 /*
index 7c51f31bad51ed29dec34dce0a8ee63f9dca0fe8..5db5f314d972fd396b252e751ccb8780a1b109a4 100644 (file)
                        gpios = <&gpiomm 9 GPIO_ACTIVE_LOW>;
                };
        };
+
+       usb_vbus: regulator-usb-vbus {
+               compatible = "regulator-fixed";
+
+               regulator-name = "USB_VBUS";
+
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+
+               gpio = <&gpiomm 0 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+       };
 };
 
 &gpio {
                        lantiq,open-drain = <1>;
                };
        };
-
-       usb_vbus: regulator-usb-vbus {
-               compatible = "regulator-fixed";
-
-               regulator-name = "USB_VBUS";
-
-               regulator-min-microvolt = <5000000>;
-               regulator-max-microvolt = <5000000>;
-
-               gpio = <&gpiomm 0 GPIO_ACTIVE_HIGH>;
-               enable-active-high;
-       };
 };
 
 &gsw {
index 79896c6478d63f21fb2985cce3b686ebdfeda952..267788319cca07595342ad5b7a0bd1b7a47d2c29 100644 (file)
                        gpios = <&gpio 50 GPIO_ACTIVE_HIGH>;
                };
        };
-};
-
-&gpio {
-       pinctrl-names = "default";
-       pinctrl-0 = <&state_default>;
-
-       state_default: pinmux {
-               exin {
-                       lantiq,groups = "exin1";
-                       lantiq,function = "exin";
-               };
-       };
 
        usb_vbus: regulator-usb-vbus {
                compatible = "regulator-fixed";
        };
 };
 
+&gpio {
+       pinctrl-names = "default";
+       pinctrl-0 = <&state_default>;
+
+       state_default: pinmux {
+               exin {
+                       lantiq,groups = "exin1";
+                       lantiq,function = "exin";
+               };
+       };
+};
+
 &gsw {
        phy-mode = "rmii";
 };
index e5fd05fe4013317277e44b42c8ba2ed0be5a8384..063be778d4fc19a4d613d76cb83e3694ea409fd7 100644 (file)
                        gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
                };
        };
+
+       usb_vbus: regulator-usb-vbus {
+               compatible = "regulator-fixed";
+
+               regulator-name = "USB_VBUS";
+
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+
+               gpio = <&gpio 8 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+       };
 };
 
 &gpio {
                        lantiq,output = <0>;
                };
        };
-
-       usb_vbus: regulator-usb-vbus {
-               compatible = "regulator-fixed";
-
-               regulator-name = "USB_VBUS";
-
-               regulator-min-microvolt = <5000000>;
-               regulator-max-microvolt = <5000000>;
-
-               gpio = <&gpio 8 GPIO_ACTIVE_HIGH>;
-               enable-active-high;
-       };
 };
 
 &gsw {
index ae0d27a0426936d4af7ab1cdc6e4174315cb6867..b5e88455765355249bb3e97b8fa25d2344debbe3 100644 (file)
                        gpios = <&gpiomm 6 GPIO_ACTIVE_LOW>;
                };
        };
+
+       usb_vbus: regulator-usb-vbus {
+               compatible = "regulator-fixed";
+
+               regulator-name = "USB_VBUS";
+
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+
+               gpio = <&gpio 14 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+       };
 };
 
 &gpio {
                        lantiq,open-drain = <1>;
                };
        };
-
-       usb_vbus: regulator-usb-vbus {
-               compatible = "regulator-fixed";
-
-               regulator-name = "USB_VBUS";
-
-               regulator-min-microvolt = <5000000>;
-               regulator-max-microvolt = <5000000>;
-
-               gpio = <&gpio 14 GPIO_ACTIVE_HIGH>;
-               enable-active-high;
-       };
 };
 
 /*
index 7c51f31bad51ed29dec34dce0a8ee63f9dca0fe8..5db5f314d972fd396b252e751ccb8780a1b109a4 100644 (file)
                        gpios = <&gpiomm 9 GPIO_ACTIVE_LOW>;
                };
        };
+
+       usb_vbus: regulator-usb-vbus {
+               compatible = "regulator-fixed";
+
+               regulator-name = "USB_VBUS";
+
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+
+               gpio = <&gpiomm 0 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+       };
 };
 
 &gpio {
                        lantiq,open-drain = <1>;
                };
        };
-
-       usb_vbus: regulator-usb-vbus {
-               compatible = "regulator-fixed";
-
-               regulator-name = "USB_VBUS";
-
-               regulator-min-microvolt = <5000000>;
-               regulator-max-microvolt = <5000000>;
-
-               gpio = <&gpiomm 0 GPIO_ACTIVE_HIGH>;
-               enable-active-high;
-       };
 };
 
 &gsw {