]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
arm64: dts: imx8mp-debix: add USB host support
authorLucas Stach <l.stach@pengutronix.de>
Tue, 28 Feb 2023 17:02:47 +0000 (18:02 +0100)
committerShawn Guo <shawnguo@kernel.org>
Tue, 14 Mar 2023 07:47:54 +0000 (15:47 +0800)
This adds support for the 4 USB3 host ports on the board, which are
connected to the i.MX8MP SoC via a Realtek RTS5411 hub.

As the schematic for the board is not available, I could not validate
that this really reflects the reality, but I modeled things after the
hacked in usage of the GPIOs in the downstream kernel.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
arch/arm64/boot/dts/freescale/imx8mp-debix-model-a.dts

index 2876d18f2a38c03f531292392395fd4427e847f7..b4409349eb3f6d1979d7917a77195d7212dd7f5b 100644 (file)
                gpio = <&gpio2 19 GPIO_ACTIVE_HIGH>;
                enable-active-high;
        };
+
+       reg_usb_hub: regulator-usb-hub {
+               compatible = "regulator-fixed";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_reg_usb_hub>;
+               regulator-name = "USB_HUB";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               gpio = <&gpio4 26 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+       };
 };
 
 &A53_0 {
        status = "okay";
 };
 
+&usb3_phy1 {
+       status = "okay";
+};
+
+&usb3_1 {
+       status = "okay";
+};
+
+&usb_dwc3_1 {
+       #address-cells = <1>;
+       #size-cells = <0>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_usb1>;
+       dr_mode = "host";
+       status = "okay";
+
+       /* 2.x hub on port 1 */
+       usb_hub_2_x: hub@1 {
+               compatible = "usbbda,5411";
+               reg = <1>;
+               reset-gpios = <&gpio4 25 GPIO_ACTIVE_LOW>;
+               vdd-supply = <&reg_usb_hub>;
+               peer-hub = <&usb_hub_3_x>;
+       };
+
+       /* 3.x hub on port 2 */
+       usb_hub_3_x: hub@2 {
+               compatible = "usbbda,411";
+               reg = <2>;
+               reset-gpios = <&gpio4 25 GPIO_ACTIVE_LOW>;
+               vdd-supply = <&reg_usb_hub>;
+               peer-hub = <&usb_hub_2_x>;
+       };
+};
+
 /* SD Card */
 &usdhc2 {
        pinctrl-names = "default", "state_100mhz", "state_200mhz";
                >;
        };
 
+       pinctrl_reg_usb_hub: regusbhubgrp {
+               fsl,pins = <
+                       MX8MP_IOMUXC_SAI2_TXD0__GPIO4_IO26                              0x19
+               >;
+       };
+
        pinctrl_rtc_int: rtcintgrp {
                fsl,pins = <
                        MX8MP_IOMUXC_SD1_STROBE__GPIO2_IO11                             0x140
                >;
        };
 
+       pinctrl_usb1: usb1grp {
+               fsl,pins = <
+                       MX8MP_IOMUXC_GPIO1_IO14__USB2_OTG_PWR                           0x10
+                       MX8MP_IOMUXC_SAI2_TXC__GPIO4_IO25                               0x19
+               >;
+       };
+
        pinctrl_usdhc2: usdhc2grp {
                fsl,pins = <
                        MX8MP_IOMUXC_SD2_CLK__USDHC2_CLK                                0x190