arm64: dts: rockchip: Add USB nodes for BPI-R2-Pro
authorFrank Wunderlich <frank-w@public-files.de>
Sat, 9 Apr 2022 11:21:35 +0000 (13:21 +0200)
committerHeiko Stuebner <heiko@sntech.de>
Sun, 10 Apr 2022 16:51:09 +0000 (18:51 +0200)
Add usb2 nodes to Bananapi R2 Pro board

Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
Link: https://lore.kernel.org/r/20220409112136.164481-2-linux@fw-web.de
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts

index a01886b467edab74cbfcde84a633424deb8a3b95..e96622c4c41308ea41ed71261410b47f82fbd560 100644 (file)
                regulator-max-microvolt = <5000000>;
                vin-supply = <&dc_12v>;
        };
+
+       vcc5v0_usb: vcc5v0_usb {
+               compatible = "regulator-fixed";
+               regulator-name = "vcc5v0_usb";
+               regulator-always-on;
+               regulator-boot-on;
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               vin-supply = <&dc_12v>;
+       };
+
+       vcc5v0_usb_host: vcc5v0-usb-host {
+               compatible = "regulator-fixed";
+               enable-active-high;
+               gpio = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&vcc5v0_usb_host_en>;
+               regulator-name = "vcc5v0_usb_host";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               vin-supply = <&vcc5v0_usb>;
+       };
+
+       vcc5v0_usb_otg: vcc5v0-usb-otg {
+               compatible = "regulator-fixed";
+               enable-active-high;
+               gpio = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&vcc5v0_usb_otg_en>;
+               regulator-name = "vcc5v0_usb_otg";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               vin-supply = <&vcc5v0_usb>;
+       };
+};
+
+&combphy0 {
+       /* used for USB3 */
+       status = "okay";
+};
+
+&combphy1 {
+       /* used for USB3 */
+       status = "okay";
 };
 
 &gmac0 {
                                <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
                };
        };
+
+       usb {
+               vcc5v0_usb_host_en: vcc5v0_usb_host_en {
+                       rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
+               };
+
+               vcc5v0_usb_otg_en: vcc5v0_usb_otg_en {
+                       rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
+               };
+       };
 };
 
 &pmu_io_domains {
        pinctrl-0 = <&uart9m1_xfer>;
        status = "disabled";
 };
+
+&usb_host0_ehci {
+       status = "okay";
+};
+
+&usb_host0_ohci {
+       status = "okay";
+};
+
+&usb_host0_xhci {
+       extcon = <&usb2phy0>;
+       status = "okay";
+};
+
+&usb_host1_ehci {
+       status = "okay";
+};
+
+&usb_host1_ohci {
+       status = "okay";
+};
+
+&usb_host1_xhci {
+       status = "okay";
+};
+
+&usb2phy0 {
+       status = "okay";
+};
+
+&usb2phy0_host {
+       phy-supply = <&vcc5v0_usb_host>;
+       status = "okay";
+};
+
+&usb2phy0_otg {
+       phy-supply = <&vcc5v0_usb_otg>;
+       status = "okay";
+};