]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
rockchip: rk3588-generic: Add support for USB OTG
authorJonas Karlman <jonas@kwiboo.se>
Mon, 22 Apr 2024 06:29:04 +0000 (06:29 +0000)
committerKever Yang <kever.yang@rock-chips.com>
Fri, 26 Apr 2024 07:47:05 +0000 (15:47 +0800)
Add support for USB OTG, RockUSB and UMS to the generic RK3588S/RK3588
target.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
arch/arm/dts/rk3588-generic-u-boot.dtsi
arch/arm/dts/rk3588-generic.dts
configs/generic-rk3588_defconfig

index 853ed58cfe58ee98a686e2ab48b5412bc373acac..225dfa0b682a4b3dd4199fba37762309ac6fca84 100644 (file)
@@ -1,3 +1,25 @@
 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
 
 #include "rk3588s-u-boot.dtsi"
+
+&u2phy0 {
+       status = "okay";
+};
+
+&u2phy0_otg {
+       status = "okay";
+};
+
+&usbdp_phy0 {
+       status = "okay";
+};
+
+&usbdp_phy0_u3 {
+       status = "okay";
+};
+
+&usb_host0_xhci {
+       dr_mode = "peripheral";
+       maximum-speed = "high-speed";
+       status = "okay";
+};
index baafe7463f1b9d3463a0610553ee8f6ac3d5eab3..95d757676f12061c081a2b636fd6bbd8e8dce925 100644 (file)
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
 /*
- * Minimal generic DT for RK3588S/RK3588 with eMMC and SD-card enabled
+ * Minimal generic DT for RK3588S/RK3588 with eMMC, SD-card and USB OTG enabled
  */
 
 /dts-v1/;
index b50f4f8b80086fdfbbe52f31ca73ae0f74e87e26..e96df619b59de523d3209399ac57eb302f002090 100644 (file)
@@ -27,6 +27,8 @@ CONFIG_SPL_ATF=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_GPT=y
 CONFIG_CMD_MMC=y
+CONFIG_CMD_ROCKUSB=y
+CONFIG_CMD_USB_MASS_STORAGE=y
 # CONFIG_CMD_SETEXPR is not set
 # CONFIG_SPL_DOS_PARTITION is not set
 CONFIG_SPL_OF_CONTROL=y
@@ -36,6 +38,7 @@ CONFIG_SPL_DM_SEQ_ALIAS=y
 CONFIG_SPL_REGMAP=y
 CONFIG_SPL_SYSCON=y
 CONFIG_SPL_CLK=y
+# CONFIG_USB_FUNCTION_FASTBOOT is not set
 CONFIG_ROCKCHIP_GPIO=y
 CONFIG_MISC=y
 CONFIG_SUPPORT_EMMC_RPMB=y
@@ -44,10 +47,18 @@ CONFIG_MMC_DW_ROCKCHIP=y
 CONFIG_MMC_SDHCI=y
 CONFIG_MMC_SDHCI_SDMA=y
 CONFIG_MMC_SDHCI_ROCKCHIP=y
+CONFIG_PHY_ROCKCHIP_INNO_USB2=y
+CONFIG_PHY_ROCKCHIP_USBDP=y
 CONFIG_SPL_PINCTRL=y
 CONFIG_SPL_RAM=y
 CONFIG_BAUDRATE=1500000
 CONFIG_DEBUG_UART_SHIFT=2
 CONFIG_SYS_NS16550_MEM32=y
 CONFIG_SYSRESET=y
+CONFIG_USB=y
+CONFIG_USB_DWC3=y
+CONFIG_USB_DWC3_GENERIC=y
+CONFIG_USB_GADGET=y
+CONFIG_USB_GADGET_DOWNLOAD=y
+CONFIG_USB_FUNCTION_ROCKUSB=y
 CONFIG_ERRNO_STR=y