diff mbox series

[2/2] rockchip: rk3588-edgeble: Add USB OTG support

Message ID 20240527063915.6205-2-jagan@edgeble.ai
State New
Delegated to: Kever Yang
Headers show
Series [1/2] arm64: dts: rockchip: Fix spl-boot-order for edgeble-ncm6b | expand

Commit Message

Jagan Teki May 27, 2024, 6:39 a.m. UTC
Add support for USB OTG with UMS to program eMMC.

Add it for Edgeble NCM6A, NCM6B.

Signed-off-by: Jagan Teki <jagan@edgeble.ai>
---
 .../dts/rk3588-edgeble-neu6a-io-u-boot.dtsi    | 18 ++++++++++++++++++
 .../dts/rk3588-edgeble-neu6b-io-u-boot.dtsi    | 18 ++++++++++++++++++
 configs/neu6a-io-rk3588_defconfig              |  9 +++++++++
 configs/neu6b-io-rk3588_defconfig              |  9 +++++++++
 4 files changed, 54 insertions(+)

Comments

Anand Moon May 27, 2024, 7:51 a.m. UTC | #1
hi Jagan,

On Mon, 27 May 2024 at 12:09, Jagan Teki <jagan@edgeble.ai> wrote:
>
> Add support for USB OTG with UMS to program eMMC.
>
> Add it for Edgeble NCM6A, NCM6B.
>
> Signed-off-by: Jagan Teki <jagan@edgeble.ai>

Reviewed-by: Anand Moon <anand@edgeble.ai>


> ---
>  .../dts/rk3588-edgeble-neu6a-io-u-boot.dtsi    | 18 ++++++++++++++++++
>  .../dts/rk3588-edgeble-neu6b-io-u-boot.dtsi    | 18 ++++++++++++++++++
>  configs/neu6a-io-rk3588_defconfig              |  9 +++++++++
>  configs/neu6b-io-rk3588_defconfig              |  9 +++++++++
>  4 files changed, 54 insertions(+)
>
> diff --git a/arch/arm/dts/rk3588-edgeble-neu6a-io-u-boot.dtsi b/arch/arm/dts/rk3588-edgeble-neu6a-io-u-boot.dtsi
> index 88f3f7eee2..534d9f8a2c 100644
> --- a/arch/arm/dts/rk3588-edgeble-neu6a-io-u-boot.dtsi
> +++ b/arch/arm/dts/rk3588-edgeble-neu6a-io-u-boot.dtsi
> @@ -15,3 +15,21 @@
>         bus-width = <4>;
>         status = "okay";
>  };
> +
> +&u2phy0 {
> +       status = "okay";
> +};
> +
> +&u2phy0_otg {
> +       status = "okay";
> +};
> +
> +&usbdp_phy0 {
> +       status = "okay";
> +};
> +
> +&usb_host0_xhci {
> +       dr_mode = "peripheral";
> +       maximum-speed = "high-speed";
> +       status = "okay";
> +};
> diff --git a/arch/arm/dts/rk3588-edgeble-neu6b-io-u-boot.dtsi b/arch/arm/dts/rk3588-edgeble-neu6b-io-u-boot.dtsi
> index 289578803e..b3d17a60ce 100644
> --- a/arch/arm/dts/rk3588-edgeble-neu6b-io-u-boot.dtsi
> +++ b/arch/arm/dts/rk3588-edgeble-neu6b-io-u-boot.dtsi
> @@ -15,3 +15,21 @@
>         bus-width = <4>;
>         status = "okay";
>  };
> +
> +&u2phy0 {
> +       status = "okay";
> +};
> +
> +&u2phy0_otg {
> +       status = "okay";
> +};
> +
> +&usbdp_phy0 {
> +       status = "okay";
> +};
> +
> +&usb_host0_xhci {
> +       dr_mode = "peripheral";
> +       maximum-speed = "high-speed";
> +       status = "okay";
> +};
> diff --git a/configs/neu6a-io-rk3588_defconfig b/configs/neu6a-io-rk3588_defconfig
> index ac281e6539..6e50d06458 100644
> --- a/configs/neu6a-io-rk3588_defconfig
> +++ b/configs/neu6a-io-rk3588_defconfig
> @@ -24,6 +24,7 @@ CONFIG_SPL_PAD_TO=0x7f8000
>  CONFIG_SPL_ATF=y
>  CONFIG_CMD_GPT=y
>  CONFIG_CMD_MMC=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
> @@ -33,6 +34,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_SYS_I2C_ROCKCHIP=y
>  CONFIG_MISC=y
> @@ -42,6 +44,8 @@ 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_PWM_ROCKCHIP=y
>  CONFIG_SPL_RAM=y
> @@ -49,4 +53,9 @@ 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_ERRNO_STR=y
> diff --git a/configs/neu6b-io-rk3588_defconfig b/configs/neu6b-io-rk3588_defconfig
> index c01e5fb0d0..f2eb650f19 100644
> --- a/configs/neu6b-io-rk3588_defconfig
> +++ b/configs/neu6b-io-rk3588_defconfig
> @@ -24,6 +24,7 @@ CONFIG_SPL_PAD_TO=0x7f8000
>  CONFIG_SPL_ATF=y
>  CONFIG_CMD_GPT=y
>  CONFIG_CMD_MMC=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
> @@ -33,6 +34,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_SYS_I2C_ROCKCHIP=y
>  CONFIG_MISC=y
> @@ -42,6 +44,8 @@ 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_PWM_ROCKCHIP=y
>  CONFIG_SPL_RAM=y
> @@ -49,4 +53,9 @@ 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_ERRNO_STR=y
> --
> 2.34.1
>
Quentin Schulz May 27, 2024, 8:46 a.m. UTC | #2
Hi Jagan,

On 5/27/24 8:39 AM, Jagan Teki wrote:
> Add support for USB OTG with UMS to program eMMC.
> 
> Add it for Edgeble NCM6A, NCM6B.
> 
> Signed-off-by: Jagan Teki <jagan@edgeble.ai>
> ---
>   .../dts/rk3588-edgeble-neu6a-io-u-boot.dtsi    | 18 ++++++++++++++++++
>   .../dts/rk3588-edgeble-neu6b-io-u-boot.dtsi    | 18 ++++++++++++++++++
>   configs/neu6a-io-rk3588_defconfig              |  9 +++++++++
>   configs/neu6b-io-rk3588_defconfig              |  9 +++++++++
>   4 files changed, 54 insertions(+)
> 
> diff --git a/arch/arm/dts/rk3588-edgeble-neu6a-io-u-boot.dtsi b/arch/arm/dts/rk3588-edgeble-neu6a-io-u-boot.dtsi
> index 88f3f7eee2..534d9f8a2c 100644
> --- a/arch/arm/dts/rk3588-edgeble-neu6a-io-u-boot.dtsi
> +++ b/arch/arm/dts/rk3588-edgeble-neu6a-io-u-boot.dtsi
> @@ -15,3 +15,21 @@
>   	bus-width = <4>;
>   	status = "okay";
>   };
> +
> +&u2phy0 {
> +	status = "okay";
> +};
> +
> +&u2phy0_otg {
> +	status = "okay";
> +};
> +
> +&usbdp_phy0 {
> +	status = "okay";
> +};
> +
> +&usb_host0_xhci {
> +	dr_mode = "peripheral";
> +	maximum-speed = "high-speed";
> +	status = "okay";
> +};
> diff --git a/arch/arm/dts/rk3588-edgeble-neu6b-io-u-boot.dtsi b/arch/arm/dts/rk3588-edgeble-neu6b-io-u-boot.dtsi
> index 289578803e..b3d17a60ce 100644
> --- a/arch/arm/dts/rk3588-edgeble-neu6b-io-u-boot.dtsi
> +++ b/arch/arm/dts/rk3588-edgeble-neu6b-io-u-boot.dtsi
> @@ -15,3 +15,21 @@
>   	bus-width = <4>;
>   	status = "okay";
>   };
> +
> +&u2phy0 {
> +	status = "okay";
> +};
> +
> +&u2phy0_otg {
> +	status = "okay";
> +};
> +
> +&usbdp_phy0 {
> +	status = "okay";
> +};
> +
> +&usb_host0_xhci {
> +	dr_mode = "peripheral";
> +	maximum-speed = "high-speed";
> +	status = "okay";
> +};

I don't see those patches in v6.10-rc1. Have you sent those to upstream 
already? I assume we should cherry-pick patches in dts/upstream instead 
of piling stuff up in u-boot.dtsis. This should also bring the patches 
in rk3588(s).dtsi to add the missing bits for USB support we currently 
have in rk3588*-u-boot.dtsi?

Cheers,
Quentin
Jagan Teki May 27, 2024, 8:57 a.m. UTC | #3
On Mon, 27 May 2024 at 14:17, Quentin Schulz <quentin.schulz@cherry.de> wrote:
>
> Hi Jagan,
>
> On 5/27/24 8:39 AM, Jagan Teki wrote:
> > Add support for USB OTG with UMS to program eMMC.
> >
> > Add it for Edgeble NCM6A, NCM6B.
> >
> > Signed-off-by: Jagan Teki <jagan@edgeble.ai>
> > ---
> >   .../dts/rk3588-edgeble-neu6a-io-u-boot.dtsi    | 18 ++++++++++++++++++
> >   .../dts/rk3588-edgeble-neu6b-io-u-boot.dtsi    | 18 ++++++++++++++++++
> >   configs/neu6a-io-rk3588_defconfig              |  9 +++++++++
> >   configs/neu6b-io-rk3588_defconfig              |  9 +++++++++
> >   4 files changed, 54 insertions(+)
> >
> > diff --git a/arch/arm/dts/rk3588-edgeble-neu6a-io-u-boot.dtsi b/arch/arm/dts/rk3588-edgeble-neu6a-io-u-boot.dtsi
> > index 88f3f7eee2..534d9f8a2c 100644
> > --- a/arch/arm/dts/rk3588-edgeble-neu6a-io-u-boot.dtsi
> > +++ b/arch/arm/dts/rk3588-edgeble-neu6a-io-u-boot.dtsi
> > @@ -15,3 +15,21 @@
> >       bus-width = <4>;
> >       status = "okay";
> >   };
> > +
> > +&u2phy0 {
> > +     status = "okay";
> > +};
> > +
> > +&u2phy0_otg {
> > +     status = "okay";
> > +};
> > +
> > +&usbdp_phy0 {
> > +     status = "okay";
> > +};
> > +
> > +&usb_host0_xhci {
> > +     dr_mode = "peripheral";
> > +     maximum-speed = "high-speed";
> > +     status = "okay";
> > +};
> > diff --git a/arch/arm/dts/rk3588-edgeble-neu6b-io-u-boot.dtsi b/arch/arm/dts/rk3588-edgeble-neu6b-io-u-boot.dtsi
> > index 289578803e..b3d17a60ce 100644
> > --- a/arch/arm/dts/rk3588-edgeble-neu6b-io-u-boot.dtsi
> > +++ b/arch/arm/dts/rk3588-edgeble-neu6b-io-u-boot.dtsi
> > @@ -15,3 +15,21 @@
> >       bus-width = <4>;
> >       status = "okay";
> >   };
> > +
> > +&u2phy0 {
> > +     status = "okay";
> > +};
> > +
> > +&u2phy0_otg {
> > +     status = "okay";
> > +};
> > +
> > +&usbdp_phy0 {
> > +     status = "okay";
> > +};
> > +
> > +&usb_host0_xhci {
> > +     dr_mode = "peripheral";
> > +     maximum-speed = "high-speed";
> > +     status = "okay";
> > +};
>
> I don't see those patches in v6.10-rc1. Have you sent those to upstream
> already? I assume we should cherry-pick patches in dts/upstream instead
> of piling stuff up in u-boot.dtsis. This should also bring the patches
> in rk3588(s).dtsi to add the missing bits for USB support we currently
> have in rk3588*-u-boot.dtsi?

These are -u-boot.dtsi and nothing to do with dts/upstream and can be
removed or reconfigured once we sync the DT from Linux.

Jagan.
Quentin Schulz May 27, 2024, 9:12 a.m. UTC | #4
Hi Jagan,

On 5/27/24 10:57 AM, Jagan Teki wrote:
> On Mon, 27 May 2024 at 14:17, Quentin Schulz <quentin.schulz@cherry.de> wrote:
>>
>> Hi Jagan,
>>
>> On 5/27/24 8:39 AM, Jagan Teki wrote:
>>> Add support for USB OTG with UMS to program eMMC.
>>>
>>> Add it for Edgeble NCM6A, NCM6B.
>>>
>>> Signed-off-by: Jagan Teki <jagan@edgeble.ai>
>>> ---
>>>    .../dts/rk3588-edgeble-neu6a-io-u-boot.dtsi    | 18 ++++++++++++++++++
>>>    .../dts/rk3588-edgeble-neu6b-io-u-boot.dtsi    | 18 ++++++++++++++++++
>>>    configs/neu6a-io-rk3588_defconfig              |  9 +++++++++
>>>    configs/neu6b-io-rk3588_defconfig              |  9 +++++++++
>>>    4 files changed, 54 insertions(+)
>>>
>>> diff --git a/arch/arm/dts/rk3588-edgeble-neu6a-io-u-boot.dtsi b/arch/arm/dts/rk3588-edgeble-neu6a-io-u-boot.dtsi
>>> index 88f3f7eee2..534d9f8a2c 100644
>>> --- a/arch/arm/dts/rk3588-edgeble-neu6a-io-u-boot.dtsi
>>> +++ b/arch/arm/dts/rk3588-edgeble-neu6a-io-u-boot.dtsi
>>> @@ -15,3 +15,21 @@
>>>        bus-width = <4>;
>>>        status = "okay";
>>>    };
>>> +
>>> +&u2phy0 {
>>> +     status = "okay";
>>> +};
>>> +
>>> +&u2phy0_otg {
>>> +     status = "okay";
>>> +};
>>> +
>>> +&usbdp_phy0 {
>>> +     status = "okay";
>>> +};
>>> +
>>> +&usb_host0_xhci {
>>> +     dr_mode = "peripheral";
>>> +     maximum-speed = "high-speed";
>>> +     status = "okay";
>>> +};
>>> diff --git a/arch/arm/dts/rk3588-edgeble-neu6b-io-u-boot.dtsi b/arch/arm/dts/rk3588-edgeble-neu6b-io-u-boot.dtsi
>>> index 289578803e..b3d17a60ce 100644
>>> --- a/arch/arm/dts/rk3588-edgeble-neu6b-io-u-boot.dtsi
>>> +++ b/arch/arm/dts/rk3588-edgeble-neu6b-io-u-boot.dtsi
>>> @@ -15,3 +15,21 @@
>>>        bus-width = <4>;
>>>        status = "okay";
>>>    };
>>> +
>>> +&u2phy0 {
>>> +     status = "okay";
>>> +};
>>> +
>>> +&u2phy0_otg {
>>> +     status = "okay";
>>> +};
>>> +
>>> +&usbdp_phy0 {
>>> +     status = "okay";
>>> +};
>>> +
>>> +&usb_host0_xhci {
>>> +     dr_mode = "peripheral";
>>> +     maximum-speed = "high-speed";
>>> +     status = "okay";
>>> +};
>>
>> I don't see those patches in v6.10-rc1. Have you sent those to upstream
>> already? I assume we should cherry-pick patches in dts/upstream instead
>> of piling stuff up in u-boot.dtsis. This should also bring the patches
>> in rk3588(s).dtsi to add the missing bits for USB support we currently
>> have in rk3588*-u-boot.dtsi?
> 
> These are -u-boot.dtsi and nothing to do with dts/upstream and can be
> removed or reconfigured once we sync the DT from Linux.
> 

This answer seems to suggest there are no patches in the kernel yet. Do 
you not want working USB in Linux? Is something broken in Linux?

I think we're also aiming at only having U-Boot specific stuff in 
-u-boot.dtsi wherever we have OF_UPSTREAM enabled, and enabling USB 
doesn't seem to be typically the thing that should be U-Boot specific? I 
know that we have most rk3588/rk3588s boards with those nodes defined 
already, but they predates the move to OF_UPSTREAM.

As far as I remember, we've always asked people to upstream DT stuff 
they could upstream first and then import them in -u-boot.dtsi later, 
except for things that are U-Boot specific (e.g. different 
representation at a given point in time between U-Boot and kernel, or 
simple support in U-Boot but nothing in kernel yet). We could be a bit 
more aggressive with this policy now that we have dts/upstream as well. 
Ultimately this is up to Kever/Tom to decide where we want to go with 
this and how strict we want the policy to be.

Cheers,
Quentin
diff mbox series

Patch

diff --git a/arch/arm/dts/rk3588-edgeble-neu6a-io-u-boot.dtsi b/arch/arm/dts/rk3588-edgeble-neu6a-io-u-boot.dtsi
index 88f3f7eee2..534d9f8a2c 100644
--- a/arch/arm/dts/rk3588-edgeble-neu6a-io-u-boot.dtsi
+++ b/arch/arm/dts/rk3588-edgeble-neu6a-io-u-boot.dtsi
@@ -15,3 +15,21 @@ 
 	bus-width = <4>;
 	status = "okay";
 };
+
+&u2phy0 {
+	status = "okay";
+};
+
+&u2phy0_otg {
+	status = "okay";
+};
+
+&usbdp_phy0 {
+	status = "okay";
+};
+
+&usb_host0_xhci {
+	dr_mode = "peripheral";
+	maximum-speed = "high-speed";
+	status = "okay";
+};
diff --git a/arch/arm/dts/rk3588-edgeble-neu6b-io-u-boot.dtsi b/arch/arm/dts/rk3588-edgeble-neu6b-io-u-boot.dtsi
index 289578803e..b3d17a60ce 100644
--- a/arch/arm/dts/rk3588-edgeble-neu6b-io-u-boot.dtsi
+++ b/arch/arm/dts/rk3588-edgeble-neu6b-io-u-boot.dtsi
@@ -15,3 +15,21 @@ 
 	bus-width = <4>;
 	status = "okay";
 };
+
+&u2phy0 {
+	status = "okay";
+};
+
+&u2phy0_otg {
+	status = "okay";
+};
+
+&usbdp_phy0 {
+	status = "okay";
+};
+
+&usb_host0_xhci {
+	dr_mode = "peripheral";
+	maximum-speed = "high-speed";
+	status = "okay";
+};
diff --git a/configs/neu6a-io-rk3588_defconfig b/configs/neu6a-io-rk3588_defconfig
index ac281e6539..6e50d06458 100644
--- a/configs/neu6a-io-rk3588_defconfig
+++ b/configs/neu6a-io-rk3588_defconfig
@@ -24,6 +24,7 @@  CONFIG_SPL_PAD_TO=0x7f8000
 CONFIG_SPL_ATF=y
 CONFIG_CMD_GPT=y
 CONFIG_CMD_MMC=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
@@ -33,6 +34,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_SYS_I2C_ROCKCHIP=y
 CONFIG_MISC=y
@@ -42,6 +44,8 @@  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_PWM_ROCKCHIP=y
 CONFIG_SPL_RAM=y
@@ -49,4 +53,9 @@  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_ERRNO_STR=y
diff --git a/configs/neu6b-io-rk3588_defconfig b/configs/neu6b-io-rk3588_defconfig
index c01e5fb0d0..f2eb650f19 100644
--- a/configs/neu6b-io-rk3588_defconfig
+++ b/configs/neu6b-io-rk3588_defconfig
@@ -24,6 +24,7 @@  CONFIG_SPL_PAD_TO=0x7f8000
 CONFIG_SPL_ATF=y
 CONFIG_CMD_GPT=y
 CONFIG_CMD_MMC=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
@@ -33,6 +34,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_SYS_I2C_ROCKCHIP=y
 CONFIG_MISC=y
@@ -42,6 +44,8 @@  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_PWM_ROCKCHIP=y
 CONFIG_SPL_RAM=y
@@ -49,4 +53,9 @@  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_ERRNO_STR=y