diff mbox

[U-Boot,V7,4/4] rockchip: rk3288: enable rockusb support on rk3288 based device

Message ID 1495702234-29546-5-git-send-email-eddie.cai.linux@gmail.com
State Changes Requested
Delegated to: Lukasz Majewski
Headers show

Commit Message

Eddie Cai May 25, 2017, 8:50 a.m. UTC
this patch enable rockusb support on rk3288 based device.

Signed-off-by: Eddie Cai <eddie.cai.linux@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>

Changes in v7:
-use imply in the Kconfig to enable rockusb

Changes in v6:
-enable rockusb in defconfig

Changes in v5:
-none

Changes in v4:
-move to rk3288_common.h

Changes in v3:
-move to defconfig

---
 arch/arm/mach-rockchip/Kconfig    | 2 ++
 configs/evb-rk3288_defconfig      | 9 +++++++++
 configs/fennec-rk3288_defconfig   | 6 ++++++
 configs/firefly-rk3288_defconfig  | 6 ++++++
 configs/miqi-rk3288_defconfig     | 6 ++++++
 configs/popmetal-rk3288_defconfig | 6 ++++++
 configs/tinker-rk3288_defconfig   | 6 ++++++
 include/configs/rk3288_common.h   | 7 -------
 8 files changed, 41 insertions(+), 7 deletions(-)

Comments

Lukasz Majewski May 29, 2017, 7:51 a.m. UTC | #1
Good morning Eddie,

> this patch enable rockusb support on rk3288 based device.
> 
> Signed-off-by: Eddie Cai <eddie.cai.linux@gmail.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>
> 

I've give this patch set a try on travisCI:

https://travis-ci.org/lmajewski/u-boot-dfu/jobs/237068149

Unfortunately, there are some problem with following boards:

chromebook_jerry, chromebook_minnie ...

caused by "undefined references to ...."

I've tried your patches on top of:
u-boot-usb/HEAD
SHA1: 3426b2038cfb831d74ac0407fc7a04e990b44540

Maybe you have built tested it on other branch/commit?

Best regards,
Łukasz Majewski

p.s. My travis CI .travis.yml attached.

> Changes in v7:
> -use imply in the Kconfig to enable rockusb
> 
> Changes in v6:
> -enable rockusb in defconfig
> 
> Changes in v5:
> -none
> 
> Changes in v4:
> -move to rk3288_common.h
> 
> Changes in v3:
> -move to defconfig
> 
> ---
>  arch/arm/mach-rockchip/Kconfig    | 2 ++
>  configs/evb-rk3288_defconfig      | 9 +++++++++
>  configs/fennec-rk3288_defconfig   | 6 ++++++
>  configs/firefly-rk3288_defconfig  | 6 ++++++
>  configs/miqi-rk3288_defconfig     | 6 ++++++
>  configs/popmetal-rk3288_defconfig | 6 ++++++
>  configs/tinker-rk3288_defconfig   | 6 ++++++
>  include/configs/rk3288_common.h   | 7 -------
>  8 files changed, 41 insertions(+), 7 deletions(-)
> 
> diff --git a/arch/arm/mach-rockchip/Kconfig
> b/arch/arm/mach-rockchip/Kconfig index 2b752ad..8a87812 100644
> --- a/arch/arm/mach-rockchip/Kconfig
> +++ b/arch/arm/mach-rockchip/Kconfig
> @@ -32,6 +32,8 @@ config ROCKCHIP_RK3288
>  	select CPU_V7
>  	select SUPPORT_SPL
>  	select SPL
> +	imply USB_FUNCTION_ROCKUSB
> +	imply CMD_ROCKUSB
>  	help
>  	  The Rockchip RK3288 is a ARM-based SoC with a quad-core
> Cortex-A17 including NEON and GPU, 1MB L2 cache, Mali-T7 graphics, two
> diff --git a/configs/evb-rk3288_defconfig
> b/configs/evb-rk3288_defconfig index 227150d..cf66e09 100644
> --- a/configs/evb-rk3288_defconfig
> +++ b/configs/evb-rk3288_defconfig
> @@ -17,6 +17,7 @@ CONFIG_CMD_MMC=y
>  CONFIG_CMD_SF=y
>  CONFIG_CMD_SPI=y
>  CONFIG_CMD_I2C=y
> +CONFIG_CMD_USB=y
>  CONFIG_CMD_GPIO=y
>  # CONFIG_CMD_SETEXPR is not set
>  CONFIG_CMD_CACHE=y
> @@ -61,6 +62,14 @@ CONFIG_DEBUG_UART_CLOCK=24000000
>  CONFIG_DEBUG_UART_SHIFT=2
>  CONFIG_SYS_NS16550=y
>  CONFIG_SYSRESET=y
> +CONFIG_USB=y
> +CONFIG_USB_STORAGE=y
>  CONFIG_USE_TINY_PRINTF=y
>  CONFIG_CMD_DHRYSTONE=y
>  CONFIG_ERRNO_STR=y
> +CONFIG_USB_GADGET=y
> +CONFIG_USB_GADGET_DOWNLOAD=y
> +CONFIG_USB_GADGET_VBUS_DRAW=0
> +CONFIG_G_DNL_MANUFACTURER="Rockchip"
> +CONFIG_G_DNL_VENDOR_NUM=0x2207
> +CONFIG_G_DNL_PRODUCT_NUM=0x320a
> diff --git a/configs/fennec-rk3288_defconfig
> b/configs/fennec-rk3288_defconfig index befba18..eb33d00 100644
> --- a/configs/fennec-rk3288_defconfig
> +++ b/configs/fennec-rk3288_defconfig
> @@ -66,3 +66,9 @@ CONFIG_USB_STORAGE=y
>  CONFIG_USE_TINY_PRINTF=y
>  CONFIG_CMD_DHRYSTONE=y
>  CONFIG_ERRNO_STR=y
> +CONFIG_USB_GADGET=y
> +CONFIG_USB_GADGET_DOWNLOAD=y
> +CONFIG_USB_GADGET_VBUS_DRAW=0
> +CONFIG_G_DNL_MANUFACTURER="Rockchip"
> +CONFIG_G_DNL_VENDOR_NUM=0x2207
> +CONFIG_G_DNL_PRODUCT_NUM=0x320a
> diff --git a/configs/firefly-rk3288_defconfig
> b/configs/firefly-rk3288_defconfig index f2872a6..1f4ca32 100644
> --- a/configs/firefly-rk3288_defconfig
> +++ b/configs/firefly-rk3288_defconfig
> @@ -73,3 +73,9 @@ CONFIG_CONSOLE_SCROLL_LINES=10
>  CONFIG_USE_TINY_PRINTF=y
>  CONFIG_CMD_DHRYSTONE=y
>  CONFIG_ERRNO_STR=y
> +CONFIG_USB_GADGET=y
> +CONFIG_USB_GADGET_DOWNLOAD=y
> +CONFIG_USB_GADGET_VBUS_DRAW=0
> +CONFIG_G_DNL_MANUFACTURER="Rockchip"
> +CONFIG_G_DNL_VENDOR_NUM=0x2207
> +CONFIG_G_DNL_PRODUCT_NUM=0x320a
> diff --git a/configs/miqi-rk3288_defconfig
> b/configs/miqi-rk3288_defconfig index d93bd97..b8b6fd5 100644
> --- a/configs/miqi-rk3288_defconfig
> +++ b/configs/miqi-rk3288_defconfig
> @@ -70,3 +70,9 @@ CONFIG_CONSOLE_SCROLL_LINES=10
>  CONFIG_USE_TINY_PRINTF=y
>  CONFIG_CMD_DHRYSTONE=y
>  CONFIG_ERRNO_STR=y
> +CONFIG_USB_GADGET=y
> +CONFIG_USB_GADGET_DOWNLOAD=y
> +CONFIG_USB_GADGET_VBUS_DRAW=0
> +CONFIG_G_DNL_MANUFACTURER="Rockchip"
> +CONFIG_G_DNL_VENDOR_NUM=0x2207
> +CONFIG_G_DNL_PRODUCT_NUM=0x320a
> diff --git a/configs/popmetal-rk3288_defconfig
> b/configs/popmetal-rk3288_defconfig index 748cda4..1181a20 100644
> --- a/configs/popmetal-rk3288_defconfig
> +++ b/configs/popmetal-rk3288_defconfig
> @@ -66,3 +66,9 @@ CONFIG_USB_STORAGE=y
>  CONFIG_USE_TINY_PRINTF=y
>  CONFIG_CMD_DHRYSTONE=y
>  CONFIG_ERRNO_STR=y
> +CONFIG_USB_GADGET=y
> +CONFIG_USB_GADGET_DOWNLOAD=y
> +CONFIG_USB_GADGET_VBUS_DRAW=0
> +CONFIG_G_DNL_MANUFACTURER="Rockchip"
> +CONFIG_G_DNL_VENDOR_NUM=0x2207
> +CONFIG_G_DNL_PRODUCT_NUM=0x320a
> diff --git a/configs/tinker-rk3288_defconfig
> b/configs/tinker-rk3288_defconfig index ada5950..f863df8 100644
> --- a/configs/tinker-rk3288_defconfig
> +++ b/configs/tinker-rk3288_defconfig
> @@ -66,3 +66,9 @@ CONFIG_USB_STORAGE=y
>  CONFIG_USE_TINY_PRINTF=y
>  CONFIG_CMD_DHRYSTONE=y
>  CONFIG_ERRNO_STR=y
> +CONFIG_USB_GADGET=y
> +CONFIG_USB_GADGET_DOWNLOAD=y
> +CONFIG_USB_GADGET_VBUS_DRAW=0
> +CONFIG_G_DNL_MANUFACTURER="Rockchip"
> +CONFIG_G_DNL_VENDOR_NUM=0x2207
> +CONFIG_G_DNL_PRODUCT_NUM=0x320a
> diff --git a/include/configs/rk3288_common.h
> b/include/configs/rk3288_common.h index e7a8f72..421ba60 100644
> --- a/include/configs/rk3288_common.h
> +++ b/include/configs/rk3288_common.h
> @@ -58,11 +58,9 @@
>  
>  #ifndef CONFIG_SPL_BUILD
>  /* usb otg */
> -#define CONFIG_USB_GADGET
>  #define CONFIG_USB_GADGET_DUALSPEED
>  #define CONFIG_USB_GADGET_DWC2_OTG
>  #define CONFIG_ROCKCHIP_USB2_PHY
> -#define CONFIG_USB_GADGET_VBUS_DRAW	0
>  
>  /* fastboot  */
>  #define CONFIG_CMD_FASTBOOT
> @@ -76,11 +74,6 @@
>  #define CONFIG_USB_FUNCTION_MASS_STORAGE
>  #define CONFIG_CMD_USB_MASS_STORAGE
>  
> -#define CONFIG_USB_GADGET_DOWNLOAD
> -#define CONFIG_G_DNL_MANUFACTURER	"Rockchip"
> -#define CONFIG_G_DNL_VENDOR_NUM		0x2207
> -#define CONFIG_G_DNL_PRODUCT_NUM	0x320a
> -
>  /* usb host support */
>  #ifdef CONFIG_CMD_USB
>  #define CONFIG_USB_DWC2




Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
Eddie Cai May 31, 2017, 2:27 a.m. UTC | #2
Hi Lukasz

2017-05-29 15:51 GMT+08:00 Lukasz Majewski <lukma@denx.de>:
> Good morning Eddie,
>
>> this patch enable rockusb support on rk3288 based device.
>>
>> Signed-off-by: Eddie Cai <eddie.cai.linux@gmail.com>
>> Reviewed-by: Simon Glass <sjg@chromium.org>
>>
>
> I've give this patch set a try on travisCI:
>
> https://travis-ci.org/lmajewski/u-boot-dfu/jobs/237068149
>
> Unfortunately, there are some problem with following boards:
>
> chromebook_jerry, chromebook_minnie ...
I did it by myself last week. i got the same error. then i fix those
chromebook error
and test again. I still got some 3036 board error. But it build
successfully when i
build it on my computer. here is the travis-ci.org error log
https://travis-ci.org/eddiecailinux/u-boot/jobs/236232837
I have no idea what can i do to fix it.
>
> caused by "undefined references to ...."
>
> I've tried your patches on top of:
> u-boot-usb/HEAD
> SHA1: 3426b2038cfb831d74ac0407fc7a04e990b44540
>
> Maybe you have built tested it on other branch/commit?
>
> Best regards,
> Łukasz Majewski
>
> p.s. My travis CI .travis.yml attached.
>
>> Changes in v7:
>> -use imply in the Kconfig to enable rockusb
>>
>> Changes in v6:
>> -enable rockusb in defconfig
>>
>> Changes in v5:
>> -none
>>
>> Changes in v4:
>> -move to rk3288_common.h
>>
>> Changes in v3:
>> -move to defconfig
>>
>> ---
>>  arch/arm/mach-rockchip/Kconfig    | 2 ++
>>  configs/evb-rk3288_defconfig      | 9 +++++++++
>>  configs/fennec-rk3288_defconfig   | 6 ++++++
>>  configs/firefly-rk3288_defconfig  | 6 ++++++
>>  configs/miqi-rk3288_defconfig     | 6 ++++++
>>  configs/popmetal-rk3288_defconfig | 6 ++++++
>>  configs/tinker-rk3288_defconfig   | 6 ++++++
>>  include/configs/rk3288_common.h   | 7 -------
>>  8 files changed, 41 insertions(+), 7 deletions(-)
>>
>> diff --git a/arch/arm/mach-rockchip/Kconfig
>> b/arch/arm/mach-rockchip/Kconfig index 2b752ad..8a87812 100644
>> --- a/arch/arm/mach-rockchip/Kconfig
>> +++ b/arch/arm/mach-rockchip/Kconfig
>> @@ -32,6 +32,8 @@ config ROCKCHIP_RK3288
>>       select CPU_V7
>>       select SUPPORT_SPL
>>       select SPL
>> +     imply USB_FUNCTION_ROCKUSB
>> +     imply CMD_ROCKUSB
>>       help
>>         The Rockchip RK3288 is a ARM-based SoC with a quad-core
>> Cortex-A17 including NEON and GPU, 1MB L2 cache, Mali-T7 graphics, two
>> diff --git a/configs/evb-rk3288_defconfig
>> b/configs/evb-rk3288_defconfig index 227150d..cf66e09 100644
>> --- a/configs/evb-rk3288_defconfig
>> +++ b/configs/evb-rk3288_defconfig
>> @@ -17,6 +17,7 @@ CONFIG_CMD_MMC=y
>>  CONFIG_CMD_SF=y
>>  CONFIG_CMD_SPI=y
>>  CONFIG_CMD_I2C=y
>> +CONFIG_CMD_USB=y
>>  CONFIG_CMD_GPIO=y
>>  # CONFIG_CMD_SETEXPR is not set
>>  CONFIG_CMD_CACHE=y
>> @@ -61,6 +62,14 @@ CONFIG_DEBUG_UART_CLOCK=24000000
>>  CONFIG_DEBUG_UART_SHIFT=2
>>  CONFIG_SYS_NS16550=y
>>  CONFIG_SYSRESET=y
>> +CONFIG_USB=y
>> +CONFIG_USB_STORAGE=y
>>  CONFIG_USE_TINY_PRINTF=y
>>  CONFIG_CMD_DHRYSTONE=y
>>  CONFIG_ERRNO_STR=y
>> +CONFIG_USB_GADGET=y
>> +CONFIG_USB_GADGET_DOWNLOAD=y
>> +CONFIG_USB_GADGET_VBUS_DRAW=0
>> +CONFIG_G_DNL_MANUFACTURER="Rockchip"
>> +CONFIG_G_DNL_VENDOR_NUM=0x2207
>> +CONFIG_G_DNL_PRODUCT_NUM=0x320a
>> diff --git a/configs/fennec-rk3288_defconfig
>> b/configs/fennec-rk3288_defconfig index befba18..eb33d00 100644
>> --- a/configs/fennec-rk3288_defconfig
>> +++ b/configs/fennec-rk3288_defconfig
>> @@ -66,3 +66,9 @@ CONFIG_USB_STORAGE=y
>>  CONFIG_USE_TINY_PRINTF=y
>>  CONFIG_CMD_DHRYSTONE=y
>>  CONFIG_ERRNO_STR=y
>> +CONFIG_USB_GADGET=y
>> +CONFIG_USB_GADGET_DOWNLOAD=y
>> +CONFIG_USB_GADGET_VBUS_DRAW=0
>> +CONFIG_G_DNL_MANUFACTURER="Rockchip"
>> +CONFIG_G_DNL_VENDOR_NUM=0x2207
>> +CONFIG_G_DNL_PRODUCT_NUM=0x320a
>> diff --git a/configs/firefly-rk3288_defconfig
>> b/configs/firefly-rk3288_defconfig index f2872a6..1f4ca32 100644
>> --- a/configs/firefly-rk3288_defconfig
>> +++ b/configs/firefly-rk3288_defconfig
>> @@ -73,3 +73,9 @@ CONFIG_CONSOLE_SCROLL_LINES=10
>>  CONFIG_USE_TINY_PRINTF=y
>>  CONFIG_CMD_DHRYSTONE=y
>>  CONFIG_ERRNO_STR=y
>> +CONFIG_USB_GADGET=y
>> +CONFIG_USB_GADGET_DOWNLOAD=y
>> +CONFIG_USB_GADGET_VBUS_DRAW=0
>> +CONFIG_G_DNL_MANUFACTURER="Rockchip"
>> +CONFIG_G_DNL_VENDOR_NUM=0x2207
>> +CONFIG_G_DNL_PRODUCT_NUM=0x320a
>> diff --git a/configs/miqi-rk3288_defconfig
>> b/configs/miqi-rk3288_defconfig index d93bd97..b8b6fd5 100644
>> --- a/configs/miqi-rk3288_defconfig
>> +++ b/configs/miqi-rk3288_defconfig
>> @@ -70,3 +70,9 @@ CONFIG_CONSOLE_SCROLL_LINES=10
>>  CONFIG_USE_TINY_PRINTF=y
>>  CONFIG_CMD_DHRYSTONE=y
>>  CONFIG_ERRNO_STR=y
>> +CONFIG_USB_GADGET=y
>> +CONFIG_USB_GADGET_DOWNLOAD=y
>> +CONFIG_USB_GADGET_VBUS_DRAW=0
>> +CONFIG_G_DNL_MANUFACTURER="Rockchip"
>> +CONFIG_G_DNL_VENDOR_NUM=0x2207
>> +CONFIG_G_DNL_PRODUCT_NUM=0x320a
>> diff --git a/configs/popmetal-rk3288_defconfig
>> b/configs/popmetal-rk3288_defconfig index 748cda4..1181a20 100644
>> --- a/configs/popmetal-rk3288_defconfig
>> +++ b/configs/popmetal-rk3288_defconfig
>> @@ -66,3 +66,9 @@ CONFIG_USB_STORAGE=y
>>  CONFIG_USE_TINY_PRINTF=y
>>  CONFIG_CMD_DHRYSTONE=y
>>  CONFIG_ERRNO_STR=y
>> +CONFIG_USB_GADGET=y
>> +CONFIG_USB_GADGET_DOWNLOAD=y
>> +CONFIG_USB_GADGET_VBUS_DRAW=0
>> +CONFIG_G_DNL_MANUFACTURER="Rockchip"
>> +CONFIG_G_DNL_VENDOR_NUM=0x2207
>> +CONFIG_G_DNL_PRODUCT_NUM=0x320a
>> diff --git a/configs/tinker-rk3288_defconfig
>> b/configs/tinker-rk3288_defconfig index ada5950..f863df8 100644
>> --- a/configs/tinker-rk3288_defconfig
>> +++ b/configs/tinker-rk3288_defconfig
>> @@ -66,3 +66,9 @@ CONFIG_USB_STORAGE=y
>>  CONFIG_USE_TINY_PRINTF=y
>>  CONFIG_CMD_DHRYSTONE=y
>>  CONFIG_ERRNO_STR=y
>> +CONFIG_USB_GADGET=y
>> +CONFIG_USB_GADGET_DOWNLOAD=y
>> +CONFIG_USB_GADGET_VBUS_DRAW=0
>> +CONFIG_G_DNL_MANUFACTURER="Rockchip"
>> +CONFIG_G_DNL_VENDOR_NUM=0x2207
>> +CONFIG_G_DNL_PRODUCT_NUM=0x320a
>> diff --git a/include/configs/rk3288_common.h
>> b/include/configs/rk3288_common.h index e7a8f72..421ba60 100644
>> --- a/include/configs/rk3288_common.h
>> +++ b/include/configs/rk3288_common.h
>> @@ -58,11 +58,9 @@
>>
>>  #ifndef CONFIG_SPL_BUILD
>>  /* usb otg */
>> -#define CONFIG_USB_GADGET
>>  #define CONFIG_USB_GADGET_DUALSPEED
>>  #define CONFIG_USB_GADGET_DWC2_OTG
>>  #define CONFIG_ROCKCHIP_USB2_PHY
>> -#define CONFIG_USB_GADGET_VBUS_DRAW  0
>>
>>  /* fastboot  */
>>  #define CONFIG_CMD_FASTBOOT
>> @@ -76,11 +74,6 @@
>>  #define CONFIG_USB_FUNCTION_MASS_STORAGE
>>  #define CONFIG_CMD_USB_MASS_STORAGE
>>
>> -#define CONFIG_USB_GADGET_DOWNLOAD
>> -#define CONFIG_G_DNL_MANUFACTURER    "Rockchip"
>> -#define CONFIG_G_DNL_VENDOR_NUM              0x2207
>> -#define CONFIG_G_DNL_PRODUCT_NUM     0x320a
>> -
>>  /* usb host support */
>>  #ifdef CONFIG_CMD_USB
>>  #define CONFIG_USB_DWC2
>
>
>
>
> Best regards,
>
> Lukasz Majewski
>
> --
>
> DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
Tom Rini May 31, 2017, 2:30 a.m. UTC | #3
On Wed, May 31, 2017 at 10:27:23AM +0800, Eddie Cai wrote:
> Hi Lukasz
> 
> 2017-05-29 15:51 GMT+08:00 Lukasz Majewski <lukma@denx.de>:
> > Good morning Eddie,
> >
> >> this patch enable rockusb support on rk3288 based device.
> >>
> >> Signed-off-by: Eddie Cai <eddie.cai.linux@gmail.com>
> >> Reviewed-by: Simon Glass <sjg@chromium.org>
> >>
> >
> > I've give this patch set a try on travisCI:
> >
> > https://travis-ci.org/lmajewski/u-boot-dfu/jobs/237068149
> >
> > Unfortunately, there are some problem with following boards:
> >
> > chromebook_jerry, chromebook_minnie ...
> I did it by myself last week. i got the same error. then i fix those
> chromebook error
> and test again. I still got some 3036 board error. But it build
> successfully when i
> build it on my computer. here is the travis-ci.org error log
> https://travis-ci.org/eddiecailinux/u-boot/jobs/236232837
> I have no idea what can i do to fix it.

You can try using the same toolchain, from .travis.yml:
       wget http://releases.linaro.org/components/toolchain/binaries/6.3-2017.02/aarch64-linux-gnu/gcc-linaro-6.3.1-2017.02-x86_64_aarch64-linux-gnu.tar.xz &&
       wget http://releases.linaro.org/components/toolchain/binaries/6.3-2017.02/arm-linux-gnueabihf/gcc-linaro-6.3.1-2017.02-x86_64_arm-linux-gnueabihf.tar.xz &&
       tar -C /tmp -xf gcc-linaro-6.3.1-2017.02-x86_64_aarch64-linux-gnu.tar.xz &&
       tar -C /tmp -xf gcc-linaro-6.3.1-2017.02-x86_64_arm-linux-gnueabihf.tar.xz;
Lukasz Majewski May 31, 2017, 7:12 a.m. UTC | #4
On Wed, 31 May 2017 10:27:23 +0800
Eddie Cai <eddie.cai.linux@gmail.com> wrote:

> Hi Lukasz
> 
> 2017-05-29 15:51 GMT+08:00 Lukasz Majewski <lukma@denx.de>:
> > Good morning Eddie,
> >
> >> this patch enable rockusb support on rk3288 based device.
> >>
> >> Signed-off-by: Eddie Cai <eddie.cai.linux@gmail.com>
> >> Reviewed-by: Simon Glass <sjg@chromium.org>
> >>
> >
> > I've give this patch set a try on travisCI:
> >
> > https://travis-ci.org/lmajewski/u-boot-dfu/jobs/237068149
> >
> > Unfortunately, there are some problem with following boards:
> >
> > chromebook_jerry, chromebook_minnie ...
> I did it by myself last week. i got the same error. then i fix those
> chromebook error
> and test again. I still got some 3036 board error. But it build
> successfully when i
> build it on my computer. here is the travis-ci.org error log
> https://travis-ci.org/eddiecailinux/u-boot/jobs/236232837
> I have no idea what can i do to fix it.

Can you share the SHA1 of commit on top of which you applied your
patches?

I take u-boot-usb (the USB u-boot tree from Marek Vasut) as a base and
then apply commits on top of it.

> >
> > caused by "undefined references to ...."
> >
> > I've tried your patches on top of:
> > u-boot-usb/HEAD
> > SHA1: 3426b2038cfb831d74ac0407fc7a04e990b44540
> >
> > Maybe you have built tested it on other branch/commit?
> >
> > Best regards,
> > Łukasz Majewski
> >
> > p.s. My travis CI .travis.yml attached.
> >
> >> Changes in v7:
> >> -use imply in the Kconfig to enable rockusb
> >>
> >> Changes in v6:
> >> -enable rockusb in defconfig
> >>
> >> Changes in v5:
> >> -none
> >>
> >> Changes in v4:
> >> -move to rk3288_common.h
> >>
> >> Changes in v3:
> >> -move to defconfig
> >>
> >> ---
> >>  arch/arm/mach-rockchip/Kconfig    | 2 ++
> >>  configs/evb-rk3288_defconfig      | 9 +++++++++
> >>  configs/fennec-rk3288_defconfig   | 6 ++++++
> >>  configs/firefly-rk3288_defconfig  | 6 ++++++
> >>  configs/miqi-rk3288_defconfig     | 6 ++++++
> >>  configs/popmetal-rk3288_defconfig | 6 ++++++
> >>  configs/tinker-rk3288_defconfig   | 6 ++++++
> >>  include/configs/rk3288_common.h   | 7 -------
> >>  8 files changed, 41 insertions(+), 7 deletions(-)
> >>
> >> diff --git a/arch/arm/mach-rockchip/Kconfig
> >> b/arch/arm/mach-rockchip/Kconfig index 2b752ad..8a87812 100644
> >> --- a/arch/arm/mach-rockchip/Kconfig
> >> +++ b/arch/arm/mach-rockchip/Kconfig
> >> @@ -32,6 +32,8 @@ config ROCKCHIP_RK3288
> >>       select CPU_V7
> >>       select SUPPORT_SPL
> >>       select SPL
> >> +     imply USB_FUNCTION_ROCKUSB
> >> +     imply CMD_ROCKUSB
> >>       help
> >>         The Rockchip RK3288 is a ARM-based SoC with a quad-core
> >> Cortex-A17 including NEON and GPU, 1MB L2 cache, Mali-T7 graphics,
> >> two diff --git a/configs/evb-rk3288_defconfig
> >> b/configs/evb-rk3288_defconfig index 227150d..cf66e09 100644
> >> --- a/configs/evb-rk3288_defconfig
> >> +++ b/configs/evb-rk3288_defconfig
> >> @@ -17,6 +17,7 @@ CONFIG_CMD_MMC=y
> >>  CONFIG_CMD_SF=y
> >>  CONFIG_CMD_SPI=y
> >>  CONFIG_CMD_I2C=y
> >> +CONFIG_CMD_USB=y
> >>  CONFIG_CMD_GPIO=y
> >>  # CONFIG_CMD_SETEXPR is not set
> >>  CONFIG_CMD_CACHE=y
> >> @@ -61,6 +62,14 @@ CONFIG_DEBUG_UART_CLOCK=24000000
> >>  CONFIG_DEBUG_UART_SHIFT=2
> >>  CONFIG_SYS_NS16550=y
> >>  CONFIG_SYSRESET=y
> >> +CONFIG_USB=y
> >> +CONFIG_USB_STORAGE=y
> >>  CONFIG_USE_TINY_PRINTF=y
> >>  CONFIG_CMD_DHRYSTONE=y
> >>  CONFIG_ERRNO_STR=y
> >> +CONFIG_USB_GADGET=y
> >> +CONFIG_USB_GADGET_DOWNLOAD=y
> >> +CONFIG_USB_GADGET_VBUS_DRAW=0
> >> +CONFIG_G_DNL_MANUFACTURER="Rockchip"
> >> +CONFIG_G_DNL_VENDOR_NUM=0x2207
> >> +CONFIG_G_DNL_PRODUCT_NUM=0x320a
> >> diff --git a/configs/fennec-rk3288_defconfig
> >> b/configs/fennec-rk3288_defconfig index befba18..eb33d00 100644
> >> --- a/configs/fennec-rk3288_defconfig
> >> +++ b/configs/fennec-rk3288_defconfig
> >> @@ -66,3 +66,9 @@ CONFIG_USB_STORAGE=y
> >>  CONFIG_USE_TINY_PRINTF=y
> >>  CONFIG_CMD_DHRYSTONE=y
> >>  CONFIG_ERRNO_STR=y
> >> +CONFIG_USB_GADGET=y
> >> +CONFIG_USB_GADGET_DOWNLOAD=y
> >> +CONFIG_USB_GADGET_VBUS_DRAW=0
> >> +CONFIG_G_DNL_MANUFACTURER="Rockchip"
> >> +CONFIG_G_DNL_VENDOR_NUM=0x2207
> >> +CONFIG_G_DNL_PRODUCT_NUM=0x320a
> >> diff --git a/configs/firefly-rk3288_defconfig
> >> b/configs/firefly-rk3288_defconfig index f2872a6..1f4ca32 100644
> >> --- a/configs/firefly-rk3288_defconfig
> >> +++ b/configs/firefly-rk3288_defconfig
> >> @@ -73,3 +73,9 @@ CONFIG_CONSOLE_SCROLL_LINES=10
> >>  CONFIG_USE_TINY_PRINTF=y
> >>  CONFIG_CMD_DHRYSTONE=y
> >>  CONFIG_ERRNO_STR=y
> >> +CONFIG_USB_GADGET=y
> >> +CONFIG_USB_GADGET_DOWNLOAD=y
> >> +CONFIG_USB_GADGET_VBUS_DRAW=0
> >> +CONFIG_G_DNL_MANUFACTURER="Rockchip"
> >> +CONFIG_G_DNL_VENDOR_NUM=0x2207
> >> +CONFIG_G_DNL_PRODUCT_NUM=0x320a
> >> diff --git a/configs/miqi-rk3288_defconfig
> >> b/configs/miqi-rk3288_defconfig index d93bd97..b8b6fd5 100644
> >> --- a/configs/miqi-rk3288_defconfig
> >> +++ b/configs/miqi-rk3288_defconfig
> >> @@ -70,3 +70,9 @@ CONFIG_CONSOLE_SCROLL_LINES=10
> >>  CONFIG_USE_TINY_PRINTF=y
> >>  CONFIG_CMD_DHRYSTONE=y
> >>  CONFIG_ERRNO_STR=y
> >> +CONFIG_USB_GADGET=y
> >> +CONFIG_USB_GADGET_DOWNLOAD=y
> >> +CONFIG_USB_GADGET_VBUS_DRAW=0
> >> +CONFIG_G_DNL_MANUFACTURER="Rockchip"
> >> +CONFIG_G_DNL_VENDOR_NUM=0x2207
> >> +CONFIG_G_DNL_PRODUCT_NUM=0x320a
> >> diff --git a/configs/popmetal-rk3288_defconfig
> >> b/configs/popmetal-rk3288_defconfig index 748cda4..1181a20 100644
> >> --- a/configs/popmetal-rk3288_defconfig
> >> +++ b/configs/popmetal-rk3288_defconfig
> >> @@ -66,3 +66,9 @@ CONFIG_USB_STORAGE=y
> >>  CONFIG_USE_TINY_PRINTF=y
> >>  CONFIG_CMD_DHRYSTONE=y
> >>  CONFIG_ERRNO_STR=y
> >> +CONFIG_USB_GADGET=y
> >> +CONFIG_USB_GADGET_DOWNLOAD=y
> >> +CONFIG_USB_GADGET_VBUS_DRAW=0
> >> +CONFIG_G_DNL_MANUFACTURER="Rockchip"
> >> +CONFIG_G_DNL_VENDOR_NUM=0x2207
> >> +CONFIG_G_DNL_PRODUCT_NUM=0x320a
> >> diff --git a/configs/tinker-rk3288_defconfig
> >> b/configs/tinker-rk3288_defconfig index ada5950..f863df8 100644
> >> --- a/configs/tinker-rk3288_defconfig
> >> +++ b/configs/tinker-rk3288_defconfig
> >> @@ -66,3 +66,9 @@ CONFIG_USB_STORAGE=y
> >>  CONFIG_USE_TINY_PRINTF=y
> >>  CONFIG_CMD_DHRYSTONE=y
> >>  CONFIG_ERRNO_STR=y
> >> +CONFIG_USB_GADGET=y
> >> +CONFIG_USB_GADGET_DOWNLOAD=y
> >> +CONFIG_USB_GADGET_VBUS_DRAW=0
> >> +CONFIG_G_DNL_MANUFACTURER="Rockchip"
> >> +CONFIG_G_DNL_VENDOR_NUM=0x2207
> >> +CONFIG_G_DNL_PRODUCT_NUM=0x320a
> >> diff --git a/include/configs/rk3288_common.h
> >> b/include/configs/rk3288_common.h index e7a8f72..421ba60 100644
> >> --- a/include/configs/rk3288_common.h
> >> +++ b/include/configs/rk3288_common.h
> >> @@ -58,11 +58,9 @@
> >>
> >>  #ifndef CONFIG_SPL_BUILD
> >>  /* usb otg */
> >> -#define CONFIG_USB_GADGET
> >>  #define CONFIG_USB_GADGET_DUALSPEED
> >>  #define CONFIG_USB_GADGET_DWC2_OTG
> >>  #define CONFIG_ROCKCHIP_USB2_PHY
> >> -#define CONFIG_USB_GADGET_VBUS_DRAW  0
> >>
> >>  /* fastboot  */
> >>  #define CONFIG_CMD_FASTBOOT
> >> @@ -76,11 +74,6 @@
> >>  #define CONFIG_USB_FUNCTION_MASS_STORAGE
> >>  #define CONFIG_CMD_USB_MASS_STORAGE
> >>
> >> -#define CONFIG_USB_GADGET_DOWNLOAD
> >> -#define CONFIG_G_DNL_MANUFACTURER    "Rockchip"
> >> -#define CONFIG_G_DNL_VENDOR_NUM              0x2207
> >> -#define CONFIG_G_DNL_PRODUCT_NUM     0x320a
> >> -
> >>  /* usb host support */
> >>  #ifdef CONFIG_CMD_USB
> >>  #define CONFIG_USB_DWC2
> >
> >
> >
> >
> > Best regards,
> >
> > Lukasz Majewski
> >
> > --
> >
> > DENX Software Engineering GmbH,      Managing Director: Wolfgang
> > Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell,
> > Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email:
> > wd@denx.de




Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
Eddie Cai May 31, 2017, 8:02 a.m. UTC | #5
2017-05-31 15:12 GMT+08:00 Lukasz Majewski <lukma@denx.de>:
> On Wed, 31 May 2017 10:27:23 +0800
> Eddie Cai <eddie.cai.linux@gmail.com> wrote:
>
>> Hi Lukasz
>>
>> 2017-05-29 15:51 GMT+08:00 Lukasz Majewski <lukma@denx.de>:
>> > Good morning Eddie,
>> >
>> >> this patch enable rockusb support on rk3288 based device.
>> >>
>> >> Signed-off-by: Eddie Cai <eddie.cai.linux@gmail.com>
>> >> Reviewed-by: Simon Glass <sjg@chromium.org>
>> >>
>> >
>> > I've give this patch set a try on travisCI:
>> >
>> > https://travis-ci.org/lmajewski/u-boot-dfu/jobs/237068149
>> >
>> > Unfortunately, there are some problem with following boards:
>> >
>> > chromebook_jerry, chromebook_minnie ...
>> I did it by myself last week. i got the same error. then i fix those
>> chromebook error
>> and test again. I still got some 3036 board error. But it build
>> successfully when i
>> build it on my computer. here is the travis-ci.org error log
>> https://travis-ci.org/eddiecailinux/u-boot/jobs/236232837
>> I have no idea what can i do to fix it.
>
> Can you share the SHA1 of commit on top of which you applied your
> patches?
>
> I take u-boot-usb (the USB u-boot tree from Marek Vasut) as a base and
> then apply commits on top of it.
here is my branch https://github.com/eddiecailinux/u-boot/tree/rockusb-v8
I apply my patch on top of below commit
commit a63d800196ebee59b0f8ff924f67843cd597a8c1
Author: Tom Rini <trini@konsulko.com>
Date:   Mon May 1 19:54:41 2017 -0400

    Prepare v2017.05-rc3

    Signed-off-by: Tom Rini <trini@konsulko.com>
>
>> >
>> > caused by "undefined references to ...."
>> >
>> > I've tried your patches on top of:
>> > u-boot-usb/HEAD
>> > SHA1: 3426b2038cfb831d74ac0407fc7a04e990b44540
>> >
>> > Maybe you have built tested it on other branch/commit?
>> >
>> > Best regards,
>> > Łukasz Majewski
>> >
>> > p.s. My travis CI .travis.yml attached.
>> >
>> >> Changes in v7:
>> >> -use imply in the Kconfig to enable rockusb
>> >>
>> >> Changes in v6:
>> >> -enable rockusb in defconfig
>> >>
>> >> Changes in v5:
>> >> -none
>> >>
>> >> Changes in v4:
>> >> -move to rk3288_common.h
>> >>
>> >> Changes in v3:
>> >> -move to defconfig
>> >>
>> >> ---
>> >>  arch/arm/mach-rockchip/Kconfig    | 2 ++
>> >>  configs/evb-rk3288_defconfig      | 9 +++++++++
>> >>  configs/fennec-rk3288_defconfig   | 6 ++++++
>> >>  configs/firefly-rk3288_defconfig  | 6 ++++++
>> >>  configs/miqi-rk3288_defconfig     | 6 ++++++
>> >>  configs/popmetal-rk3288_defconfig | 6 ++++++
>> >>  configs/tinker-rk3288_defconfig   | 6 ++++++
>> >>  include/configs/rk3288_common.h   | 7 -------
>> >>  8 files changed, 41 insertions(+), 7 deletions(-)
>> >>
>> >> diff --git a/arch/arm/mach-rockchip/Kconfig
>> >> b/arch/arm/mach-rockchip/Kconfig index 2b752ad..8a87812 100644
>> >> --- a/arch/arm/mach-rockchip/Kconfig
>> >> +++ b/arch/arm/mach-rockchip/Kconfig
>> >> @@ -32,6 +32,8 @@ config ROCKCHIP_RK3288
>> >>       select CPU_V7
>> >>       select SUPPORT_SPL
>> >>       select SPL
>> >> +     imply USB_FUNCTION_ROCKUSB
>> >> +     imply CMD_ROCKUSB
>> >>       help
>> >>         The Rockchip RK3288 is a ARM-based SoC with a quad-core
>> >> Cortex-A17 including NEON and GPU, 1MB L2 cache, Mali-T7 graphics,
>> >> two diff --git a/configs/evb-rk3288_defconfig
>> >> b/configs/evb-rk3288_defconfig index 227150d..cf66e09 100644
>> >> --- a/configs/evb-rk3288_defconfig
>> >> +++ b/configs/evb-rk3288_defconfig
>> >> @@ -17,6 +17,7 @@ CONFIG_CMD_MMC=y
>> >>  CONFIG_CMD_SF=y
>> >>  CONFIG_CMD_SPI=y
>> >>  CONFIG_CMD_I2C=y
>> >> +CONFIG_CMD_USB=y
>> >>  CONFIG_CMD_GPIO=y
>> >>  # CONFIG_CMD_SETEXPR is not set
>> >>  CONFIG_CMD_CACHE=y
>> >> @@ -61,6 +62,14 @@ CONFIG_DEBUG_UART_CLOCK=24000000
>> >>  CONFIG_DEBUG_UART_SHIFT=2
>> >>  CONFIG_SYS_NS16550=y
>> >>  CONFIG_SYSRESET=y
>> >> +CONFIG_USB=y
>> >> +CONFIG_USB_STORAGE=y
>> >>  CONFIG_USE_TINY_PRINTF=y
>> >>  CONFIG_CMD_DHRYSTONE=y
>> >>  CONFIG_ERRNO_STR=y
>> >> +CONFIG_USB_GADGET=y
>> >> +CONFIG_USB_GADGET_DOWNLOAD=y
>> >> +CONFIG_USB_GADGET_VBUS_DRAW=0
>> >> +CONFIG_G_DNL_MANUFACTURER="Rockchip"
>> >> +CONFIG_G_DNL_VENDOR_NUM=0x2207
>> >> +CONFIG_G_DNL_PRODUCT_NUM=0x320a
>> >> diff --git a/configs/fennec-rk3288_defconfig
>> >> b/configs/fennec-rk3288_defconfig index befba18..eb33d00 100644
>> >> --- a/configs/fennec-rk3288_defconfig
>> >> +++ b/configs/fennec-rk3288_defconfig
>> >> @@ -66,3 +66,9 @@ CONFIG_USB_STORAGE=y
>> >>  CONFIG_USE_TINY_PRINTF=y
>> >>  CONFIG_CMD_DHRYSTONE=y
>> >>  CONFIG_ERRNO_STR=y
>> >> +CONFIG_USB_GADGET=y
>> >> +CONFIG_USB_GADGET_DOWNLOAD=y
>> >> +CONFIG_USB_GADGET_VBUS_DRAW=0
>> >> +CONFIG_G_DNL_MANUFACTURER="Rockchip"
>> >> +CONFIG_G_DNL_VENDOR_NUM=0x2207
>> >> +CONFIG_G_DNL_PRODUCT_NUM=0x320a
>> >> diff --git a/configs/firefly-rk3288_defconfig
>> >> b/configs/firefly-rk3288_defconfig index f2872a6..1f4ca32 100644
>> >> --- a/configs/firefly-rk3288_defconfig
>> >> +++ b/configs/firefly-rk3288_defconfig
>> >> @@ -73,3 +73,9 @@ CONFIG_CONSOLE_SCROLL_LINES=10
>> >>  CONFIG_USE_TINY_PRINTF=y
>> >>  CONFIG_CMD_DHRYSTONE=y
>> >>  CONFIG_ERRNO_STR=y
>> >> +CONFIG_USB_GADGET=y
>> >> +CONFIG_USB_GADGET_DOWNLOAD=y
>> >> +CONFIG_USB_GADGET_VBUS_DRAW=0
>> >> +CONFIG_G_DNL_MANUFACTURER="Rockchip"
>> >> +CONFIG_G_DNL_VENDOR_NUM=0x2207
>> >> +CONFIG_G_DNL_PRODUCT_NUM=0x320a
>> >> diff --git a/configs/miqi-rk3288_defconfig
>> >> b/configs/miqi-rk3288_defconfig index d93bd97..b8b6fd5 100644
>> >> --- a/configs/miqi-rk3288_defconfig
>> >> +++ b/configs/miqi-rk3288_defconfig
>> >> @@ -70,3 +70,9 @@ CONFIG_CONSOLE_SCROLL_LINES=10
>> >>  CONFIG_USE_TINY_PRINTF=y
>> >>  CONFIG_CMD_DHRYSTONE=y
>> >>  CONFIG_ERRNO_STR=y
>> >> +CONFIG_USB_GADGET=y
>> >> +CONFIG_USB_GADGET_DOWNLOAD=y
>> >> +CONFIG_USB_GADGET_VBUS_DRAW=0
>> >> +CONFIG_G_DNL_MANUFACTURER="Rockchip"
>> >> +CONFIG_G_DNL_VENDOR_NUM=0x2207
>> >> +CONFIG_G_DNL_PRODUCT_NUM=0x320a
>> >> diff --git a/configs/popmetal-rk3288_defconfig
>> >> b/configs/popmetal-rk3288_defconfig index 748cda4..1181a20 100644
>> >> --- a/configs/popmetal-rk3288_defconfig
>> >> +++ b/configs/popmetal-rk3288_defconfig
>> >> @@ -66,3 +66,9 @@ CONFIG_USB_STORAGE=y
>> >>  CONFIG_USE_TINY_PRINTF=y
>> >>  CONFIG_CMD_DHRYSTONE=y
>> >>  CONFIG_ERRNO_STR=y
>> >> +CONFIG_USB_GADGET=y
>> >> +CONFIG_USB_GADGET_DOWNLOAD=y
>> >> +CONFIG_USB_GADGET_VBUS_DRAW=0
>> >> +CONFIG_G_DNL_MANUFACTURER="Rockchip"
>> >> +CONFIG_G_DNL_VENDOR_NUM=0x2207
>> >> +CONFIG_G_DNL_PRODUCT_NUM=0x320a
>> >> diff --git a/configs/tinker-rk3288_defconfig
>> >> b/configs/tinker-rk3288_defconfig index ada5950..f863df8 100644
>> >> --- a/configs/tinker-rk3288_defconfig
>> >> +++ b/configs/tinker-rk3288_defconfig
>> >> @@ -66,3 +66,9 @@ CONFIG_USB_STORAGE=y
>> >>  CONFIG_USE_TINY_PRINTF=y
>> >>  CONFIG_CMD_DHRYSTONE=y
>> >>  CONFIG_ERRNO_STR=y
>> >> +CONFIG_USB_GADGET=y
>> >> +CONFIG_USB_GADGET_DOWNLOAD=y
>> >> +CONFIG_USB_GADGET_VBUS_DRAW=0
>> >> +CONFIG_G_DNL_MANUFACTURER="Rockchip"
>> >> +CONFIG_G_DNL_VENDOR_NUM=0x2207
>> >> +CONFIG_G_DNL_PRODUCT_NUM=0x320a
>> >> diff --git a/include/configs/rk3288_common.h
>> >> b/include/configs/rk3288_common.h index e7a8f72..421ba60 100644
>> >> --- a/include/configs/rk3288_common.h
>> >> +++ b/include/configs/rk3288_common.h
>> >> @@ -58,11 +58,9 @@
>> >>
>> >>  #ifndef CONFIG_SPL_BUILD
>> >>  /* usb otg */
>> >> -#define CONFIG_USB_GADGET
>> >>  #define CONFIG_USB_GADGET_DUALSPEED
>> >>  #define CONFIG_USB_GADGET_DWC2_OTG
>> >>  #define CONFIG_ROCKCHIP_USB2_PHY
>> >> -#define CONFIG_USB_GADGET_VBUS_DRAW  0
>> >>
>> >>  /* fastboot  */
>> >>  #define CONFIG_CMD_FASTBOOT
>> >> @@ -76,11 +74,6 @@
>> >>  #define CONFIG_USB_FUNCTION_MASS_STORAGE
>> >>  #define CONFIG_CMD_USB_MASS_STORAGE
>> >>
>> >> -#define CONFIG_USB_GADGET_DOWNLOAD
>> >> -#define CONFIG_G_DNL_MANUFACTURER    "Rockchip"
>> >> -#define CONFIG_G_DNL_VENDOR_NUM              0x2207
>> >> -#define CONFIG_G_DNL_PRODUCT_NUM     0x320a
>> >> -
>> >>  /* usb host support */
>> >>  #ifdef CONFIG_CMD_USB
>> >>  #define CONFIG_USB_DWC2
>> >
>> >
>> >
>> >
>> > Best regards,
>> >
>> > Lukasz Majewski
>> >
>> > --
>> >
>> > DENX Software Engineering GmbH,      Managing Director: Wolfgang
>> > Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell,
>> > Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email:
>> > wd@denx.de
>
>
>
>
> Best regards,
>
> Lukasz Majewski
>
> --
>
> DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
Lukasz Majewski May 31, 2017, 8:18 a.m. UTC | #6
On Wed, 31 May 2017 16:02:27 +0800
Eddie Cai <eddie.cai.linux@gmail.com> wrote:

> 2017-05-31 15:12 GMT+08:00 Lukasz Majewski <lukma@denx.de>:
> > On Wed, 31 May 2017 10:27:23 +0800
> > Eddie Cai <eddie.cai.linux@gmail.com> wrote:
> >
> >> Hi Lukasz
> >>
> >> 2017-05-29 15:51 GMT+08:00 Lukasz Majewski <lukma@denx.de>:
> >> > Good morning Eddie,
> >> >
> >> >> this patch enable rockusb support on rk3288 based device.
> >> >>
> >> >> Signed-off-by: Eddie Cai <eddie.cai.linux@gmail.com>
> >> >> Reviewed-by: Simon Glass <sjg@chromium.org>
> >> >>
> >> >
> >> > I've give this patch set a try on travisCI:
> >> >
> >> > https://travis-ci.org/lmajewski/u-boot-dfu/jobs/237068149
> >> >
> >> > Unfortunately, there are some problem with following boards:
> >> >
> >> > chromebook_jerry, chromebook_minnie ...
> >> I did it by myself last week. i got the same error. then i fix
> >> those chromebook error
> >> and test again. I still got some 3036 board error. But it build
> >> successfully when i
> >> build it on my computer. here is the travis-ci.org error log
> >> https://travis-ci.org/eddiecailinux/u-boot/jobs/236232837
> >> I have no idea what can i do to fix it.
> >
> > Can you share the SHA1 of commit on top of which you applied your
> > patches?
> >
> > I take u-boot-usb (the USB u-boot tree from Marek Vasut) as a base
> > and then apply commits on top of it.
> here is my branch
> https://github.com/eddiecailinux/u-boot/tree/rockusb-v8 I apply my
> patch on top of below commit commit
> a63d800196ebee59b0f8ff924f67843cd597a8c1 Author: Tom Rini
> <trini@konsulko.com> Date:   Mon May 1 19:54:41 2017 -0400
> 
>     Prepare v2017.05-rc3
> 
>     Signed-off-by: Tom Rini <trini@konsulko.com>

Ok. Thanks for the info.

The u-boot-usb seems to be a bit older.

Anyway, have you tried with compiling your code with toolchains
suggested by Tom?

Best regards,
Łukasz Majewski

> >
> >> >
> >> > caused by "undefined references to ...."
> >> >
> >> > I've tried your patches on top of:
> >> > u-boot-usb/HEAD
> >> > SHA1: 3426b2038cfb831d74ac0407fc7a04e990b44540
> >> >
> >> > Maybe you have built tested it on other branch/commit?
> >> >
> >> > Best regards,
> >> > Łukasz Majewski
> >> >
> >> > p.s. My travis CI .travis.yml attached.
> >> >
> >> >> Changes in v7:
> >> >> -use imply in the Kconfig to enable rockusb
> >> >>
> >> >> Changes in v6:
> >> >> -enable rockusb in defconfig
> >> >>
> >> >> Changes in v5:
> >> >> -none
> >> >>
> >> >> Changes in v4:
> >> >> -move to rk3288_common.h
> >> >>
> >> >> Changes in v3:
> >> >> -move to defconfig
> >> >>
> >> >> ---
> >> >>  arch/arm/mach-rockchip/Kconfig    | 2 ++
> >> >>  configs/evb-rk3288_defconfig      | 9 +++++++++
> >> >>  configs/fennec-rk3288_defconfig   | 6 ++++++
> >> >>  configs/firefly-rk3288_defconfig  | 6 ++++++
> >> >>  configs/miqi-rk3288_defconfig     | 6 ++++++
> >> >>  configs/popmetal-rk3288_defconfig | 6 ++++++
> >> >>  configs/tinker-rk3288_defconfig   | 6 ++++++
> >> >>  include/configs/rk3288_common.h   | 7 -------
> >> >>  8 files changed, 41 insertions(+), 7 deletions(-)
> >> >>
> >> >> diff --git a/arch/arm/mach-rockchip/Kconfig
> >> >> b/arch/arm/mach-rockchip/Kconfig index 2b752ad..8a87812 100644
> >> >> --- a/arch/arm/mach-rockchip/Kconfig
> >> >> +++ b/arch/arm/mach-rockchip/Kconfig
> >> >> @@ -32,6 +32,8 @@ config ROCKCHIP_RK3288
> >> >>       select CPU_V7
> >> >>       select SUPPORT_SPL
> >> >>       select SPL
> >> >> +     imply USB_FUNCTION_ROCKUSB
> >> >> +     imply CMD_ROCKUSB
> >> >>       help
> >> >>         The Rockchip RK3288 is a ARM-based SoC with a quad-core
> >> >> Cortex-A17 including NEON and GPU, 1MB L2 cache, Mali-T7
> >> >> graphics, two diff --git a/configs/evb-rk3288_defconfig
> >> >> b/configs/evb-rk3288_defconfig index 227150d..cf66e09 100644
> >> >> --- a/configs/evb-rk3288_defconfig
> >> >> +++ b/configs/evb-rk3288_defconfig
> >> >> @@ -17,6 +17,7 @@ CONFIG_CMD_MMC=y
> >> >>  CONFIG_CMD_SF=y
> >> >>  CONFIG_CMD_SPI=y
> >> >>  CONFIG_CMD_I2C=y
> >> >> +CONFIG_CMD_USB=y
> >> >>  CONFIG_CMD_GPIO=y
> >> >>  # CONFIG_CMD_SETEXPR is not set
> >> >>  CONFIG_CMD_CACHE=y
> >> >> @@ -61,6 +62,14 @@ CONFIG_DEBUG_UART_CLOCK=24000000
> >> >>  CONFIG_DEBUG_UART_SHIFT=2
> >> >>  CONFIG_SYS_NS16550=y
> >> >>  CONFIG_SYSRESET=y
> >> >> +CONFIG_USB=y
> >> >> +CONFIG_USB_STORAGE=y
> >> >>  CONFIG_USE_TINY_PRINTF=y
> >> >>  CONFIG_CMD_DHRYSTONE=y
> >> >>  CONFIG_ERRNO_STR=y
> >> >> +CONFIG_USB_GADGET=y
> >> >> +CONFIG_USB_GADGET_DOWNLOAD=y
> >> >> +CONFIG_USB_GADGET_VBUS_DRAW=0
> >> >> +CONFIG_G_DNL_MANUFACTURER="Rockchip"
> >> >> +CONFIG_G_DNL_VENDOR_NUM=0x2207
> >> >> +CONFIG_G_DNL_PRODUCT_NUM=0x320a
> >> >> diff --git a/configs/fennec-rk3288_defconfig
> >> >> b/configs/fennec-rk3288_defconfig index befba18..eb33d00 100644
> >> >> --- a/configs/fennec-rk3288_defconfig
> >> >> +++ b/configs/fennec-rk3288_defconfig
> >> >> @@ -66,3 +66,9 @@ CONFIG_USB_STORAGE=y
> >> >>  CONFIG_USE_TINY_PRINTF=y
> >> >>  CONFIG_CMD_DHRYSTONE=y
> >> >>  CONFIG_ERRNO_STR=y
> >> >> +CONFIG_USB_GADGET=y
> >> >> +CONFIG_USB_GADGET_DOWNLOAD=y
> >> >> +CONFIG_USB_GADGET_VBUS_DRAW=0
> >> >> +CONFIG_G_DNL_MANUFACTURER="Rockchip"
> >> >> +CONFIG_G_DNL_VENDOR_NUM=0x2207
> >> >> +CONFIG_G_DNL_PRODUCT_NUM=0x320a
> >> >> diff --git a/configs/firefly-rk3288_defconfig
> >> >> b/configs/firefly-rk3288_defconfig index f2872a6..1f4ca32 100644
> >> >> --- a/configs/firefly-rk3288_defconfig
> >> >> +++ b/configs/firefly-rk3288_defconfig
> >> >> @@ -73,3 +73,9 @@ CONFIG_CONSOLE_SCROLL_LINES=10
> >> >>  CONFIG_USE_TINY_PRINTF=y
> >> >>  CONFIG_CMD_DHRYSTONE=y
> >> >>  CONFIG_ERRNO_STR=y
> >> >> +CONFIG_USB_GADGET=y
> >> >> +CONFIG_USB_GADGET_DOWNLOAD=y
> >> >> +CONFIG_USB_GADGET_VBUS_DRAW=0
> >> >> +CONFIG_G_DNL_MANUFACTURER="Rockchip"
> >> >> +CONFIG_G_DNL_VENDOR_NUM=0x2207
> >> >> +CONFIG_G_DNL_PRODUCT_NUM=0x320a
> >> >> diff --git a/configs/miqi-rk3288_defconfig
> >> >> b/configs/miqi-rk3288_defconfig index d93bd97..b8b6fd5 100644
> >> >> --- a/configs/miqi-rk3288_defconfig
> >> >> +++ b/configs/miqi-rk3288_defconfig
> >> >> @@ -70,3 +70,9 @@ CONFIG_CONSOLE_SCROLL_LINES=10
> >> >>  CONFIG_USE_TINY_PRINTF=y
> >> >>  CONFIG_CMD_DHRYSTONE=y
> >> >>  CONFIG_ERRNO_STR=y
> >> >> +CONFIG_USB_GADGET=y
> >> >> +CONFIG_USB_GADGET_DOWNLOAD=y
> >> >> +CONFIG_USB_GADGET_VBUS_DRAW=0
> >> >> +CONFIG_G_DNL_MANUFACTURER="Rockchip"
> >> >> +CONFIG_G_DNL_VENDOR_NUM=0x2207
> >> >> +CONFIG_G_DNL_PRODUCT_NUM=0x320a
> >> >> diff --git a/configs/popmetal-rk3288_defconfig
> >> >> b/configs/popmetal-rk3288_defconfig index 748cda4..1181a20
> >> >> 100644 --- a/configs/popmetal-rk3288_defconfig
> >> >> +++ b/configs/popmetal-rk3288_defconfig
> >> >> @@ -66,3 +66,9 @@ CONFIG_USB_STORAGE=y
> >> >>  CONFIG_USE_TINY_PRINTF=y
> >> >>  CONFIG_CMD_DHRYSTONE=y
> >> >>  CONFIG_ERRNO_STR=y
> >> >> +CONFIG_USB_GADGET=y
> >> >> +CONFIG_USB_GADGET_DOWNLOAD=y
> >> >> +CONFIG_USB_GADGET_VBUS_DRAW=0
> >> >> +CONFIG_G_DNL_MANUFACTURER="Rockchip"
> >> >> +CONFIG_G_DNL_VENDOR_NUM=0x2207
> >> >> +CONFIG_G_DNL_PRODUCT_NUM=0x320a
> >> >> diff --git a/configs/tinker-rk3288_defconfig
> >> >> b/configs/tinker-rk3288_defconfig index ada5950..f863df8 100644
> >> >> --- a/configs/tinker-rk3288_defconfig
> >> >> +++ b/configs/tinker-rk3288_defconfig
> >> >> @@ -66,3 +66,9 @@ CONFIG_USB_STORAGE=y
> >> >>  CONFIG_USE_TINY_PRINTF=y
> >> >>  CONFIG_CMD_DHRYSTONE=y
> >> >>  CONFIG_ERRNO_STR=y
> >> >> +CONFIG_USB_GADGET=y
> >> >> +CONFIG_USB_GADGET_DOWNLOAD=y
> >> >> +CONFIG_USB_GADGET_VBUS_DRAW=0
> >> >> +CONFIG_G_DNL_MANUFACTURER="Rockchip"
> >> >> +CONFIG_G_DNL_VENDOR_NUM=0x2207
> >> >> +CONFIG_G_DNL_PRODUCT_NUM=0x320a
> >> >> diff --git a/include/configs/rk3288_common.h
> >> >> b/include/configs/rk3288_common.h index e7a8f72..421ba60 100644
> >> >> --- a/include/configs/rk3288_common.h
> >> >> +++ b/include/configs/rk3288_common.h
> >> >> @@ -58,11 +58,9 @@
> >> >>
> >> >>  #ifndef CONFIG_SPL_BUILD
> >> >>  /* usb otg */
> >> >> -#define CONFIG_USB_GADGET
> >> >>  #define CONFIG_USB_GADGET_DUALSPEED
> >> >>  #define CONFIG_USB_GADGET_DWC2_OTG
> >> >>  #define CONFIG_ROCKCHIP_USB2_PHY
> >> >> -#define CONFIG_USB_GADGET_VBUS_DRAW  0
> >> >>
> >> >>  /* fastboot  */
> >> >>  #define CONFIG_CMD_FASTBOOT
> >> >> @@ -76,11 +74,6 @@
> >> >>  #define CONFIG_USB_FUNCTION_MASS_STORAGE
> >> >>  #define CONFIG_CMD_USB_MASS_STORAGE
> >> >>
> >> >> -#define CONFIG_USB_GADGET_DOWNLOAD
> >> >> -#define CONFIG_G_DNL_MANUFACTURER    "Rockchip"
> >> >> -#define CONFIG_G_DNL_VENDOR_NUM              0x2207
> >> >> -#define CONFIG_G_DNL_PRODUCT_NUM     0x320a
> >> >> -
> >> >>  /* usb host support */
> >> >>  #ifdef CONFIG_CMD_USB
> >> >>  #define CONFIG_USB_DWC2
> >> >
> >> >
> >> >
> >> >
> >> > Best regards,
> >> >
> >> > Lukasz Majewski
> >> >
> >> > --
> >> >
> >> > DENX Software Engineering GmbH,      Managing Director: Wolfgang
> >> > Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194
> >> > Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax:
> >> > (+49)-8142-66989-80 Email: wd@denx.de
> >
> >
> >
> >
> > Best regards,
> >
> > Lukasz Majewski
> >
> > --
> >
> > DENX Software Engineering GmbH,      Managing Director: Wolfgang
> > Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell,
> > Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email:
> > wd@denx.de




Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
Lukasz Majewski May 31, 2017, 8:22 a.m. UTC | #7
Hi Eddie,

> >     Prepare v2017.05-rc3
> > 
> >     Signed-off-by: Tom Rini <trini@konsulko.com>  
> 
> Ok. Thanks for the info.
> 
> The u-boot-usb seems to be a bit older.
				   ^^^^^^ sorry newer :-)

"usb: ehci: Add Renesas RCar M3/H3 EHCI support"
3426b2038cfb831d74ac0407fc7a04e990b44540

> 
> Anyway, have you tried with compiling your code with toolchains
> suggested by Tom?
> 
> Best regards,
> Łukasz Majewski
> 
> > >  



Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
Eddie Cai May 31, 2017, 8:41 a.m. UTC | #8
2017-05-31 16:22 GMT+08:00 Lukasz Majewski <lukma@denx.de>:
> Hi Eddie,
>
>> >     Prepare v2017.05-rc3
>> >
>> >     Signed-off-by: Tom Rini <trini@konsulko.com>
>>
>> Ok. Thanks for the info.
>>
>> The u-boot-usb seems to be a bit older.
>                                    ^^^^^^ sorry newer :-)
>
> "usb: ehci: Add Renesas RCar M3/H3 EHCI support"
> 3426b2038cfb831d74ac0407fc7a04e990b44540
>
>>
>> Anyway, have you tried with compiling your code with toolchains
>> suggested by Tom?
Yes. I tried to build with this toolchain on my computer. It build
successfully, but i got below warning.

  CC      spl/arch/arm/mach-rockchip/rk3036-board-spl.o
arch/arm/mach-rockchip/rk3036-board-spl.c:20:34: warning: ‘grf’
defined but not used [-Wunused-const-variable=]
 static struct rk3036_grf * const grf = (void *)GRF_BASE;

I don't think it relate to my patches. so i checkout below commit and
build with the same toolchain again. i got the same warning.
commit a63d800196ebee59b0f8ff924f67843cd597a8c1
Author: Tom Rini <trini@konsulko.com>
Date:   Mon May 1 19:54:41 2017 -0400

    Prepare v2017.05-rc3

    Signed-off-by: Tom Rini <trini@konsulko.com>
>>
>> Best regards,
>> Łukasz Majewski
>>
>> > >
>
>
>
> Best regards,
>
> Lukasz Majewski
>
> --
>
> DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
Eddie Cai May 31, 2017, 8:43 a.m. UTC | #9
2017-05-31 16:41 GMT+08:00 Eddie Cai <eddie.cai.linux@gmail.com>:
> 2017-05-31 16:22 GMT+08:00 Lukasz Majewski <lukma@denx.de>:
>> Hi Eddie,
>>
>>> >     Prepare v2017.05-rc3
>>> >
>>> >     Signed-off-by: Tom Rini <trini@konsulko.com>
>>>
>>> Ok. Thanks for the info.
>>>
>>> The u-boot-usb seems to be a bit older.
>>                                    ^^^^^^ sorry newer :-)
>>
>> "usb: ehci: Add Renesas RCar M3/H3 EHCI support"
>> 3426b2038cfb831d74ac0407fc7a04e990b44540
>>
>>>
>>> Anyway, have you tried with compiling your code with toolchains
>>> suggested by Tom?
> Yes. I tried to build with this toolchain on my computer. It build
> successfully, but i got below warning.
>
>   CC      spl/arch/arm/mach-rockchip/rk3036-board-spl.o
> arch/arm/mach-rockchip/rk3036-board-spl.c:20:34: warning: ‘grf’
> defined but not used [-Wunused-const-variable=]
>  static struct rk3036_grf * const grf = (void *)GRF_BASE;
>
> I don't think it relate to my patches. so i checkout below commit and
> build with the same toolchain again. i got the same warning.
> commit a63d800196ebee59b0f8ff924f67843cd597a8c1
> Author: Tom Rini <trini@konsulko.com>
> Date:   Mon May 1 19:54:41 2017 -0400
>
>     Prepare v2017.05-rc3
>
>     Signed-off-by: Tom Rini <trini@konsulko.com>
Anyway, This warning is not the same error travis-ci report.
>>>
>>> Best regards,
>>> Łukasz Majewski
>>>
>>> > >
>>
>>
>>
>> Best regards,
>>
>> Lukasz Majewski
>>
>> --
>>
>> DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
>> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
>> Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
Lukasz Majewski June 3, 2017, 2:23 p.m. UTC | #10
Hi Eddie,

> 2017-05-31 15:12 GMT+08:00 Lukasz Majewski <lukma@denx.de>:
> > On Wed, 31 May 2017 10:27:23 +0800
> > Eddie Cai <eddie.cai.linux@gmail.com> wrote:
> >
> >> Hi Lukasz
> >>
> >> 2017-05-29 15:51 GMT+08:00 Lukasz Majewski <lukma@denx.de>:
> >> > Good morning Eddie,
> >> >
> >> >> this patch enable rockusb support on rk3288 based device.
> >> >>
> >> >> Signed-off-by: Eddie Cai <eddie.cai.linux@gmail.com>
> >> >> Reviewed-by: Simon Glass <sjg@chromium.org>
> >> >>
> >> >
> >> > I've give this patch set a try on travisCI:
> >> >
> >> > https://travis-ci.org/lmajewski/u-boot-dfu/jobs/237068149
> >> >
> >> > Unfortunately, there are some problem with following boards:
> >> >
> >> > chromebook_jerry, chromebook_minnie ...
> >> I did it by myself last week. i got the same error. then i fix
> >> those chromebook error
> >> and test again. I still got some 3036 board error. But it build
> >> successfully when i
> >> build it on my computer. here is the travis-ci.org error log
> >> https://travis-ci.org/eddiecailinux/u-boot/jobs/236232837
> >> I have no idea what can i do to fix it.
> >
> > Can you share the SHA1 of commit on top of which you applied your
> > patches?
> >
> > I take u-boot-usb (the USB u-boot tree from Marek Vasut) as a base
> > and then apply commits on top of it.
> here is my branch
> https://github.com/eddiecailinux/u-boot/tree/rockusb-v8 I apply my
> patch on top of below commit commit
> a63d800196ebee59b0f8ff924f67843cd597a8c1 Author: Tom Rini
> <trini@konsulko.com> Date:   Mon May 1 19:54:41 2017 -0400
> 
>     Prepare v2017.05-rc3
> 
>     Signed-off-by: Tom Rini <trini@konsulko.com>

I've looked thoroughly at your patches:

Your patches has been applied on top of the above commit:
SHA1: a63d800196ebee59b0f8ff924f67843cd597a8c1

Before applying your patches:
https://travis-ci.org/lmajewski/u-boot-dfu/builds/239069544

After applying them:
https://travis-ci.org/lmajewski/u-boot-dfu/builds/239074799

To be more precise:
https://travis-ci.org/lmajewski/u-boot-dfu/jobs/239074800


For example:

      arm:  +   rock2
+cmd/built-in.o: In function `do_fastboot':
+cmd/fastboot.c:28: undefined reference to `board_usb_init'
+cmd/fastboot.c:34: undefined reference to `g_dnl_clear_detach'
+cmd/fastboot.c:35: undefined reference to `g_dnl_register'
+cmd/fastboot.c:39: undefined reference to
      `g_dnl_board_usb_cable_connected' +cmd/fastboot.c:57: undefined
      reference to `g_dnl_unregister' +cmd/fastboot.c:58: undefined
      reference to `g_dnl_clear_detach' +cmd/fastboot.c:59: undefined
      reference to `board_usb_cleanup' +cmd/fastboot.c:47: undefined
      reference to `g_dnl_detach' +cmd/fastboot.c:51: undefined
      reference to `usb_gadget_handle_interrupts' +cmd/built-in.o: In
      function `do_usb_mass_storage':



For me it seems like you have enabled fastboot support on too many
rochchip's boards.

Can you look on it?

I've also updated my .travis.ml file to be in sync with mainline, so we
will use recommended arm toolchain.

Please find this file attached.

If there are any other patches required before applying this patch
series, please let me know (or better post them to ML).


Best regards,
Łukasz Majewski

> >
> >> >
> >> > caused by "undefined references to ...."
> >> >
> >> > I've tried your patches on top of:
> >> > u-boot-usb/HEAD
> >> > SHA1: 3426b2038cfb831d74ac0407fc7a04e990b44540
> >> >
> >> > Maybe you have built tested it on other branch/commit?
> >> >
> >> > Best regards,
> >> > Łukasz Majewski
> >> >
> >> > p.s. My travis CI .travis.yml attached.
> >> >
> >> >> Changes in v7:
> >> >> -use imply in the Kconfig to enable rockusb
> >> >>
> >> >> Changes in v6:
> >> >> -enable rockusb in defconfig
> >> >>
> >> >> Changes in v5:
> >> >> -none
> >> >>
> >> >> Changes in v4:
> >> >> -move to rk3288_common.h
> >> >>
> >> >> Changes in v3:
> >> >> -move to defconfig
> >> >>
> >> >> ---
> >> >>  arch/arm/mach-rockchip/Kconfig    | 2 ++
> >> >>  configs/evb-rk3288_defconfig      | 9 +++++++++
> >> >>  configs/fennec-rk3288_defconfig   | 6 ++++++
> >> >>  configs/firefly-rk3288_defconfig  | 6 ++++++
> >> >>  configs/miqi-rk3288_defconfig     | 6 ++++++
> >> >>  configs/popmetal-rk3288_defconfig | 6 ++++++
> >> >>  configs/tinker-rk3288_defconfig   | 6 ++++++
> >> >>  include/configs/rk3288_common.h   | 7 -------
> >> >>  8 files changed, 41 insertions(+), 7 deletions(-)
> >> >>
> >> >> diff --git a/arch/arm/mach-rockchip/Kconfig
> >> >> b/arch/arm/mach-rockchip/Kconfig index 2b752ad..8a87812 100644
> >> >> --- a/arch/arm/mach-rockchip/Kconfig
> >> >> +++ b/arch/arm/mach-rockchip/Kconfig
> >> >> @@ -32,6 +32,8 @@ config ROCKCHIP_RK3288
> >> >>       select CPU_V7
> >> >>       select SUPPORT_SPL
> >> >>       select SPL
> >> >> +     imply USB_FUNCTION_ROCKUSB
> >> >> +     imply CMD_ROCKUSB
> >> >>       help
> >> >>         The Rockchip RK3288 is a ARM-based SoC with a quad-core
> >> >> Cortex-A17 including NEON and GPU, 1MB L2 cache, Mali-T7
> >> >> graphics, two diff --git a/configs/evb-rk3288_defconfig
> >> >> b/configs/evb-rk3288_defconfig index 227150d..cf66e09 100644
> >> >> --- a/configs/evb-rk3288_defconfig
> >> >> +++ b/configs/evb-rk3288_defconfig
> >> >> @@ -17,6 +17,7 @@ CONFIG_CMD_MMC=y
> >> >>  CONFIG_CMD_SF=y
> >> >>  CONFIG_CMD_SPI=y
> >> >>  CONFIG_CMD_I2C=y
> >> >> +CONFIG_CMD_USB=y
> >> >>  CONFIG_CMD_GPIO=y
> >> >>  # CONFIG_CMD_SETEXPR is not set
> >> >>  CONFIG_CMD_CACHE=y
> >> >> @@ -61,6 +62,14 @@ CONFIG_DEBUG_UART_CLOCK=24000000
> >> >>  CONFIG_DEBUG_UART_SHIFT=2
> >> >>  CONFIG_SYS_NS16550=y
> >> >>  CONFIG_SYSRESET=y
> >> >> +CONFIG_USB=y
> >> >> +CONFIG_USB_STORAGE=y
> >> >>  CONFIG_USE_TINY_PRINTF=y
> >> >>  CONFIG_CMD_DHRYSTONE=y
> >> >>  CONFIG_ERRNO_STR=y
> >> >> +CONFIG_USB_GADGET=y
> >> >> +CONFIG_USB_GADGET_DOWNLOAD=y
> >> >> +CONFIG_USB_GADGET_VBUS_DRAW=0
> >> >> +CONFIG_G_DNL_MANUFACTURER="Rockchip"
> >> >> +CONFIG_G_DNL_VENDOR_NUM=0x2207
> >> >> +CONFIG_G_DNL_PRODUCT_NUM=0x320a
> >> >> diff --git a/configs/fennec-rk3288_defconfig
> >> >> b/configs/fennec-rk3288_defconfig index befba18..eb33d00 100644
> >> >> --- a/configs/fennec-rk3288_defconfig
> >> >> +++ b/configs/fennec-rk3288_defconfig
> >> >> @@ -66,3 +66,9 @@ CONFIG_USB_STORAGE=y
> >> >>  CONFIG_USE_TINY_PRINTF=y
> >> >>  CONFIG_CMD_DHRYSTONE=y
> >> >>  CONFIG_ERRNO_STR=y
> >> >> +CONFIG_USB_GADGET=y
> >> >> +CONFIG_USB_GADGET_DOWNLOAD=y
> >> >> +CONFIG_USB_GADGET_VBUS_DRAW=0
> >> >> +CONFIG_G_DNL_MANUFACTURER="Rockchip"
> >> >> +CONFIG_G_DNL_VENDOR_NUM=0x2207
> >> >> +CONFIG_G_DNL_PRODUCT_NUM=0x320a
> >> >> diff --git a/configs/firefly-rk3288_defconfig
> >> >> b/configs/firefly-rk3288_defconfig index f2872a6..1f4ca32 100644
> >> >> --- a/configs/firefly-rk3288_defconfig
> >> >> +++ b/configs/firefly-rk3288_defconfig
> >> >> @@ -73,3 +73,9 @@ CONFIG_CONSOLE_SCROLL_LINES=10
> >> >>  CONFIG_USE_TINY_PRINTF=y
> >> >>  CONFIG_CMD_DHRYSTONE=y
> >> >>  CONFIG_ERRNO_STR=y
> >> >> +CONFIG_USB_GADGET=y
> >> >> +CONFIG_USB_GADGET_DOWNLOAD=y
> >> >> +CONFIG_USB_GADGET_VBUS_DRAW=0
> >> >> +CONFIG_G_DNL_MANUFACTURER="Rockchip"
> >> >> +CONFIG_G_DNL_VENDOR_NUM=0x2207
> >> >> +CONFIG_G_DNL_PRODUCT_NUM=0x320a
> >> >> diff --git a/configs/miqi-rk3288_defconfig
> >> >> b/configs/miqi-rk3288_defconfig index d93bd97..b8b6fd5 100644
> >> >> --- a/configs/miqi-rk3288_defconfig
> >> >> +++ b/configs/miqi-rk3288_defconfig
> >> >> @@ -70,3 +70,9 @@ CONFIG_CONSOLE_SCROLL_LINES=10
> >> >>  CONFIG_USE_TINY_PRINTF=y
> >> >>  CONFIG_CMD_DHRYSTONE=y
> >> >>  CONFIG_ERRNO_STR=y
> >> >> +CONFIG_USB_GADGET=y
> >> >> +CONFIG_USB_GADGET_DOWNLOAD=y
> >> >> +CONFIG_USB_GADGET_VBUS_DRAW=0
> >> >> +CONFIG_G_DNL_MANUFACTURER="Rockchip"
> >> >> +CONFIG_G_DNL_VENDOR_NUM=0x2207
> >> >> +CONFIG_G_DNL_PRODUCT_NUM=0x320a
> >> >> diff --git a/configs/popmetal-rk3288_defconfig
> >> >> b/configs/popmetal-rk3288_defconfig index 748cda4..1181a20
> >> >> 100644 --- a/configs/popmetal-rk3288_defconfig
> >> >> +++ b/configs/popmetal-rk3288_defconfig
> >> >> @@ -66,3 +66,9 @@ CONFIG_USB_STORAGE=y
> >> >>  CONFIG_USE_TINY_PRINTF=y
> >> >>  CONFIG_CMD_DHRYSTONE=y
> >> >>  CONFIG_ERRNO_STR=y
> >> >> +CONFIG_USB_GADGET=y
> >> >> +CONFIG_USB_GADGET_DOWNLOAD=y
> >> >> +CONFIG_USB_GADGET_VBUS_DRAW=0
> >> >> +CONFIG_G_DNL_MANUFACTURER="Rockchip"
> >> >> +CONFIG_G_DNL_VENDOR_NUM=0x2207
> >> >> +CONFIG_G_DNL_PRODUCT_NUM=0x320a
> >> >> diff --git a/configs/tinker-rk3288_defconfig
> >> >> b/configs/tinker-rk3288_defconfig index ada5950..f863df8 100644
> >> >> --- a/configs/tinker-rk3288_defconfig
> >> >> +++ b/configs/tinker-rk3288_defconfig
> >> >> @@ -66,3 +66,9 @@ CONFIG_USB_STORAGE=y
> >> >>  CONFIG_USE_TINY_PRINTF=y
> >> >>  CONFIG_CMD_DHRYSTONE=y
> >> >>  CONFIG_ERRNO_STR=y
> >> >> +CONFIG_USB_GADGET=y
> >> >> +CONFIG_USB_GADGET_DOWNLOAD=y
> >> >> +CONFIG_USB_GADGET_VBUS_DRAW=0
> >> >> +CONFIG_G_DNL_MANUFACTURER="Rockchip"
> >> >> +CONFIG_G_DNL_VENDOR_NUM=0x2207
> >> >> +CONFIG_G_DNL_PRODUCT_NUM=0x320a
> >> >> diff --git a/include/configs/rk3288_common.h
> >> >> b/include/configs/rk3288_common.h index e7a8f72..421ba60 100644
> >> >> --- a/include/configs/rk3288_common.h
> >> >> +++ b/include/configs/rk3288_common.h
> >> >> @@ -58,11 +58,9 @@
> >> >>
> >> >>  #ifndef CONFIG_SPL_BUILD
> >> >>  /* usb otg */
> >> >> -#define CONFIG_USB_GADGET
> >> >>  #define CONFIG_USB_GADGET_DUALSPEED
> >> >>  #define CONFIG_USB_GADGET_DWC2_OTG
> >> >>  #define CONFIG_ROCKCHIP_USB2_PHY
> >> >> -#define CONFIG_USB_GADGET_VBUS_DRAW  0
> >> >>
> >> >>  /* fastboot  */
> >> >>  #define CONFIG_CMD_FASTBOOT
> >> >> @@ -76,11 +74,6 @@
> >> >>  #define CONFIG_USB_FUNCTION_MASS_STORAGE
> >> >>  #define CONFIG_CMD_USB_MASS_STORAGE
> >> >>
> >> >> -#define CONFIG_USB_GADGET_DOWNLOAD
> >> >> -#define CONFIG_G_DNL_MANUFACTURER    "Rockchip"
> >> >> -#define CONFIG_G_DNL_VENDOR_NUM              0x2207
> >> >> -#define CONFIG_G_DNL_PRODUCT_NUM     0x320a
> >> >> -
> >> >>  /* usb host support */
> >> >>  #ifdef CONFIG_CMD_USB
> >> >>  #define CONFIG_USB_DWC2
> >> >
> >> >
> >> >
> >> >
> >> > Best regards,
> >> >
> >> > Lukasz Majewski
> >> >
> >> > --
> >> >
> >> > DENX Software Engineering GmbH,      Managing Director: Wolfgang
> >> > Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194
> >> > Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax:
> >> > (+49)-8142-66989-80 Email: wd@denx.de
> >
> >
> >
> >
> > Best regards,
> >
> > Lukasz Majewski
> >
> > --
> >
> > DENX Software Engineering GmbH,      Managing Director: Wolfgang
> > Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell,
> > Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email:
> > wd@denx.de




Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
Lukasz Majewski June 21, 2017, 7:44 a.m. UTC | #11
Hi Eddie,

> Hi Eddie,
> 
> > 2017-05-31 15:12 GMT+08:00 Lukasz Majewski <lukma@denx.de>:
> > > On Wed, 31 May 2017 10:27:23 +0800
> > > Eddie Cai <eddie.cai.linux@gmail.com> wrote:
> > >
> > >> Hi Lukasz
> > >>
> > >> 2017-05-29 15:51 GMT+08:00 Lukasz Majewski <lukma@denx.de>:
> > >> > Good morning Eddie,
> > >> >
> > >> >> this patch enable rockusb support on rk3288 based device.
> > >> >>
> > >> >> Signed-off-by: Eddie Cai <eddie.cai.linux@gmail.com>
> > >> >> Reviewed-by: Simon Glass <sjg@chromium.org>
> > >> >>
> > >> >
> > >> > I've give this patch set a try on travisCI:
> > >> >
> > >> > https://travis-ci.org/lmajewski/u-boot-dfu/jobs/237068149
> > >> >
> > >> > Unfortunately, there are some problem with following boards:
> > >> >
> > >> > chromebook_jerry, chromebook_minnie ...
> > >> I did it by myself last week. i got the same error. then i fix
> > >> those chromebook error
> > >> and test again. I still got some 3036 board error. But it build
> > >> successfully when i
> > >> build it on my computer. here is the travis-ci.org error log
> > >> https://travis-ci.org/eddiecailinux/u-boot/jobs/236232837
> > >> I have no idea what can i do to fix it.
> > >
> > > Can you share the SHA1 of commit on top of which you applied your
> > > patches?
> > >
> > > I take u-boot-usb (the USB u-boot tree from Marek Vasut) as a base
> > > and then apply commits on top of it.
> > here is my branch
> > https://github.com/eddiecailinux/u-boot/tree/rockusb-v8 I apply my
> > patch on top of below commit commit
> > a63d800196ebee59b0f8ff924f67843cd597a8c1 Author: Tom Rini
> > <trini@konsulko.com> Date:   Mon May 1 19:54:41 2017 -0400
> > 
> >     Prepare v2017.05-rc3
> > 
> >     Signed-off-by: Tom Rini <trini@konsulko.com>
> 
> I've looked thoroughly at your patches:
> 
> Your patches has been applied on top of the above commit:
> SHA1: a63d800196ebee59b0f8ff924f67843cd597a8c1
> 
> Before applying your patches:
> https://travis-ci.org/lmajewski/u-boot-dfu/builds/239069544
> 
> After applying them:
> https://travis-ci.org/lmajewski/u-boot-dfu/builds/239074799
> 
> To be more precise:
> https://travis-ci.org/lmajewski/u-boot-dfu/jobs/239074800
> 
> 
> For example:
> 
>       arm:  +   rock2
> +cmd/built-in.o: In function `do_fastboot':
> +cmd/fastboot.c:28: undefined reference to `board_usb_init'
> +cmd/fastboot.c:34: undefined reference to `g_dnl_clear_detach'
> +cmd/fastboot.c:35: undefined reference to `g_dnl_register'
> +cmd/fastboot.c:39: undefined reference to
>       `g_dnl_board_usb_cable_connected' +cmd/fastboot.c:57: undefined
>       reference to `g_dnl_unregister' +cmd/fastboot.c:58: undefined
>       reference to `g_dnl_clear_detach' +cmd/fastboot.c:59: undefined
>       reference to `board_usb_cleanup' +cmd/fastboot.c:47: undefined
>       reference to `g_dnl_detach' +cmd/fastboot.c:51: undefined
>       reference to `usb_gadget_handle_interrupts' +cmd/built-in.o: In
>       function `do_usb_mass_storage':
> 
> 
> 
> For me it seems like you have enabled fastboot support on too many
> rochchip's boards.
> 
> Can you look on it?

If I might ask - have you managed to investigate this issue?

> 
> I've also updated my .travis.ml file to be in sync with mainline, so
> we will use recommended arm toolchain.
> 
> Please find this file attached.
> 
> If there are any other patches required before applying this patch
> series, please let me know (or better post them to ML).
> 
> 
> Best regards,
> Łukasz Majewski
> 
> > >
> > >> >
> > >> > caused by "undefined references to ...."
> > >> >
> > >> > I've tried your patches on top of:
> > >> > u-boot-usb/HEAD
> > >> > SHA1: 3426b2038cfb831d74ac0407fc7a04e990b44540
> > >> >
> > >> > Maybe you have built tested it on other branch/commit?
> > >> >
> > >> > Best regards,
> > >> > Łukasz Majewski
> > >> >
> > >> > p.s. My travis CI .travis.yml attached.
> > >> >
> > >> >> Changes in v7:
> > >> >> -use imply in the Kconfig to enable rockusb
> > >> >>
> > >> >> Changes in v6:
> > >> >> -enable rockusb in defconfig
> > >> >>
> > >> >> Changes in v5:
> > >> >> -none
> > >> >>
> > >> >> Changes in v4:
> > >> >> -move to rk3288_common.h
> > >> >>
> > >> >> Changes in v3:
> > >> >> -move to defconfig
> > >> >>
> > >> >> ---
> > >> >>  arch/arm/mach-rockchip/Kconfig    | 2 ++
> > >> >>  configs/evb-rk3288_defconfig      | 9 +++++++++
> > >> >>  configs/fennec-rk3288_defconfig   | 6 ++++++
> > >> >>  configs/firefly-rk3288_defconfig  | 6 ++++++
> > >> >>  configs/miqi-rk3288_defconfig     | 6 ++++++
> > >> >>  configs/popmetal-rk3288_defconfig | 6 ++++++
> > >> >>  configs/tinker-rk3288_defconfig   | 6 ++++++
> > >> >>  include/configs/rk3288_common.h   | 7 -------
> > >> >>  8 files changed, 41 insertions(+), 7 deletions(-)
> > >> >>
> > >> >> diff --git a/arch/arm/mach-rockchip/Kconfig
> > >> >> b/arch/arm/mach-rockchip/Kconfig index 2b752ad..8a87812 100644
> > >> >> --- a/arch/arm/mach-rockchip/Kconfig
> > >> >> +++ b/arch/arm/mach-rockchip/Kconfig
> > >> >> @@ -32,6 +32,8 @@ config ROCKCHIP_RK3288
> > >> >>       select CPU_V7
> > >> >>       select SUPPORT_SPL
> > >> >>       select SPL
> > >> >> +     imply USB_FUNCTION_ROCKUSB
> > >> >> +     imply CMD_ROCKUSB
> > >> >>       help
> > >> >>         The Rockchip RK3288 is a ARM-based SoC with a
> > >> >> quad-core Cortex-A17 including NEON and GPU, 1MB L2 cache,
> > >> >> Mali-T7 graphics, two diff --git
> > >> >> a/configs/evb-rk3288_defconfig b/configs/evb-rk3288_defconfig
> > >> >> index 227150d..cf66e09 100644 ---
> > >> >> a/configs/evb-rk3288_defconfig +++
> > >> >> b/configs/evb-rk3288_defconfig @@ -17,6 +17,7 @@
> > >> >> CONFIG_CMD_MMC=y CONFIG_CMD_SF=y
> > >> >>  CONFIG_CMD_SPI=y
> > >> >>  CONFIG_CMD_I2C=y
> > >> >> +CONFIG_CMD_USB=y
> > >> >>  CONFIG_CMD_GPIO=y
> > >> >>  # CONFIG_CMD_SETEXPR is not set
> > >> >>  CONFIG_CMD_CACHE=y
> > >> >> @@ -61,6 +62,14 @@ CONFIG_DEBUG_UART_CLOCK=24000000
> > >> >>  CONFIG_DEBUG_UART_SHIFT=2
> > >> >>  CONFIG_SYS_NS16550=y
> > >> >>  CONFIG_SYSRESET=y
> > >> >> +CONFIG_USB=y
> > >> >> +CONFIG_USB_STORAGE=y
> > >> >>  CONFIG_USE_TINY_PRINTF=y
> > >> >>  CONFIG_CMD_DHRYSTONE=y
> > >> >>  CONFIG_ERRNO_STR=y
> > >> >> +CONFIG_USB_GADGET=y
> > >> >> +CONFIG_USB_GADGET_DOWNLOAD=y
> > >> >> +CONFIG_USB_GADGET_VBUS_DRAW=0
> > >> >> +CONFIG_G_DNL_MANUFACTURER="Rockchip"
> > >> >> +CONFIG_G_DNL_VENDOR_NUM=0x2207
> > >> >> +CONFIG_G_DNL_PRODUCT_NUM=0x320a
> > >> >> diff --git a/configs/fennec-rk3288_defconfig
> > >> >> b/configs/fennec-rk3288_defconfig index befba18..eb33d00
> > >> >> 100644 --- a/configs/fennec-rk3288_defconfig
> > >> >> +++ b/configs/fennec-rk3288_defconfig
> > >> >> @@ -66,3 +66,9 @@ CONFIG_USB_STORAGE=y
> > >> >>  CONFIG_USE_TINY_PRINTF=y
> > >> >>  CONFIG_CMD_DHRYSTONE=y
> > >> >>  CONFIG_ERRNO_STR=y
> > >> >> +CONFIG_USB_GADGET=y
> > >> >> +CONFIG_USB_GADGET_DOWNLOAD=y
> > >> >> +CONFIG_USB_GADGET_VBUS_DRAW=0
> > >> >> +CONFIG_G_DNL_MANUFACTURER="Rockchip"
> > >> >> +CONFIG_G_DNL_VENDOR_NUM=0x2207
> > >> >> +CONFIG_G_DNL_PRODUCT_NUM=0x320a
> > >> >> diff --git a/configs/firefly-rk3288_defconfig
> > >> >> b/configs/firefly-rk3288_defconfig index f2872a6..1f4ca32
> > >> >> 100644 --- a/configs/firefly-rk3288_defconfig
> > >> >> +++ b/configs/firefly-rk3288_defconfig
> > >> >> @@ -73,3 +73,9 @@ CONFIG_CONSOLE_SCROLL_LINES=10
> > >> >>  CONFIG_USE_TINY_PRINTF=y
> > >> >>  CONFIG_CMD_DHRYSTONE=y
> > >> >>  CONFIG_ERRNO_STR=y
> > >> >> +CONFIG_USB_GADGET=y
> > >> >> +CONFIG_USB_GADGET_DOWNLOAD=y
> > >> >> +CONFIG_USB_GADGET_VBUS_DRAW=0
> > >> >> +CONFIG_G_DNL_MANUFACTURER="Rockchip"
> > >> >> +CONFIG_G_DNL_VENDOR_NUM=0x2207
> > >> >> +CONFIG_G_DNL_PRODUCT_NUM=0x320a
> > >> >> diff --git a/configs/miqi-rk3288_defconfig
> > >> >> b/configs/miqi-rk3288_defconfig index d93bd97..b8b6fd5 100644
> > >> >> --- a/configs/miqi-rk3288_defconfig
> > >> >> +++ b/configs/miqi-rk3288_defconfig
> > >> >> @@ -70,3 +70,9 @@ CONFIG_CONSOLE_SCROLL_LINES=10
> > >> >>  CONFIG_USE_TINY_PRINTF=y
> > >> >>  CONFIG_CMD_DHRYSTONE=y
> > >> >>  CONFIG_ERRNO_STR=y
> > >> >> +CONFIG_USB_GADGET=y
> > >> >> +CONFIG_USB_GADGET_DOWNLOAD=y
> > >> >> +CONFIG_USB_GADGET_VBUS_DRAW=0
> > >> >> +CONFIG_G_DNL_MANUFACTURER="Rockchip"
> > >> >> +CONFIG_G_DNL_VENDOR_NUM=0x2207
> > >> >> +CONFIG_G_DNL_PRODUCT_NUM=0x320a
> > >> >> diff --git a/configs/popmetal-rk3288_defconfig
> > >> >> b/configs/popmetal-rk3288_defconfig index 748cda4..1181a20
> > >> >> 100644 --- a/configs/popmetal-rk3288_defconfig
> > >> >> +++ b/configs/popmetal-rk3288_defconfig
> > >> >> @@ -66,3 +66,9 @@ CONFIG_USB_STORAGE=y
> > >> >>  CONFIG_USE_TINY_PRINTF=y
> > >> >>  CONFIG_CMD_DHRYSTONE=y
> > >> >>  CONFIG_ERRNO_STR=y
> > >> >> +CONFIG_USB_GADGET=y
> > >> >> +CONFIG_USB_GADGET_DOWNLOAD=y
> > >> >> +CONFIG_USB_GADGET_VBUS_DRAW=0
> > >> >> +CONFIG_G_DNL_MANUFACTURER="Rockchip"
> > >> >> +CONFIG_G_DNL_VENDOR_NUM=0x2207
> > >> >> +CONFIG_G_DNL_PRODUCT_NUM=0x320a
> > >> >> diff --git a/configs/tinker-rk3288_defconfig
> > >> >> b/configs/tinker-rk3288_defconfig index ada5950..f863df8
> > >> >> 100644 --- a/configs/tinker-rk3288_defconfig
> > >> >> +++ b/configs/tinker-rk3288_defconfig
> > >> >> @@ -66,3 +66,9 @@ CONFIG_USB_STORAGE=y
> > >> >>  CONFIG_USE_TINY_PRINTF=y
> > >> >>  CONFIG_CMD_DHRYSTONE=y
> > >> >>  CONFIG_ERRNO_STR=y
> > >> >> +CONFIG_USB_GADGET=y
> > >> >> +CONFIG_USB_GADGET_DOWNLOAD=y
> > >> >> +CONFIG_USB_GADGET_VBUS_DRAW=0
> > >> >> +CONFIG_G_DNL_MANUFACTURER="Rockchip"
> > >> >> +CONFIG_G_DNL_VENDOR_NUM=0x2207
> > >> >> +CONFIG_G_DNL_PRODUCT_NUM=0x320a
> > >> >> diff --git a/include/configs/rk3288_common.h
> > >> >> b/include/configs/rk3288_common.h index e7a8f72..421ba60
> > >> >> 100644 --- a/include/configs/rk3288_common.h
> > >> >> +++ b/include/configs/rk3288_common.h
> > >> >> @@ -58,11 +58,9 @@
> > >> >>
> > >> >>  #ifndef CONFIG_SPL_BUILD
> > >> >>  /* usb otg */
> > >> >> -#define CONFIG_USB_GADGET
> > >> >>  #define CONFIG_USB_GADGET_DUALSPEED
> > >> >>  #define CONFIG_USB_GADGET_DWC2_OTG
> > >> >>  #define CONFIG_ROCKCHIP_USB2_PHY
> > >> >> -#define CONFIG_USB_GADGET_VBUS_DRAW  0
> > >> >>
> > >> >>  /* fastboot  */
> > >> >>  #define CONFIG_CMD_FASTBOOT
> > >> >> @@ -76,11 +74,6 @@
> > >> >>  #define CONFIG_USB_FUNCTION_MASS_STORAGE
> > >> >>  #define CONFIG_CMD_USB_MASS_STORAGE
> > >> >>
> > >> >> -#define CONFIG_USB_GADGET_DOWNLOAD
> > >> >> -#define CONFIG_G_DNL_MANUFACTURER    "Rockchip"
> > >> >> -#define CONFIG_G_DNL_VENDOR_NUM              0x2207
> > >> >> -#define CONFIG_G_DNL_PRODUCT_NUM     0x320a
> > >> >> -
> > >> >>  /* usb host support */
> > >> >>  #ifdef CONFIG_CMD_USB
> > >> >>  #define CONFIG_USB_DWC2
> > >> >
> > >> >
> > >> >
> > >> >
> > >> > Best regards,
> > >> >
> > >> > Lukasz Majewski
> > >> >
> > >> > --
> > >> >
> > >> > DENX Software Engineering GmbH,      Managing Director:
> > >> > Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194
> > >> > Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax:
> > >> > (+49)-8142-66989-80 Email: wd@denx.de
> > >
> > >
> > >
> > >
> > > Best regards,
> > >
> > > Lukasz Majewski
> > >
> > > --
> > >
> > > DENX Software Engineering GmbH,      Managing Director: Wolfgang
> > > Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell,
> > > Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email:
> > > wd@denx.de
> 
> 
> 
> 
> Best regards,
> 
> Lukasz Majewski
> 
> --
> 
> DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de




Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
Eddie Cai June 28, 2017, 7:33 a.m. UTC | #12
Hi Lukasz

2017-06-21 15:44 GMT+08:00 Lukasz Majewski <lukma@denx.de>:
> Hi Eddie,
>
>> Hi Eddie,
>>
>> > 2017-05-31 15:12 GMT+08:00 Lukasz Majewski <lukma@denx.de>:
>> > > On Wed, 31 May 2017 10:27:23 +0800
>> > > Eddie Cai <eddie.cai.linux@gmail.com> wrote:
>> > >
>> > >> Hi Lukasz
>> > >>
>> > >> 2017-05-29 15:51 GMT+08:00 Lukasz Majewski <lukma@denx.de>:
>> > >> > Good morning Eddie,
>> > >> >
>> > >> >> this patch enable rockusb support on rk3288 based device.
>> > >> >>
>> > >> >> Signed-off-by: Eddie Cai <eddie.cai.linux@gmail.com>
>> > >> >> Reviewed-by: Simon Glass <sjg@chromium.org>
>> > >> >>
>> > >> >
>> > >> > I've give this patch set a try on travisCI:
>> > >> >
>> > >> > https://travis-ci.org/lmajewski/u-boot-dfu/jobs/237068149
>> > >> >
>> > >> > Unfortunately, there are some problem with following boards:
>> > >> >
>> > >> > chromebook_jerry, chromebook_minnie ...
>> > >> I did it by myself last week. i got the same error. then i fix
>> > >> those chromebook error
>> > >> and test again. I still got some 3036 board error. But it build
>> > >> successfully when i
>> > >> build it on my computer. here is the travis-ci.org error log
>> > >> https://travis-ci.org/eddiecailinux/u-boot/jobs/236232837
>> > >> I have no idea what can i do to fix it.
>> > >
>> > > Can you share the SHA1 of commit on top of which you applied your
>> > > patches?
>> > >
>> > > I take u-boot-usb (the USB u-boot tree from Marek Vasut) as a base
>> > > and then apply commits on top of it.
>> > here is my branch
>> > https://github.com/eddiecailinux/u-boot/tree/rockusb-v8 I apply my
>> > patch on top of below commit commit
>> > a63d800196ebee59b0f8ff924f67843cd597a8c1 Author: Tom Rini
>> > <trini@konsulko.com> Date:   Mon May 1 19:54:41 2017 -0400
>> >
>> >     Prepare v2017.05-rc3
>> >
>> >     Signed-off-by: Tom Rini <trini@konsulko.com>
>>
>> I've looked thoroughly at your patches:
>>
>> Your patches has been applied on top of the above commit:
>> SHA1: a63d800196ebee59b0f8ff924f67843cd597a8c1
>>
>> Before applying your patches:
>> https://travis-ci.org/lmajewski/u-boot-dfu/builds/239069544
>>
>> After applying them:
>> https://travis-ci.org/lmajewski/u-boot-dfu/builds/239074799
>>
>> To be more precise:
>> https://travis-ci.org/lmajewski/u-boot-dfu/jobs/239074800
>>
>>
>> For example:
>>
>>       arm:  +   rock2
>> +cmd/built-in.o: In function `do_fastboot':
>> +cmd/fastboot.c:28: undefined reference to `board_usb_init'
>> +cmd/fastboot.c:34: undefined reference to `g_dnl_clear_detach'
>> +cmd/fastboot.c:35: undefined reference to `g_dnl_register'
>> +cmd/fastboot.c:39: undefined reference to
>>       `g_dnl_board_usb_cable_connected' +cmd/fastboot.c:57: undefined
>>       reference to `g_dnl_unregister' +cmd/fastboot.c:58: undefined
>>       reference to `g_dnl_clear_detach' +cmd/fastboot.c:59: undefined
>>       reference to `board_usb_cleanup' +cmd/fastboot.c:47: undefined
>>       reference to `g_dnl_detach' +cmd/fastboot.c:51: undefined
>>       reference to `usb_gadget_handle_interrupts' +cmd/built-in.o: In
>>       function `do_usb_mass_storage':
>>
>>
>>
>> For me it seems like you have enabled fastboot support on too many
>> rochchip's boards.
>>
>> Can you look on it?
>
> If I might ask - have you managed to investigate this issue?
I can fix the chromebook error. But i didn't enable rockusb support on
rk3036 based board. I built these board on my desktop. It work fine.
>
>>
>> I've also updated my .travis.ml file to be in sync with mainline, so
>> we will use recommended arm toolchain.
>>
>> Please find this file attached.
>>
>> If there are any other patches required before applying this patch
>> series, please let me know (or better post them to ML).
>>
>>
>> Best regards,
>> Łukasz Majewski
>>
>> > >
>> > >> >
>> > >> > caused by "undefined references to ...."
>> > >> >
>> > >> > I've tried your patches on top of:
>> > >> > u-boot-usb/HEAD
>> > >> > SHA1: 3426b2038cfb831d74ac0407fc7a04e990b44540
>> > >> >
>> > >> > Maybe you have built tested it on other branch/commit?
>> > >> >
>> > >> > Best regards,
>> > >> > Łukasz Majewski
>> > >> >
>> > >> > p.s. My travis CI .travis.yml attached.
>> > >> >
>> > >> >> Changes in v7:
>> > >> >> -use imply in the Kconfig to enable rockusb
>> > >> >>
>> > >> >> Changes in v6:
>> > >> >> -enable rockusb in defconfig
>> > >> >>
>> > >> >> Changes in v5:
>> > >> >> -none
>> > >> >>
>> > >> >> Changes in v4:
>> > >> >> -move to rk3288_common.h
>> > >> >>
>> > >> >> Changes in v3:
>> > >> >> -move to defconfig
>> > >> >>
>> > >> >> ---
>> > >> >>  arch/arm/mach-rockchip/Kconfig    | 2 ++
>> > >> >>  configs/evb-rk3288_defconfig      | 9 +++++++++
>> > >> >>  configs/fennec-rk3288_defconfig   | 6 ++++++
>> > >> >>  configs/firefly-rk3288_defconfig  | 6 ++++++
>> > >> >>  configs/miqi-rk3288_defconfig     | 6 ++++++
>> > >> >>  configs/popmetal-rk3288_defconfig | 6 ++++++
>> > >> >>  configs/tinker-rk3288_defconfig   | 6 ++++++
>> > >> >>  include/configs/rk3288_common.h   | 7 -------
>> > >> >>  8 files changed, 41 insertions(+), 7 deletions(-)
>> > >> >>
>> > >> >> diff --git a/arch/arm/mach-rockchip/Kconfig
>> > >> >> b/arch/arm/mach-rockchip/Kconfig index 2b752ad..8a87812 100644
>> > >> >> --- a/arch/arm/mach-rockchip/Kconfig
>> > >> >> +++ b/arch/arm/mach-rockchip/Kconfig
>> > >> >> @@ -32,6 +32,8 @@ config ROCKCHIP_RK3288
>> > >> >>       select CPU_V7
>> > >> >>       select SUPPORT_SPL
>> > >> >>       select SPL
>> > >> >> +     imply USB_FUNCTION_ROCKUSB
>> > >> >> +     imply CMD_ROCKUSB
>> > >> >>       help
>> > >> >>         The Rockchip RK3288 is a ARM-based SoC with a
>> > >> >> quad-core Cortex-A17 including NEON and GPU, 1MB L2 cache,
>> > >> >> Mali-T7 graphics, two diff --git
>> > >> >> a/configs/evb-rk3288_defconfig b/configs/evb-rk3288_defconfig
>> > >> >> index 227150d..cf66e09 100644 ---
>> > >> >> a/configs/evb-rk3288_defconfig +++
>> > >> >> b/configs/evb-rk3288_defconfig @@ -17,6 +17,7 @@
>> > >> >> CONFIG_CMD_MMC=y CONFIG_CMD_SF=y
>> > >> >>  CONFIG_CMD_SPI=y
>> > >> >>  CONFIG_CMD_I2C=y
>> > >> >> +CONFIG_CMD_USB=y
>> > >> >>  CONFIG_CMD_GPIO=y
>> > >> >>  # CONFIG_CMD_SETEXPR is not set
>> > >> >>  CONFIG_CMD_CACHE=y
>> > >> >> @@ -61,6 +62,14 @@ CONFIG_DEBUG_UART_CLOCK=24000000
>> > >> >>  CONFIG_DEBUG_UART_SHIFT=2
>> > >> >>  CONFIG_SYS_NS16550=y
>> > >> >>  CONFIG_SYSRESET=y
>> > >> >> +CONFIG_USB=y
>> > >> >> +CONFIG_USB_STORAGE=y
>> > >> >>  CONFIG_USE_TINY_PRINTF=y
>> > >> >>  CONFIG_CMD_DHRYSTONE=y
>> > >> >>  CONFIG_ERRNO_STR=y
>> > >> >> +CONFIG_USB_GADGET=y
>> > >> >> +CONFIG_USB_GADGET_DOWNLOAD=y
>> > >> >> +CONFIG_USB_GADGET_VBUS_DRAW=0
>> > >> >> +CONFIG_G_DNL_MANUFACTURER="Rockchip"
>> > >> >> +CONFIG_G_DNL_VENDOR_NUM=0x2207
>> > >> >> +CONFIG_G_DNL_PRODUCT_NUM=0x320a
>> > >> >> diff --git a/configs/fennec-rk3288_defconfig
>> > >> >> b/configs/fennec-rk3288_defconfig index befba18..eb33d00
>> > >> >> 100644 --- a/configs/fennec-rk3288_defconfig
>> > >> >> +++ b/configs/fennec-rk3288_defconfig
>> > >> >> @@ -66,3 +66,9 @@ CONFIG_USB_STORAGE=y
>> > >> >>  CONFIG_USE_TINY_PRINTF=y
>> > >> >>  CONFIG_CMD_DHRYSTONE=y
>> > >> >>  CONFIG_ERRNO_STR=y
>> > >> >> +CONFIG_USB_GADGET=y
>> > >> >> +CONFIG_USB_GADGET_DOWNLOAD=y
>> > >> >> +CONFIG_USB_GADGET_VBUS_DRAW=0
>> > >> >> +CONFIG_G_DNL_MANUFACTURER="Rockchip"
>> > >> >> +CONFIG_G_DNL_VENDOR_NUM=0x2207
>> > >> >> +CONFIG_G_DNL_PRODUCT_NUM=0x320a
>> > >> >> diff --git a/configs/firefly-rk3288_defconfig
>> > >> >> b/configs/firefly-rk3288_defconfig index f2872a6..1f4ca32
>> > >> >> 100644 --- a/configs/firefly-rk3288_defconfig
>> > >> >> +++ b/configs/firefly-rk3288_defconfig
>> > >> >> @@ -73,3 +73,9 @@ CONFIG_CONSOLE_SCROLL_LINES=10
>> > >> >>  CONFIG_USE_TINY_PRINTF=y
>> > >> >>  CONFIG_CMD_DHRYSTONE=y
>> > >> >>  CONFIG_ERRNO_STR=y
>> > >> >> +CONFIG_USB_GADGET=y
>> > >> >> +CONFIG_USB_GADGET_DOWNLOAD=y
>> > >> >> +CONFIG_USB_GADGET_VBUS_DRAW=0
>> > >> >> +CONFIG_G_DNL_MANUFACTURER="Rockchip"
>> > >> >> +CONFIG_G_DNL_VENDOR_NUM=0x2207
>> > >> >> +CONFIG_G_DNL_PRODUCT_NUM=0x320a
>> > >> >> diff --git a/configs/miqi-rk3288_defconfig
>> > >> >> b/configs/miqi-rk3288_defconfig index d93bd97..b8b6fd5 100644
>> > >> >> --- a/configs/miqi-rk3288_defconfig
>> > >> >> +++ b/configs/miqi-rk3288_defconfig
>> > >> >> @@ -70,3 +70,9 @@ CONFIG_CONSOLE_SCROLL_LINES=10
>> > >> >>  CONFIG_USE_TINY_PRINTF=y
>> > >> >>  CONFIG_CMD_DHRYSTONE=y
>> > >> >>  CONFIG_ERRNO_STR=y
>> > >> >> +CONFIG_USB_GADGET=y
>> > >> >> +CONFIG_USB_GADGET_DOWNLOAD=y
>> > >> >> +CONFIG_USB_GADGET_VBUS_DRAW=0
>> > >> >> +CONFIG_G_DNL_MANUFACTURER="Rockchip"
>> > >> >> +CONFIG_G_DNL_VENDOR_NUM=0x2207
>> > >> >> +CONFIG_G_DNL_PRODUCT_NUM=0x320a
>> > >> >> diff --git a/configs/popmetal-rk3288_defconfig
>> > >> >> b/configs/popmetal-rk3288_defconfig index 748cda4..1181a20
>> > >> >> 100644 --- a/configs/popmetal-rk3288_defconfig
>> > >> >> +++ b/configs/popmetal-rk3288_defconfig
>> > >> >> @@ -66,3 +66,9 @@ CONFIG_USB_STORAGE=y
>> > >> >>  CONFIG_USE_TINY_PRINTF=y
>> > >> >>  CONFIG_CMD_DHRYSTONE=y
>> > >> >>  CONFIG_ERRNO_STR=y
>> > >> >> +CONFIG_USB_GADGET=y
>> > >> >> +CONFIG_USB_GADGET_DOWNLOAD=y
>> > >> >> +CONFIG_USB_GADGET_VBUS_DRAW=0
>> > >> >> +CONFIG_G_DNL_MANUFACTURER="Rockchip"
>> > >> >> +CONFIG_G_DNL_VENDOR_NUM=0x2207
>> > >> >> +CONFIG_G_DNL_PRODUCT_NUM=0x320a
>> > >> >> diff --git a/configs/tinker-rk3288_defconfig
>> > >> >> b/configs/tinker-rk3288_defconfig index ada5950..f863df8
>> > >> >> 100644 --- a/configs/tinker-rk3288_defconfig
>> > >> >> +++ b/configs/tinker-rk3288_defconfig
>> > >> >> @@ -66,3 +66,9 @@ CONFIG_USB_STORAGE=y
>> > >> >>  CONFIG_USE_TINY_PRINTF=y
>> > >> >>  CONFIG_CMD_DHRYSTONE=y
>> > >> >>  CONFIG_ERRNO_STR=y
>> > >> >> +CONFIG_USB_GADGET=y
>> > >> >> +CONFIG_USB_GADGET_DOWNLOAD=y
>> > >> >> +CONFIG_USB_GADGET_VBUS_DRAW=0
>> > >> >> +CONFIG_G_DNL_MANUFACTURER="Rockchip"
>> > >> >> +CONFIG_G_DNL_VENDOR_NUM=0x2207
>> > >> >> +CONFIG_G_DNL_PRODUCT_NUM=0x320a
>> > >> >> diff --git a/include/configs/rk3288_common.h
>> > >> >> b/include/configs/rk3288_common.h index e7a8f72..421ba60
>> > >> >> 100644 --- a/include/configs/rk3288_common.h
>> > >> >> +++ b/include/configs/rk3288_common.h
>> > >> >> @@ -58,11 +58,9 @@
>> > >> >>
>> > >> >>  #ifndef CONFIG_SPL_BUILD
>> > >> >>  /* usb otg */
>> > >> >> -#define CONFIG_USB_GADGET
>> > >> >>  #define CONFIG_USB_GADGET_DUALSPEED
>> > >> >>  #define CONFIG_USB_GADGET_DWC2_OTG
>> > >> >>  #define CONFIG_ROCKCHIP_USB2_PHY
>> > >> >> -#define CONFIG_USB_GADGET_VBUS_DRAW  0
>> > >> >>
>> > >> >>  /* fastboot  */
>> > >> >>  #define CONFIG_CMD_FASTBOOT
>> > >> >> @@ -76,11 +74,6 @@
>> > >> >>  #define CONFIG_USB_FUNCTION_MASS_STORAGE
>> > >> >>  #define CONFIG_CMD_USB_MASS_STORAGE
>> > >> >>
>> > >> >> -#define CONFIG_USB_GADGET_DOWNLOAD
>> > >> >> -#define CONFIG_G_DNL_MANUFACTURER    "Rockchip"
>> > >> >> -#define CONFIG_G_DNL_VENDOR_NUM              0x2207
>> > >> >> -#define CONFIG_G_DNL_PRODUCT_NUM     0x320a
>> > >> >> -
>> > >> >>  /* usb host support */
>> > >> >>  #ifdef CONFIG_CMD_USB
>> > >> >>  #define CONFIG_USB_DWC2
>> > >> >
>> > >> >
>> > >> >
>> > >> >
>> > >> > Best regards,
>> > >> >
>> > >> > Lukasz Majewski
>> > >> >
>> > >> > --
>> > >> >
>> > >> > DENX Software Engineering GmbH,      Managing Director:
>> > >> > Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194
>> > >> > Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax:
>> > >> > (+49)-8142-66989-80 Email: wd@denx.de
>> > >
>> > >
>> > >
>> > >
>> > > Best regards,
>> > >
>> > > Lukasz Majewski
>> > >
>> > > --
>> > >
>> > > DENX Software Engineering GmbH,      Managing Director: Wolfgang
>> > > Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell,
>> > > Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email:
>> > > wd@denx.de
>>
>>
>>
>>
>> Best regards,
>>
>> Lukasz Majewski
>>
>> --
>>
>> DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
>> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
>> Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
>
>
>
>
> Best regards,
>
> Lukasz Majewski
>
> --
>
> DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
Lukasz Majewski June 28, 2017, 7:55 a.m. UTC | #13
Hi Eddie,

> Hi Lukasz
> 
> 2017-06-21 15:44 GMT+08:00 Lukasz Majewski <lukma@denx.de>:
> > Hi Eddie,
> >
> >> Hi Eddie,
> >>
> >> > 2017-05-31 15:12 GMT+08:00 Lukasz Majewski <lukma@denx.de>:
> >> > > On Wed, 31 May 2017 10:27:23 +0800
> >> > > Eddie Cai <eddie.cai.linux@gmail.com> wrote:
> >> > >
> >> > >> Hi Lukasz
> >> > >>
> >> > >> 2017-05-29 15:51 GMT+08:00 Lukasz Majewski <lukma@denx.de>:
> >> > >> > Good morning Eddie,
> >> > >> >
> >> > >> >> this patch enable rockusb support on rk3288 based device.
> >> > >> >>
> >> > >> >> Signed-off-by: Eddie Cai <eddie.cai.linux@gmail.com>
> >> > >> >> Reviewed-by: Simon Glass <sjg@chromium.org>
> >> > >> >>
> >> > >> >
> >> > >> > I've give this patch set a try on travisCI:
> >> > >> >
> >> > >> > https://travis-ci.org/lmajewski/u-boot-dfu/jobs/237068149
> >> > >> >
> >> > >> > Unfortunately, there are some problem with following boards:
> >> > >> >
> >> > >> > chromebook_jerry, chromebook_minnie ...
> >> > >> I did it by myself last week. i got the same error. then i fix
> >> > >> those chromebook error
> >> > >> and test again. I still got some 3036 board error. But it
> >> > >> build successfully when i
> >> > >> build it on my computer. here is the travis-ci.org error log
> >> > >> https://travis-ci.org/eddiecailinux/u-boot/jobs/236232837
> >> > >> I have no idea what can i do to fix it.
> >> > >
> >> > > Can you share the SHA1 of commit on top of which you applied
> >> > > your patches?
> >> > >
> >> > > I take u-boot-usb (the USB u-boot tree from Marek Vasut) as a
> >> > > base and then apply commits on top of it.
> >> > here is my branch
> >> > https://github.com/eddiecailinux/u-boot/tree/rockusb-v8 I apply
> >> > my patch on top of below commit commit
> >> > a63d800196ebee59b0f8ff924f67843cd597a8c1 Author: Tom Rini
> >> > <trini@konsulko.com> Date:   Mon May 1 19:54:41 2017 -0400
> >> >
> >> >     Prepare v2017.05-rc3
> >> >
> >> >     Signed-off-by: Tom Rini <trini@konsulko.com>
> >>
> >> I've looked thoroughly at your patches:
> >>
> >> Your patches has been applied on top of the above commit:
> >> SHA1: a63d800196ebee59b0f8ff924f67843cd597a8c1
> >>
> >> Before applying your patches:
> >> https://travis-ci.org/lmajewski/u-boot-dfu/builds/239069544
> >>
> >> After applying them:
> >> https://travis-ci.org/lmajewski/u-boot-dfu/builds/239074799
> >>
> >> To be more precise:
> >> https://travis-ci.org/lmajewski/u-boot-dfu/jobs/239074800
> >>
> >>
> >> For example:
> >>
> >>       arm:  +   rock2
> >> +cmd/built-in.o: In function `do_fastboot':
> >> +cmd/fastboot.c:28: undefined reference to `board_usb_init'
> >> +cmd/fastboot.c:34: undefined reference to `g_dnl_clear_detach'
> >> +cmd/fastboot.c:35: undefined reference to `g_dnl_register'
> >> +cmd/fastboot.c:39: undefined reference to
> >>       `g_dnl_board_usb_cable_connected' +cmd/fastboot.c:57:
> >> undefined reference to `g_dnl_unregister' +cmd/fastboot.c:58:
> >> undefined reference to `g_dnl_clear_detach' +cmd/fastboot.c:59:
> >> undefined reference to `board_usb_cleanup' +cmd/fastboot.c:47:
> >> undefined reference to `g_dnl_detach' +cmd/fastboot.c:51: undefined
> >>       reference to `usb_gadget_handle_interrupts' +cmd/built-in.o:
> >> In function `do_usb_mass_storage':
> >>
> >>
> >>
> >> For me it seems like you have enabled fastboot support on too many
> >> rochchip's boards.
> >>
> >> Can you look on it?
> >
> > If I might ask - have you managed to investigate this issue?
> I can fix the chromebook error.

Ok.

> But i didn't enable rockusb support on
> rk3036 based board. I built these board on my desktop. It work fine.

The issue is not with this one particular board.

I'm concerned, since your patch set causes build errors for other
boards.

Can you build test (with travis-CI) your patches and check if you can
reproduce those errors?

Best regards,
Łukasz

> >
> >>
> >> I've also updated my .travis.ml file to be in sync with mainline,
> >> so we will use recommended arm toolchain.
> >>
> >> Please find this file attached.
> >>
> >> If there are any other patches required before applying this patch
> >> series, please let me know (or better post them to ML).
> >>
> >>
> >> Best regards,
> >> Łukasz Majewski
> >>
> >> > >
> >> > >> >
> >> > >> > caused by "undefined references to ...."
> >> > >> >
> >> > >> > I've tried your patches on top of:
> >> > >> > u-boot-usb/HEAD
> >> > >> > SHA1: 3426b2038cfb831d74ac0407fc7a04e990b44540
> >> > >> >
> >> > >> > Maybe you have built tested it on other branch/commit?
> >> > >> >
> >> > >> > Best regards,
> >> > >> > Łukasz Majewski
> >> > >> >
> >> > >> > p.s. My travis CI .travis.yml attached.
> >> > >> >
> >> > >> >> Changes in v7:
> >> > >> >> -use imply in the Kconfig to enable rockusb
> >> > >> >>
> >> > >> >> Changes in v6:
> >> > >> >> -enable rockusb in defconfig
> >> > >> >>
> >> > >> >> Changes in v5:
> >> > >> >> -none
> >> > >> >>
> >> > >> >> Changes in v4:
> >> > >> >> -move to rk3288_common.h
> >> > >> >>
> >> > >> >> Changes in v3:
> >> > >> >> -move to defconfig
> >> > >> >>
> >> > >> >> ---
> >> > >> >>  arch/arm/mach-rockchip/Kconfig    | 2 ++
> >> > >> >>  configs/evb-rk3288_defconfig      | 9 +++++++++
> >> > >> >>  configs/fennec-rk3288_defconfig   | 6 ++++++
> >> > >> >>  configs/firefly-rk3288_defconfig  | 6 ++++++
> >> > >> >>  configs/miqi-rk3288_defconfig     | 6 ++++++
> >> > >> >>  configs/popmetal-rk3288_defconfig | 6 ++++++
> >> > >> >>  configs/tinker-rk3288_defconfig   | 6 ++++++
> >> > >> >>  include/configs/rk3288_common.h   | 7 -------
> >> > >> >>  8 files changed, 41 insertions(+), 7 deletions(-)
> >> > >> >>
> >> > >> >> diff --git a/arch/arm/mach-rockchip/Kconfig
> >> > >> >> b/arch/arm/mach-rockchip/Kconfig index 2b752ad..8a87812
> >> > >> >> 100644 --- a/arch/arm/mach-rockchip/Kconfig
> >> > >> >> +++ b/arch/arm/mach-rockchip/Kconfig
> >> > >> >> @@ -32,6 +32,8 @@ config ROCKCHIP_RK3288
> >> > >> >>       select CPU_V7
> >> > >> >>       select SUPPORT_SPL
> >> > >> >>       select SPL
> >> > >> >> +     imply USB_FUNCTION_ROCKUSB
> >> > >> >> +     imply CMD_ROCKUSB
> >> > >> >>       help
> >> > >> >>         The Rockchip RK3288 is a ARM-based SoC with a
> >> > >> >> quad-core Cortex-A17 including NEON and GPU, 1MB L2 cache,
> >> > >> >> Mali-T7 graphics, two diff --git
> >> > >> >> a/configs/evb-rk3288_defconfig
> >> > >> >> b/configs/evb-rk3288_defconfig index 227150d..cf66e09
> >> > >> >> 100644 --- a/configs/evb-rk3288_defconfig +++
> >> > >> >> b/configs/evb-rk3288_defconfig @@ -17,6 +17,7 @@
> >> > >> >> CONFIG_CMD_MMC=y CONFIG_CMD_SF=y
> >> > >> >>  CONFIG_CMD_SPI=y
> >> > >> >>  CONFIG_CMD_I2C=y
> >> > >> >> +CONFIG_CMD_USB=y
> >> > >> >>  CONFIG_CMD_GPIO=y
> >> > >> >>  # CONFIG_CMD_SETEXPR is not set
> >> > >> >>  CONFIG_CMD_CACHE=y
> >> > >> >> @@ -61,6 +62,14 @@ CONFIG_DEBUG_UART_CLOCK=24000000
> >> > >> >>  CONFIG_DEBUG_UART_SHIFT=2
> >> > >> >>  CONFIG_SYS_NS16550=y
> >> > >> >>  CONFIG_SYSRESET=y
> >> > >> >> +CONFIG_USB=y
> >> > >> >> +CONFIG_USB_STORAGE=y
> >> > >> >>  CONFIG_USE_TINY_PRINTF=y
> >> > >> >>  CONFIG_CMD_DHRYSTONE=y
> >> > >> >>  CONFIG_ERRNO_STR=y
> >> > >> >> +CONFIG_USB_GADGET=y
> >> > >> >> +CONFIG_USB_GADGET_DOWNLOAD=y
> >> > >> >> +CONFIG_USB_GADGET_VBUS_DRAW=0
> >> > >> >> +CONFIG_G_DNL_MANUFACTURER="Rockchip"
> >> > >> >> +CONFIG_G_DNL_VENDOR_NUM=0x2207
> >> > >> >> +CONFIG_G_DNL_PRODUCT_NUM=0x320a
> >> > >> >> diff --git a/configs/fennec-rk3288_defconfig
> >> > >> >> b/configs/fennec-rk3288_defconfig index befba18..eb33d00
> >> > >> >> 100644 --- a/configs/fennec-rk3288_defconfig
> >> > >> >> +++ b/configs/fennec-rk3288_defconfig
> >> > >> >> @@ -66,3 +66,9 @@ CONFIG_USB_STORAGE=y
> >> > >> >>  CONFIG_USE_TINY_PRINTF=y
> >> > >> >>  CONFIG_CMD_DHRYSTONE=y
> >> > >> >>  CONFIG_ERRNO_STR=y
> >> > >> >> +CONFIG_USB_GADGET=y
> >> > >> >> +CONFIG_USB_GADGET_DOWNLOAD=y
> >> > >> >> +CONFIG_USB_GADGET_VBUS_DRAW=0
> >> > >> >> +CONFIG_G_DNL_MANUFACTURER="Rockchip"
> >> > >> >> +CONFIG_G_DNL_VENDOR_NUM=0x2207
> >> > >> >> +CONFIG_G_DNL_PRODUCT_NUM=0x320a
> >> > >> >> diff --git a/configs/firefly-rk3288_defconfig
> >> > >> >> b/configs/firefly-rk3288_defconfig index f2872a6..1f4ca32
> >> > >> >> 100644 --- a/configs/firefly-rk3288_defconfig
> >> > >> >> +++ b/configs/firefly-rk3288_defconfig
> >> > >> >> @@ -73,3 +73,9 @@ CONFIG_CONSOLE_SCROLL_LINES=10
> >> > >> >>  CONFIG_USE_TINY_PRINTF=y
> >> > >> >>  CONFIG_CMD_DHRYSTONE=y
> >> > >> >>  CONFIG_ERRNO_STR=y
> >> > >> >> +CONFIG_USB_GADGET=y
> >> > >> >> +CONFIG_USB_GADGET_DOWNLOAD=y
> >> > >> >> +CONFIG_USB_GADGET_VBUS_DRAW=0
> >> > >> >> +CONFIG_G_DNL_MANUFACTURER="Rockchip"
> >> > >> >> +CONFIG_G_DNL_VENDOR_NUM=0x2207
> >> > >> >> +CONFIG_G_DNL_PRODUCT_NUM=0x320a
> >> > >> >> diff --git a/configs/miqi-rk3288_defconfig
> >> > >> >> b/configs/miqi-rk3288_defconfig index d93bd97..b8b6fd5
> >> > >> >> 100644 --- a/configs/miqi-rk3288_defconfig
> >> > >> >> +++ b/configs/miqi-rk3288_defconfig
> >> > >> >> @@ -70,3 +70,9 @@ CONFIG_CONSOLE_SCROLL_LINES=10
> >> > >> >>  CONFIG_USE_TINY_PRINTF=y
> >> > >> >>  CONFIG_CMD_DHRYSTONE=y
> >> > >> >>  CONFIG_ERRNO_STR=y
> >> > >> >> +CONFIG_USB_GADGET=y
> >> > >> >> +CONFIG_USB_GADGET_DOWNLOAD=y
> >> > >> >> +CONFIG_USB_GADGET_VBUS_DRAW=0
> >> > >> >> +CONFIG_G_DNL_MANUFACTURER="Rockchip"
> >> > >> >> +CONFIG_G_DNL_VENDOR_NUM=0x2207
> >> > >> >> +CONFIG_G_DNL_PRODUCT_NUM=0x320a
> >> > >> >> diff --git a/configs/popmetal-rk3288_defconfig
> >> > >> >> b/configs/popmetal-rk3288_defconfig index 748cda4..1181a20
> >> > >> >> 100644 --- a/configs/popmetal-rk3288_defconfig
> >> > >> >> +++ b/configs/popmetal-rk3288_defconfig
> >> > >> >> @@ -66,3 +66,9 @@ CONFIG_USB_STORAGE=y
> >> > >> >>  CONFIG_USE_TINY_PRINTF=y
> >> > >> >>  CONFIG_CMD_DHRYSTONE=y
> >> > >> >>  CONFIG_ERRNO_STR=y
> >> > >> >> +CONFIG_USB_GADGET=y
> >> > >> >> +CONFIG_USB_GADGET_DOWNLOAD=y
> >> > >> >> +CONFIG_USB_GADGET_VBUS_DRAW=0
> >> > >> >> +CONFIG_G_DNL_MANUFACTURER="Rockchip"
> >> > >> >> +CONFIG_G_DNL_VENDOR_NUM=0x2207
> >> > >> >> +CONFIG_G_DNL_PRODUCT_NUM=0x320a
> >> > >> >> diff --git a/configs/tinker-rk3288_defconfig
> >> > >> >> b/configs/tinker-rk3288_defconfig index ada5950..f863df8
> >> > >> >> 100644 --- a/configs/tinker-rk3288_defconfig
> >> > >> >> +++ b/configs/tinker-rk3288_defconfig
> >> > >> >> @@ -66,3 +66,9 @@ CONFIG_USB_STORAGE=y
> >> > >> >>  CONFIG_USE_TINY_PRINTF=y
> >> > >> >>  CONFIG_CMD_DHRYSTONE=y
> >> > >> >>  CONFIG_ERRNO_STR=y
> >> > >> >> +CONFIG_USB_GADGET=y
> >> > >> >> +CONFIG_USB_GADGET_DOWNLOAD=y
> >> > >> >> +CONFIG_USB_GADGET_VBUS_DRAW=0
> >> > >> >> +CONFIG_G_DNL_MANUFACTURER="Rockchip"
> >> > >> >> +CONFIG_G_DNL_VENDOR_NUM=0x2207
> >> > >> >> +CONFIG_G_DNL_PRODUCT_NUM=0x320a
> >> > >> >> diff --git a/include/configs/rk3288_common.h
> >> > >> >> b/include/configs/rk3288_common.h index e7a8f72..421ba60
> >> > >> >> 100644 --- a/include/configs/rk3288_common.h
> >> > >> >> +++ b/include/configs/rk3288_common.h
> >> > >> >> @@ -58,11 +58,9 @@
> >> > >> >>
> >> > >> >>  #ifndef CONFIG_SPL_BUILD
> >> > >> >>  /* usb otg */
> >> > >> >> -#define CONFIG_USB_GADGET
> >> > >> >>  #define CONFIG_USB_GADGET_DUALSPEED
> >> > >> >>  #define CONFIG_USB_GADGET_DWC2_OTG
> >> > >> >>  #define CONFIG_ROCKCHIP_USB2_PHY
> >> > >> >> -#define CONFIG_USB_GADGET_VBUS_DRAW  0
> >> > >> >>
> >> > >> >>  /* fastboot  */
> >> > >> >>  #define CONFIG_CMD_FASTBOOT
> >> > >> >> @@ -76,11 +74,6 @@
> >> > >> >>  #define CONFIG_USB_FUNCTION_MASS_STORAGE
> >> > >> >>  #define CONFIG_CMD_USB_MASS_STORAGE
> >> > >> >>
> >> > >> >> -#define CONFIG_USB_GADGET_DOWNLOAD
> >> > >> >> -#define CONFIG_G_DNL_MANUFACTURER    "Rockchip"
> >> > >> >> -#define CONFIG_G_DNL_VENDOR_NUM              0x2207
> >> > >> >> -#define CONFIG_G_DNL_PRODUCT_NUM     0x320a
> >> > >> >> -
> >> > >> >>  /* usb host support */
> >> > >> >>  #ifdef CONFIG_CMD_USB
> >> > >> >>  #define CONFIG_USB_DWC2
> >> > >> >
> >> > >> >
> >> > >> >
> >> > >> >
> >> > >> > Best regards,
> >> > >> >
> >> > >> > Lukasz Majewski
> >> > >> >
> >> > >> > --
> >> > >> >
> >> > >> > DENX Software Engineering GmbH,      Managing Director:
> >> > >> > Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5,
> >> > >> > D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax:
> >> > >> > (+49)-8142-66989-80 Email: wd@denx.de
> >> > >
> >> > >
> >> > >
> >> > >
> >> > > Best regards,
> >> > >
> >> > > Lukasz Majewski
> >> > >
> >> > > --
> >> > >
> >> > > DENX Software Engineering GmbH,      Managing Director:
> >> > > Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194
> >> > > Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax:
> >> > > (+49)-8142-66989-80 Email: wd@denx.de
> >>
> >>
> >>
> >>
> >> Best regards,
> >>
> >> Lukasz Majewski
> >>
> >> --
> >>
> >> DENX Software Engineering GmbH,      Managing Director: Wolfgang
> >> Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell,
> >> Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email:
> >> wd@denx.de
> >
> >
> >
> >
> > Best regards,
> >
> > Lukasz Majewski
> >
> > --
> >
> > DENX Software Engineering GmbH,      Managing Director: Wolfgang
> > Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell,
> > Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email:
> > wd@denx.de




Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
Eddie Cai June 29, 2017, 12:44 a.m. UTC | #14
2017-06-28 15:55 GMT+08:00 Lukasz Majewski <lukma@denx.de>:
> Hi Eddie,
>
>> Hi Lukasz
>>
>> 2017-06-21 15:44 GMT+08:00 Lukasz Majewski <lukma@denx.de>:
>> > Hi Eddie,
>> >
>> >> Hi Eddie,
>> >>
>> >> > 2017-05-31 15:12 GMT+08:00 Lukasz Majewski <lukma@denx.de>:
>> >> > > On Wed, 31 May 2017 10:27:23 +0800
>> >> > > Eddie Cai <eddie.cai.linux@gmail.com> wrote:
>> >> > >
>> >> > >> Hi Lukasz
>> >> > >>
>> >> > >> 2017-05-29 15:51 GMT+08:00 Lukasz Majewski <lukma@denx.de>:
>> >> > >> > Good morning Eddie,
>> >> > >> >
>> >> > >> >> this patch enable rockusb support on rk3288 based device.
>> >> > >> >>
>> >> > >> >> Signed-off-by: Eddie Cai <eddie.cai.linux@gmail.com>
>> >> > >> >> Reviewed-by: Simon Glass <sjg@chromium.org>
>> >> > >> >>
>> >> > >> >
>> >> > >> > I've give this patch set a try on travisCI:
>> >> > >> >
>> >> > >> > https://travis-ci.org/lmajewski/u-boot-dfu/jobs/237068149
>> >> > >> >
>> >> > >> > Unfortunately, there are some problem with following boards:
>> >> > >> >
>> >> > >> > chromebook_jerry, chromebook_minnie ...
>> >> > >> I did it by myself last week. i got the same error. then i fix
>> >> > >> those chromebook error
>> >> > >> and test again. I still got some 3036 board error. But it
>> >> > >> build successfully when i
>> >> > >> build it on my computer. here is the travis-ci.org error log
>> >> > >> https://travis-ci.org/eddiecailinux/u-boot/jobs/236232837
>> >> > >> I have no idea what can i do to fix it.
>> >> > >
>> >> > > Can you share the SHA1 of commit on top of which you applied
>> >> > > your patches?
>> >> > >
>> >> > > I take u-boot-usb (the USB u-boot tree from Marek Vasut) as a
>> >> > > base and then apply commits on top of it.
>> >> > here is my branch
>> >> > https://github.com/eddiecailinux/u-boot/tree/rockusb-v8 I apply
>> >> > my patch on top of below commit commit
>> >> > a63d800196ebee59b0f8ff924f67843cd597a8c1 Author: Tom Rini
>> >> > <trini@konsulko.com> Date:   Mon May 1 19:54:41 2017 -0400
>> >> >
>> >> >     Prepare v2017.05-rc3
>> >> >
>> >> >     Signed-off-by: Tom Rini <trini@konsulko.com>
>> >>
>> >> I've looked thoroughly at your patches:
>> >>
>> >> Your patches has been applied on top of the above commit:
>> >> SHA1: a63d800196ebee59b0f8ff924f67843cd597a8c1
>> >>
>> >> Before applying your patches:
>> >> https://travis-ci.org/lmajewski/u-boot-dfu/builds/239069544
>> >>
>> >> After applying them:
>> >> https://travis-ci.org/lmajewski/u-boot-dfu/builds/239074799
>> >>
>> >> To be more precise:
>> >> https://travis-ci.org/lmajewski/u-boot-dfu/jobs/239074800
>> >>
>> >>
>> >> For example:
>> >>
>> >>       arm:  +   rock2
>> >> +cmd/built-in.o: In function `do_fastboot':
>> >> +cmd/fastboot.c:28: undefined reference to `board_usb_init'
>> >> +cmd/fastboot.c:34: undefined reference to `g_dnl_clear_detach'
>> >> +cmd/fastboot.c:35: undefined reference to `g_dnl_register'
>> >> +cmd/fastboot.c:39: undefined reference to
>> >>       `g_dnl_board_usb_cable_connected' +cmd/fastboot.c:57:
>> >> undefined reference to `g_dnl_unregister' +cmd/fastboot.c:58:
>> >> undefined reference to `g_dnl_clear_detach' +cmd/fastboot.c:59:
>> >> undefined reference to `board_usb_cleanup' +cmd/fastboot.c:47:
>> >> undefined reference to `g_dnl_detach' +cmd/fastboot.c:51: undefined
>> >>       reference to `usb_gadget_handle_interrupts' +cmd/built-in.o:
>> >> In function `do_usb_mass_storage':
>> >>
>> >>
>> >>
>> >> For me it seems like you have enabled fastboot support on too many
>> >> rochchip's boards.
>> >>
>> >> Can you look on it?
>> >
>> > If I might ask - have you managed to investigate this issue?
>> I can fix the chromebook error.
>
> Ok.
>
>> But i didn't enable rockusb support on
>> rk3036 based board. I built these board on my desktop. It work fine.
>
> The issue is not with this one particular board.
>
> I'm concerned, since your patch set causes build errors for other
> boards.
>
> Can you build test (with travis-CI) your patches and check if you can
> reproduce those errors?
I can reproduce this error with travis-CI. but i can't not reproduce
this rk3036 board error on my desktop.
can you try to local build rk3036 board and see if can reproduce this error?
>
> Best regards,
> Łukasz
>
>> >
>> >>
>> >> I've also updated my .travis.ml file to be in sync with mainline,
>> >> so we will use recommended arm toolchain.
>> >>
>> >> Please find this file attached.
>> >>
>> >> If there are any other patches required before applying this patch
>> >> series, please let me know (or better post them to ML).
>> >>
>> >>
>> >> Best regards,
>> >> Łukasz Majewski
>> >>
>> >> > >
>> >> > >> >
>> >> > >> > caused by "undefined references to ...."
>> >> > >> >
>> >> > >> > I've tried your patches on top of:
>> >> > >> > u-boot-usb/HEAD
>> >> > >> > SHA1: 3426b2038cfb831d74ac0407fc7a04e990b44540
>> >> > >> >
>> >> > >> > Maybe you have built tested it on other branch/commit?
>> >> > >> >
>> >> > >> > Best regards,
>> >> > >> > Łukasz Majewski
>> >> > >> >
>> >> > >> > p.s. My travis CI .travis.yml attached.
>> >> > >> >
>> >> > >> >> Changes in v7:
>> >> > >> >> -use imply in the Kconfig to enable rockusb
>> >> > >> >>
>> >> > >> >> Changes in v6:
>> >> > >> >> -enable rockusb in defconfig
>> >> > >> >>
>> >> > >> >> Changes in v5:
>> >> > >> >> -none
>> >> > >> >>
>> >> > >> >> Changes in v4:
>> >> > >> >> -move to rk3288_common.h
>> >> > >> >>
>> >> > >> >> Changes in v3:
>> >> > >> >> -move to defconfig
>> >> > >> >>
>> >> > >> >> ---
>> >> > >> >>  arch/arm/mach-rockchip/Kconfig    | 2 ++
>> >> > >> >>  configs/evb-rk3288_defconfig      | 9 +++++++++
>> >> > >> >>  configs/fennec-rk3288_defconfig   | 6 ++++++
>> >> > >> >>  configs/firefly-rk3288_defconfig  | 6 ++++++
>> >> > >> >>  configs/miqi-rk3288_defconfig     | 6 ++++++
>> >> > >> >>  configs/popmetal-rk3288_defconfig | 6 ++++++
>> >> > >> >>  configs/tinker-rk3288_defconfig   | 6 ++++++
>> >> > >> >>  include/configs/rk3288_common.h   | 7 -------
>> >> > >> >>  8 files changed, 41 insertions(+), 7 deletions(-)
>> >> > >> >>
>> >> > >> >> diff --git a/arch/arm/mach-rockchip/Kconfig
>> >> > >> >> b/arch/arm/mach-rockchip/Kconfig index 2b752ad..8a87812
>> >> > >> >> 100644 --- a/arch/arm/mach-rockchip/Kconfig
>> >> > >> >> +++ b/arch/arm/mach-rockchip/Kconfig
>> >> > >> >> @@ -32,6 +32,8 @@ config ROCKCHIP_RK3288
>> >> > >> >>       select CPU_V7
>> >> > >> >>       select SUPPORT_SPL
>> >> > >> >>       select SPL
>> >> > >> >> +     imply USB_FUNCTION_ROCKUSB
>> >> > >> >> +     imply CMD_ROCKUSB
>> >> > >> >>       help
>> >> > >> >>         The Rockchip RK3288 is a ARM-based SoC with a
>> >> > >> >> quad-core Cortex-A17 including NEON and GPU, 1MB L2 cache,
>> >> > >> >> Mali-T7 graphics, two diff --git
>> >> > >> >> a/configs/evb-rk3288_defconfig
>> >> > >> >> b/configs/evb-rk3288_defconfig index 227150d..cf66e09
>> >> > >> >> 100644 --- a/configs/evb-rk3288_defconfig +++
>> >> > >> >> b/configs/evb-rk3288_defconfig @@ -17,6 +17,7 @@
>> >> > >> >> CONFIG_CMD_MMC=y CONFIG_CMD_SF=y
>> >> > >> >>  CONFIG_CMD_SPI=y
>> >> > >> >>  CONFIG_CMD_I2C=y
>> >> > >> >> +CONFIG_CMD_USB=y
>> >> > >> >>  CONFIG_CMD_GPIO=y
>> >> > >> >>  # CONFIG_CMD_SETEXPR is not set
>> >> > >> >>  CONFIG_CMD_CACHE=y
>> >> > >> >> @@ -61,6 +62,14 @@ CONFIG_DEBUG_UART_CLOCK=24000000
>> >> > >> >>  CONFIG_DEBUG_UART_SHIFT=2
>> >> > >> >>  CONFIG_SYS_NS16550=y
>> >> > >> >>  CONFIG_SYSRESET=y
>> >> > >> >> +CONFIG_USB=y
>> >> > >> >> +CONFIG_USB_STORAGE=y
>> >> > >> >>  CONFIG_USE_TINY_PRINTF=y
>> >> > >> >>  CONFIG_CMD_DHRYSTONE=y
>> >> > >> >>  CONFIG_ERRNO_STR=y
>> >> > >> >> +CONFIG_USB_GADGET=y
>> >> > >> >> +CONFIG_USB_GADGET_DOWNLOAD=y
>> >> > >> >> +CONFIG_USB_GADGET_VBUS_DRAW=0
>> >> > >> >> +CONFIG_G_DNL_MANUFACTURER="Rockchip"
>> >> > >> >> +CONFIG_G_DNL_VENDOR_NUM=0x2207
>> >> > >> >> +CONFIG_G_DNL_PRODUCT_NUM=0x320a
>> >> > >> >> diff --git a/configs/fennec-rk3288_defconfig
>> >> > >> >> b/configs/fennec-rk3288_defconfig index befba18..eb33d00
>> >> > >> >> 100644 --- a/configs/fennec-rk3288_defconfig
>> >> > >> >> +++ b/configs/fennec-rk3288_defconfig
>> >> > >> >> @@ -66,3 +66,9 @@ CONFIG_USB_STORAGE=y
>> >> > >> >>  CONFIG_USE_TINY_PRINTF=y
>> >> > >> >>  CONFIG_CMD_DHRYSTONE=y
>> >> > >> >>  CONFIG_ERRNO_STR=y
>> >> > >> >> +CONFIG_USB_GADGET=y
>> >> > >> >> +CONFIG_USB_GADGET_DOWNLOAD=y
>> >> > >> >> +CONFIG_USB_GADGET_VBUS_DRAW=0
>> >> > >> >> +CONFIG_G_DNL_MANUFACTURER="Rockchip"
>> >> > >> >> +CONFIG_G_DNL_VENDOR_NUM=0x2207
>> >> > >> >> +CONFIG_G_DNL_PRODUCT_NUM=0x320a
>> >> > >> >> diff --git a/configs/firefly-rk3288_defconfig
>> >> > >> >> b/configs/firefly-rk3288_defconfig index f2872a6..1f4ca32
>> >> > >> >> 100644 --- a/configs/firefly-rk3288_defconfig
>> >> > >> >> +++ b/configs/firefly-rk3288_defconfig
>> >> > >> >> @@ -73,3 +73,9 @@ CONFIG_CONSOLE_SCROLL_LINES=10
>> >> > >> >>  CONFIG_USE_TINY_PRINTF=y
>> >> > >> >>  CONFIG_CMD_DHRYSTONE=y
>> >> > >> >>  CONFIG_ERRNO_STR=y
>> >> > >> >> +CONFIG_USB_GADGET=y
>> >> > >> >> +CONFIG_USB_GADGET_DOWNLOAD=y
>> >> > >> >> +CONFIG_USB_GADGET_VBUS_DRAW=0
>> >> > >> >> +CONFIG_G_DNL_MANUFACTURER="Rockchip"
>> >> > >> >> +CONFIG_G_DNL_VENDOR_NUM=0x2207
>> >> > >> >> +CONFIG_G_DNL_PRODUCT_NUM=0x320a
>> >> > >> >> diff --git a/configs/miqi-rk3288_defconfig
>> >> > >> >> b/configs/miqi-rk3288_defconfig index d93bd97..b8b6fd5
>> >> > >> >> 100644 --- a/configs/miqi-rk3288_defconfig
>> >> > >> >> +++ b/configs/miqi-rk3288_defconfig
>> >> > >> >> @@ -70,3 +70,9 @@ CONFIG_CONSOLE_SCROLL_LINES=10
>> >> > >> >>  CONFIG_USE_TINY_PRINTF=y
>> >> > >> >>  CONFIG_CMD_DHRYSTONE=y
>> >> > >> >>  CONFIG_ERRNO_STR=y
>> >> > >> >> +CONFIG_USB_GADGET=y
>> >> > >> >> +CONFIG_USB_GADGET_DOWNLOAD=y
>> >> > >> >> +CONFIG_USB_GADGET_VBUS_DRAW=0
>> >> > >> >> +CONFIG_G_DNL_MANUFACTURER="Rockchip"
>> >> > >> >> +CONFIG_G_DNL_VENDOR_NUM=0x2207
>> >> > >> >> +CONFIG_G_DNL_PRODUCT_NUM=0x320a
>> >> > >> >> diff --git a/configs/popmetal-rk3288_defconfig
>> >> > >> >> b/configs/popmetal-rk3288_defconfig index 748cda4..1181a20
>> >> > >> >> 100644 --- a/configs/popmetal-rk3288_defconfig
>> >> > >> >> +++ b/configs/popmetal-rk3288_defconfig
>> >> > >> >> @@ -66,3 +66,9 @@ CONFIG_USB_STORAGE=y
>> >> > >> >>  CONFIG_USE_TINY_PRINTF=y
>> >> > >> >>  CONFIG_CMD_DHRYSTONE=y
>> >> > >> >>  CONFIG_ERRNO_STR=y
>> >> > >> >> +CONFIG_USB_GADGET=y
>> >> > >> >> +CONFIG_USB_GADGET_DOWNLOAD=y
>> >> > >> >> +CONFIG_USB_GADGET_VBUS_DRAW=0
>> >> > >> >> +CONFIG_G_DNL_MANUFACTURER="Rockchip"
>> >> > >> >> +CONFIG_G_DNL_VENDOR_NUM=0x2207
>> >> > >> >> +CONFIG_G_DNL_PRODUCT_NUM=0x320a
>> >> > >> >> diff --git a/configs/tinker-rk3288_defconfig
>> >> > >> >> b/configs/tinker-rk3288_defconfig index ada5950..f863df8
>> >> > >> >> 100644 --- a/configs/tinker-rk3288_defconfig
>> >> > >> >> +++ b/configs/tinker-rk3288_defconfig
>> >> > >> >> @@ -66,3 +66,9 @@ CONFIG_USB_STORAGE=y
>> >> > >> >>  CONFIG_USE_TINY_PRINTF=y
>> >> > >> >>  CONFIG_CMD_DHRYSTONE=y
>> >> > >> >>  CONFIG_ERRNO_STR=y
>> >> > >> >> +CONFIG_USB_GADGET=y
>> >> > >> >> +CONFIG_USB_GADGET_DOWNLOAD=y
>> >> > >> >> +CONFIG_USB_GADGET_VBUS_DRAW=0
>> >> > >> >> +CONFIG_G_DNL_MANUFACTURER="Rockchip"
>> >> > >> >> +CONFIG_G_DNL_VENDOR_NUM=0x2207
>> >> > >> >> +CONFIG_G_DNL_PRODUCT_NUM=0x320a
>> >> > >> >> diff --git a/include/configs/rk3288_common.h
>> >> > >> >> b/include/configs/rk3288_common.h index e7a8f72..421ba60
>> >> > >> >> 100644 --- a/include/configs/rk3288_common.h
>> >> > >> >> +++ b/include/configs/rk3288_common.h
>> >> > >> >> @@ -58,11 +58,9 @@
>> >> > >> >>
>> >> > >> >>  #ifndef CONFIG_SPL_BUILD
>> >> > >> >>  /* usb otg */
>> >> > >> >> -#define CONFIG_USB_GADGET
>> >> > >> >>  #define CONFIG_USB_GADGET_DUALSPEED
>> >> > >> >>  #define CONFIG_USB_GADGET_DWC2_OTG
>> >> > >> >>  #define CONFIG_ROCKCHIP_USB2_PHY
>> >> > >> >> -#define CONFIG_USB_GADGET_VBUS_DRAW  0
>> >> > >> >>
>> >> > >> >>  /* fastboot  */
>> >> > >> >>  #define CONFIG_CMD_FASTBOOT
>> >> > >> >> @@ -76,11 +74,6 @@
>> >> > >> >>  #define CONFIG_USB_FUNCTION_MASS_STORAGE
>> >> > >> >>  #define CONFIG_CMD_USB_MASS_STORAGE
>> >> > >> >>
>> >> > >> >> -#define CONFIG_USB_GADGET_DOWNLOAD
>> >> > >> >> -#define CONFIG_G_DNL_MANUFACTURER    "Rockchip"
>> >> > >> >> -#define CONFIG_G_DNL_VENDOR_NUM              0x2207
>> >> > >> >> -#define CONFIG_G_DNL_PRODUCT_NUM     0x320a
>> >> > >> >> -
>> >> > >> >>  /* usb host support */
>> >> > >> >>  #ifdef CONFIG_CMD_USB
>> >> > >> >>  #define CONFIG_USB_DWC2
>> >> > >> >
>> >> > >> >
>> >> > >> >
>> >> > >> >
>> >> > >> > Best regards,
>> >> > >> >
>> >> > >> > Lukasz Majewski
>> >> > >> >
>> >> > >> > --
>> >> > >> >
>> >> > >> > DENX Software Engineering GmbH,      Managing Director:
>> >> > >> > Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5,
>> >> > >> > D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax:
>> >> > >> > (+49)-8142-66989-80 Email: wd@denx.de
>> >> > >
>> >> > >
>> >> > >
>> >> > >
>> >> > > Best regards,
>> >> > >
>> >> > > Lukasz Majewski
>> >> > >
>> >> > > --
>> >> > >
>> >> > > DENX Software Engineering GmbH,      Managing Director:
>> >> > > Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194
>> >> > > Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax:
>> >> > > (+49)-8142-66989-80 Email: wd@denx.de
>> >>
>> >>
>> >>
>> >>
>> >> Best regards,
>> >>
>> >> Lukasz Majewski
>> >>
>> >> --
>> >>
>> >> DENX Software Engineering GmbH,      Managing Director: Wolfgang
>> >> Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell,
>> >> Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email:
>> >> wd@denx.de
>> >
>> >
>> >
>> >
>> > Best regards,
>> >
>> > Lukasz Majewski
>> >
>> > --
>> >
>> > DENX Software Engineering GmbH,      Managing Director: Wolfgang
>> > Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell,
>> > Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email:
>> > wd@denx.de
>
>
>
>
> Best regards,
>
> Lukasz Majewski
>
> --
>
> DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
Lukasz Majewski June 29, 2017, 10:49 a.m. UTC | #15
On Thu, 29 Jun 2017 08:44:47 +0800
Eddie Cai <eddie.cai.linux@gmail.com> wrote:

> >
> > The issue is not with this one particular board.
> >
> > I'm concerned, since your patch set causes build errors for other
> > boards.
> >
> > Can you build test (with travis-CI) your patches and check if you
> > can reproduce those errors?  
> I can reproduce this error with travis-CI. but i can't not reproduce
> this rk3036 board error on my desktop.
> can you try to local build rk3036 board and see if can reproduce this
> error?
> >
 The rk3036 (evb-rk3036_defconfig) builds fine (with my old 4.8 gcc).

However, your patches cause other issues [1]:
https://travis-ci.org/lmajewski/u-boot-dfu/jobs/248264628

And for example I can reproduce the issue on
rock2_defconfig at my local PC.

Can you build rock2 on your PC with your patches applied without any
issues?





[1] The "testing" tree can be found at:
https://github.com/lmajewski/u-boot-dfu/tree/testing

Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
Eddie Cai June 30, 2017, 3:38 a.m. UTC | #16
2017-06-29 18:49 GMT+08:00 Lukasz Majewski <lukma@denx.de>:
> On Thu, 29 Jun 2017 08:44:47 +0800
> Eddie Cai <eddie.cai.linux@gmail.com> wrote:
>
>> >
>> > The issue is not with this one particular board.
>> >
>> > I'm concerned, since your patch set causes build errors for other
>> > boards.
>> >
>> > Can you build test (with travis-CI) your patches and check if you
>> > can reproduce those errors?
>> I can reproduce this error with travis-CI. but i can't not reproduce
>> this rk3036 board error on my desktop.
>> can you try to local build rk3036 board and see if can reproduce this
>> error?
>> >
>  The rk3036 (evb-rk3036_defconfig) builds fine (with my old 4.8 gcc).
>
> However, your patches cause other issues [1]:
> https://travis-ci.org/lmajewski/u-boot-dfu/jobs/248264628
>
> And for example I can reproduce the issue on
> rock2_defconfig at my local PC.
>
> Can you build rock2 on your PC with your patches applied without any
> issues?
I reproduced and fixed this issue long time ago. I didn't send my next version
because i don't know how to reproduce 3036 issue. It looks like 3036 work fine
on your side now. Can i ignore this 3036 issue?
>
>
>
>
>
> [1] The "testing" tree can be found at:
> https://github.com/lmajewski/u-boot-dfu/tree/testing
>
> Best regards,
>
> Lukasz Majewski
>
> --
>
> DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
Lukasz Majewski June 30, 2017, 8:15 a.m. UTC | #17
Hi Eddie,

> 2017-06-29 18:49 GMT+08:00 Lukasz Majewski <lukma@denx.de>:
> > On Thu, 29 Jun 2017 08:44:47 +0800
> > Eddie Cai <eddie.cai.linux@gmail.com> wrote:
> >
> >> >
> >> > The issue is not with this one particular board.
> >> >
> >> > I'm concerned, since your patch set causes build errors for other
> >> > boards.
> >> >
> >> > Can you build test (with travis-CI) your patches and check if you
> >> > can reproduce those errors?
> >> I can reproduce this error with travis-CI. but i can't not
> >> reproduce this rk3036 board error on my desktop.
> >> can you try to local build rk3036 board and see if can reproduce
> >> this error?
> >> >
> >  The rk3036 (evb-rk3036_defconfig) builds fine (with my old 4.8
> > gcc).
> >
> > However, your patches cause other issues [1]:
> > https://travis-ci.org/lmajewski/u-boot-dfu/jobs/248264628
> >
> > And for example I can reproduce the issue on
> > rock2_defconfig at my local PC.
> >
> > Can you build rock2 on your PC with your patches applied without any
> > issues?
> I reproduced and fixed this issue long time ago. I didn't send my
> next version because i don't know how to reproduce 3036 issue. It
> looks like 3036 work fine on your side now. Can i ignore this 3036
> issue?

Please before posting next version make sure that no build breaks
shows up in TravisCI.

Please as a reference use mainline .travis.yml. (especially build for
rockchip)

Please let me know if you need any assistance at fixing problems.

> >
> >
> >
> >
> >
> > [1] The "testing" tree can be found at:
> > https://github.com/lmajewski/u-boot-dfu/tree/testing
> >
> > Best regards,
> >
> > Lukasz Majewski
> >
> > --
> >
> > DENX Software Engineering GmbH,      Managing Director: Wolfgang
> > Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell,
> > Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email:
> > wd@denx.de




Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
diff mbox

Patch

diff --git a/arch/arm/mach-rockchip/Kconfig b/arch/arm/mach-rockchip/Kconfig
index 2b752ad..8a87812 100644
--- a/arch/arm/mach-rockchip/Kconfig
+++ b/arch/arm/mach-rockchip/Kconfig
@@ -32,6 +32,8 @@  config ROCKCHIP_RK3288
 	select CPU_V7
 	select SUPPORT_SPL
 	select SPL
+	imply USB_FUNCTION_ROCKUSB
+	imply CMD_ROCKUSB
 	help
 	  The Rockchip RK3288 is a ARM-based SoC with a quad-core Cortex-A17
 	  including NEON and GPU, 1MB L2 cache, Mali-T7 graphics, two
diff --git a/configs/evb-rk3288_defconfig b/configs/evb-rk3288_defconfig
index 227150d..cf66e09 100644
--- a/configs/evb-rk3288_defconfig
+++ b/configs/evb-rk3288_defconfig
@@ -17,6 +17,7 @@  CONFIG_CMD_MMC=y
 CONFIG_CMD_SF=y
 CONFIG_CMD_SPI=y
 CONFIG_CMD_I2C=y
+CONFIG_CMD_USB=y
 CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_CACHE=y
@@ -61,6 +62,14 @@  CONFIG_DEBUG_UART_CLOCK=24000000
 CONFIG_DEBUG_UART_SHIFT=2
 CONFIG_SYS_NS16550=y
 CONFIG_SYSRESET=y
+CONFIG_USB=y
+CONFIG_USB_STORAGE=y
 CONFIG_USE_TINY_PRINTF=y
 CONFIG_CMD_DHRYSTONE=y
 CONFIG_ERRNO_STR=y
+CONFIG_USB_GADGET=y
+CONFIG_USB_GADGET_DOWNLOAD=y
+CONFIG_USB_GADGET_VBUS_DRAW=0
+CONFIG_G_DNL_MANUFACTURER="Rockchip"
+CONFIG_G_DNL_VENDOR_NUM=0x2207
+CONFIG_G_DNL_PRODUCT_NUM=0x320a
diff --git a/configs/fennec-rk3288_defconfig b/configs/fennec-rk3288_defconfig
index befba18..eb33d00 100644
--- a/configs/fennec-rk3288_defconfig
+++ b/configs/fennec-rk3288_defconfig
@@ -66,3 +66,9 @@  CONFIG_USB_STORAGE=y
 CONFIG_USE_TINY_PRINTF=y
 CONFIG_CMD_DHRYSTONE=y
 CONFIG_ERRNO_STR=y
+CONFIG_USB_GADGET=y
+CONFIG_USB_GADGET_DOWNLOAD=y
+CONFIG_USB_GADGET_VBUS_DRAW=0
+CONFIG_G_DNL_MANUFACTURER="Rockchip"
+CONFIG_G_DNL_VENDOR_NUM=0x2207
+CONFIG_G_DNL_PRODUCT_NUM=0x320a
diff --git a/configs/firefly-rk3288_defconfig b/configs/firefly-rk3288_defconfig
index f2872a6..1f4ca32 100644
--- a/configs/firefly-rk3288_defconfig
+++ b/configs/firefly-rk3288_defconfig
@@ -73,3 +73,9 @@  CONFIG_CONSOLE_SCROLL_LINES=10
 CONFIG_USE_TINY_PRINTF=y
 CONFIG_CMD_DHRYSTONE=y
 CONFIG_ERRNO_STR=y
+CONFIG_USB_GADGET=y
+CONFIG_USB_GADGET_DOWNLOAD=y
+CONFIG_USB_GADGET_VBUS_DRAW=0
+CONFIG_G_DNL_MANUFACTURER="Rockchip"
+CONFIG_G_DNL_VENDOR_NUM=0x2207
+CONFIG_G_DNL_PRODUCT_NUM=0x320a
diff --git a/configs/miqi-rk3288_defconfig b/configs/miqi-rk3288_defconfig
index d93bd97..b8b6fd5 100644
--- a/configs/miqi-rk3288_defconfig
+++ b/configs/miqi-rk3288_defconfig
@@ -70,3 +70,9 @@  CONFIG_CONSOLE_SCROLL_LINES=10
 CONFIG_USE_TINY_PRINTF=y
 CONFIG_CMD_DHRYSTONE=y
 CONFIG_ERRNO_STR=y
+CONFIG_USB_GADGET=y
+CONFIG_USB_GADGET_DOWNLOAD=y
+CONFIG_USB_GADGET_VBUS_DRAW=0
+CONFIG_G_DNL_MANUFACTURER="Rockchip"
+CONFIG_G_DNL_VENDOR_NUM=0x2207
+CONFIG_G_DNL_PRODUCT_NUM=0x320a
diff --git a/configs/popmetal-rk3288_defconfig b/configs/popmetal-rk3288_defconfig
index 748cda4..1181a20 100644
--- a/configs/popmetal-rk3288_defconfig
+++ b/configs/popmetal-rk3288_defconfig
@@ -66,3 +66,9 @@  CONFIG_USB_STORAGE=y
 CONFIG_USE_TINY_PRINTF=y
 CONFIG_CMD_DHRYSTONE=y
 CONFIG_ERRNO_STR=y
+CONFIG_USB_GADGET=y
+CONFIG_USB_GADGET_DOWNLOAD=y
+CONFIG_USB_GADGET_VBUS_DRAW=0
+CONFIG_G_DNL_MANUFACTURER="Rockchip"
+CONFIG_G_DNL_VENDOR_NUM=0x2207
+CONFIG_G_DNL_PRODUCT_NUM=0x320a
diff --git a/configs/tinker-rk3288_defconfig b/configs/tinker-rk3288_defconfig
index ada5950..f863df8 100644
--- a/configs/tinker-rk3288_defconfig
+++ b/configs/tinker-rk3288_defconfig
@@ -66,3 +66,9 @@  CONFIG_USB_STORAGE=y
 CONFIG_USE_TINY_PRINTF=y
 CONFIG_CMD_DHRYSTONE=y
 CONFIG_ERRNO_STR=y
+CONFIG_USB_GADGET=y
+CONFIG_USB_GADGET_DOWNLOAD=y
+CONFIG_USB_GADGET_VBUS_DRAW=0
+CONFIG_G_DNL_MANUFACTURER="Rockchip"
+CONFIG_G_DNL_VENDOR_NUM=0x2207
+CONFIG_G_DNL_PRODUCT_NUM=0x320a
diff --git a/include/configs/rk3288_common.h b/include/configs/rk3288_common.h
index e7a8f72..421ba60 100644
--- a/include/configs/rk3288_common.h
+++ b/include/configs/rk3288_common.h
@@ -58,11 +58,9 @@ 
 
 #ifndef CONFIG_SPL_BUILD
 /* usb otg */
-#define CONFIG_USB_GADGET
 #define CONFIG_USB_GADGET_DUALSPEED
 #define CONFIG_USB_GADGET_DWC2_OTG
 #define CONFIG_ROCKCHIP_USB2_PHY
-#define CONFIG_USB_GADGET_VBUS_DRAW	0
 
 /* fastboot  */
 #define CONFIG_CMD_FASTBOOT
@@ -76,11 +74,6 @@ 
 #define CONFIG_USB_FUNCTION_MASS_STORAGE
 #define CONFIG_CMD_USB_MASS_STORAGE
 
-#define CONFIG_USB_GADGET_DOWNLOAD
-#define CONFIG_G_DNL_MANUFACTURER	"Rockchip"
-#define CONFIG_G_DNL_VENDOR_NUM		0x2207
-#define CONFIG_G_DNL_PRODUCT_NUM	0x320a
-
 /* usb host support */
 #ifdef CONFIG_CMD_USB
 #define CONFIG_USB_DWC2