Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- =========== U-Boot =================
- => rockusb 0 mmc 1
- DDD board_usb_init called
- initializing ep0out
- initializing ep1out
- initializing ep2out
- initializing ep3out
- initializing ep4out
- initializing ep5out
- initializing ep0in
- initializing ep1in
- initializing ep2in
- initializing ep3in
- initializing ep4in
- initializing ep5in
- initializing ep6in
- USB init okay: 0
- g_dnl_register: g_dnl_driver.name = usb_dnl_rockusb
- 0
- g_dnl_bind: gadget: 0x00000000f4f590d0 cdev: 0x00000000f4f4fef0
- usb_add_config: adding config #1 'usb_dnload'/00000000f4f9d400
- g_dnl_do_config: configuration: 0x00000000f4f9d400 composite dev: 0x00000000f4f4fef0
- rockusb_add: cdev: 0x00000000f4f4fef0
- adding 'f_rockusb'/00000000f4f568c0 to config 'usb_dnload'/00000000f4f9d400
- cfg 1/00000000f4f9d400 speeds: high full
- usb_add_config: interface 0 = f_rockusb/00000000f4f568c0
- g_dnl_bind: calling usb_gadget_connect for controller 'dwc3-gadget'
- 0
- gadget no-function data soft-connect
- usb_dnl_rockusb: ready
- 0
- Enabling ep0out
- Command Complete --> 0
- Command Complete --> 0
- Command Complete --> 0
- Enabling ep0in
- Command Complete --> 0
- Command Complete --> 0
- Command Complete --> 0
- 0
- gadget <NULL> data soft-connect
- g_dnl_register usb_dnl_rockusb okay: 0
- cable connected. enter loop: 0
- 0
- 0
- composite_suspend: suspend
- 0
- gadget <NULL> data soft-disconnect
- unbind function 'f_rockusb'/00000000f4f568c0
- g_dnl_unbind: calling usb_gadget_disconnect for controller 'dwc3-gadget'
- 0
- gadget <NULL> data soft-disconnect
- 0
- =========== Diff to U-Boot v2019.10 =================
- diff --git a/board/rockchip/evb_rk3399/evb-rk3399.c b/board/rockchip/evb_rk3399/evb-rk3399.c
- index b9049abcc7e0..13ea91964020 100644
- --- a/board/rockchip/evb_rk3399/evb-rk3399.c
- +++ b/board/rockchip/evb_rk3399/evb-rk3399.c
- @@ -28,3 +28,40 @@ out:
- return 0;
- }
- #endif
- +
- +#ifdef CONFIG_USB_DWC3
- +#include <usb.h>
- +#include <dwc3-uboot.h>
- +
- +static struct dwc3_device dwc3_device_data = {
- + .maximum_speed = USB_SPEED_HIGH,
- + .base = 0xfe800000,
- + .dr_mode = USB_DR_MODE_PERIPHERAL,
- + .index = 0,
- + .dis_u2_susphy_quirk = 1,
- +};
- +
- +int usb_gadget_handle_interrupts(int controller_index)
- +{
- + dwc3_uboot_handle_interrupt(controller_index);
- + return 0;
- +}
- +
- +int board_usb_init(int index, enum usb_init_type init)
- +{
- + printf("DDD board_usb_init called\n");
- + if (index == 0 && init == USB_INIT_DEVICE)
- + return dwc3_uboot_init(&dwc3_device_data);
- + return -EINVAL;
- +}
- +
- +int board_usb_cleanup(int index, enum usb_init_type init)
- +{
- + if (index == 0 && init == USB_INIT_DEVICE) {
- + dwc3_uboot_exit(index);
- + return 0;
- + }
- + return -EINVAL;
- +}
- +
- +#endif
- diff --git a/cmd/rockusb.c b/cmd/rockusb.c
- index 9b70c6a6aff7..5b594865020f 100644
- --- a/cmd/rockusb.c
- +++ b/cmd/rockusb.c
- @@ -39,17 +39,20 @@ static int do_rockusb(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
- return CMD_RET_FAILURE;
- }
- + printf("USB init okay: %d\n", ret);
- g_dnl_clear_detach();
- ret = g_dnl_register("usb_dnl_rockusb");
- if (ret)
- return CMD_RET_FAILURE;
- + printf("g_dnl_register usb_dnl_rockusb okay: %d\n", ret);
- if (!g_dnl_board_usb_cable_connected()) {
- puts("\rUSB cable not detected, Command exit.\n");
- ret = CMD_RET_FAILURE;
- goto exit;
- }
- + printf("cable connected. enter loop: %d\n", ret);
- while (1) {
- if (g_dnl_detach())
- break;
- diff --git a/configs/roc-rk3399-pc_defconfig b/configs/roc-rk3399-pc_defconfig
- index 28b18333d784..c624bb864192 100644
- --- a/configs/roc-rk3399-pc_defconfig
- +++ b/configs/roc-rk3399-pc_defconfig
- @@ -8,6 +8,10 @@ CONFIG_SPL_STACK_R_ADDR=0x80000
- CONFIG_DEBUG_UART_BASE=0xFF1A0000
- CONFIG_DEBUG_UART_CLOCK=24000000
- CONFIG_DEBUG_UART=y
- +CONFIG_LOCALVERSION="-djw"
- +# CONFIG_LOCALVERSION_AUTO is not set
- +# CONFIG_ANDROID_BOOT_IMAGE is not set
- +# CONFIG_CONSOLE_MUX is not set
- CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-roc-pc.dtb"
- # CONFIG_DISPLAY_CPUINFO is not set
- CONFIG_DISPLAY_BOARDINFO_LATE=y
- @@ -17,17 +21,28 @@ CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x10000
- CONFIG_TPL=y
- CONFIG_CMD_BOOTZ=y
- CONFIG_CMD_GPT=y
- +CONFIG_CMD_I2C=y
- CONFIG_CMD_MMC=y
- CONFIG_CMD_SF=y
- CONFIG_CMD_USB=y
- +CONFIG_CMD_ROCKUSB=y
- +CONFIG_CMD_USB_MASS_STORAGE=y
- # CONFIG_CMD_SETEXPR is not set
- +CONFIG_CMD_BMP=y
- CONFIG_CMD_TIME=y
- +CONFIG_CMD_PMIC=y
- +CONFIG_CMD_REGULATOR=y
- CONFIG_SPL_OF_CONTROL=y
- +CONFIG_OF_LIVE=y
- CONFIG_DEFAULT_DEVICE_TREE="rk3399-roc-pc"
- CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
- -CONFIG_ENV_IS_IN_MMC=y
- +CONFIG_ENV_IS_IN_EXT4=y
- +CONFIG_ENV_EXT4_INTERFACE="mmc"
- +CONFIG_ENV_EXT4_DEVICE_AND_PART="0:auto"
- +CONFIG_ENV_EXT4_FILE="/boot/boot.env"
- CONFIG_ROCKCHIP_GPIO=y
- CONFIG_SYS_I2C_ROCKCHIP=y
- +CONFIG_MISC=y
- CONFIG_MMC_DW=y
- CONFIG_MMC_DW_ROCKCHIP=y
- CONFIG_MMC_SDHCI=y
- @@ -35,8 +50,10 @@ CONFIG_MMC_SDHCI_ROCKCHIP=y
- CONFIG_DM_ETH=y
- CONFIG_ETH_DESIGNWARE=y
- CONFIG_GMAC_ROCKCHIP=y
- +CONFIG_DM_PMIC_FAN53555=y
- CONFIG_PMIC_RK8XX=y
- CONFIG_REGULATOR_PWM=y
- +CONFIG_DM_REGULATOR_GPIO=y
- CONFIG_REGULATOR_RK8XX=y
- CONFIG_PWM_ROCKCHIP=y
- CONFIG_RAM_RK3399_LPDDR4=y
- @@ -48,11 +65,22 @@ CONFIG_USB_XHCI_HCD=y
- CONFIG_USB_XHCI_DWC3=y
- CONFIG_USB_EHCI_HCD=y
- CONFIG_USB_EHCI_GENERIC=y
- +CONFIG_USB_DWC3=y
- +CONFIG_USB_DWC3_GADGET=y
- +CONFIG_USB_DWC3_GENERIC=y
- +CONFIG_USB_GADGET=y
- +CONFIG_USB_GADGET_MANUFACTURER="Rockchip"
- +CONFIG_USB_GADGET_VENDOR_NUM=0x2207
- +CONFIG_USB_GADGET_PRODUCT_NUM=0x330a
- +CONFIG_USB_FUNCTION_ROCKUSB=y
- CONFIG_USB_HOST_ETHER=y
- CONFIG_USB_ETHER_ASIX=y
- CONFIG_USB_ETHER_ASIX88179=y
- CONFIG_USB_ETHER_MCS7830=y
- CONFIG_USB_ETHER_RTL8152=y
- CONFIG_USB_ETHER_SMSC95XX=y
- -CONFIG_SPL_TINY_MEMSET=y
- +CONFIG_DM_VIDEO=y
- +CONFIG_DISPLAY=y
- +CONFIG_VIDEO_ROCKCHIP=y
- +CONFIG_DISPLAY_ROCKCHIP_HDMI=y
- CONFIG_ERRNO_STR=y
- diff --git a/drivers/core/lists.c b/drivers/core/lists.c
- index a1f828463ecd..5697e77be419 100644
- --- a/drivers/core/lists.c
- +++ b/drivers/core/lists.c
- @@ -6,6 +6,7 @@
- * Marek Vasut <[email protected]>
- */
- +#define DEBUG
- #include <common.h>
- #include <errno.h>
- #include <dm/device.h>
- diff --git a/drivers/core/root.c b/drivers/core/root.c
- index e85643819e7b..06f3e2385ba9 100644
- --- a/drivers/core/root.c
- +++ b/drivers/core/root.c
- @@ -6,6 +6,7 @@
- * Pavel Herrmann <[email protected]>
- */
- +#define DEBUG
- #include <common.h>
- #include <errno.h>
- #include <fdtdec.h>
- diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
- index 085f7b896884..7868d81ab652 100644
- --- a/drivers/usb/dwc3/gadget.c
- +++ b/drivers/usb/dwc3/gadget.c
- @@ -13,6 +13,7 @@
- * commit 8e74475b0e : usb: dwc3: gadget: use udc-core's reset notifier
- */
- +#define DEBUG
- #include <common.h>
- #include <malloc.h>
- #include <asm/dma-mapping.h>
- diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c
- index c7e762374752..c2d47d256799 100644
- --- a/drivers/usb/gadget/composite.c
- +++ b/drivers/usb/gadget/composite.c
- @@ -5,7 +5,7 @@
- * Copyright (C) 2006-2008 David Brownell
- * U-Boot porting: Lukasz Majewski <[email protected]>
- */
- -#undef DEBUG
- +#define DEBUG
- #include <linux/bitops.h>
- #include <linux/usb/composite.h>
- diff --git a/drivers/usb/gadget/f_rockusb.c b/drivers/usb/gadget/f_rockusb.c
- index 1cfeabcd31ae..6f5e99239ce7 100644
- --- a/drivers/usb/gadget/f_rockusb.c
- +++ b/drivers/usb/gadget/f_rockusb.c
- @@ -4,6 +4,7 @@
- *
- * Eddie Cai <[email protected]>
- */
- +#define DEBUG
- #include <config.h>
- #include <common.h>
- #include <env.h>
- diff --git a/drivers/usb/gadget/g_dnl.c b/drivers/usb/gadget/g_dnl.c
- index e9e1600a1a50..8a0d30a5abe9 100644
- --- a/drivers/usb/gadget/g_dnl.c
- +++ b/drivers/usb/gadget/g_dnl.c
- @@ -6,6 +6,7 @@
- * Lukasz Majewski <[email protected]>
- */
- +#define DEBUG
- #include <common.h>
- #include <malloc.h>
- diff --git a/drivers/video/rockchip/rk3399_hdmi.c b/drivers/video/rockchip/rk3399_hdmi.c
- index a62be9832750..b42444ae9f08 100644
- --- a/drivers/video/rockchip/rk3399_hdmi.c
- +++ b/drivers/video/rockchip/rk3399_hdmi.c
- @@ -3,6 +3,7 @@
- * Copyright (c) 2017 Theobroma Systems Design und Consulting GmbH
- */
- +#define DEBUG
- #include <common.h>
- #include <clk.h>
- #include <display.h>
- diff --git a/drivers/video/rockchip/rk3399_vop.c b/drivers/video/rockchip/rk3399_vop.c
- index 81c122d7a9ee..d88388fec828 100644
- --- a/drivers/video/rockchip/rk3399_vop.c
- +++ b/drivers/video/rockchip/rk3399_vop.c
- @@ -5,6 +5,7 @@
- * Copyright 2014 Rockchip Inc.
- */
- +#define DEBUG
- #include <common.h>
- #include <display.h>
- #include <dm.h>
- diff --git a/drivers/video/rockchip/rk_edp.c b/drivers/video/rockchip/rk_edp.c
- index 4330725a2513..3c49d4671d19 100644
- --- a/drivers/video/rockchip/rk_edp.c
- +++ b/drivers/video/rockchip/rk_edp.c
- @@ -17,6 +17,7 @@
- #include <asm/arch-rockchip/clock.h>
- #include <asm/arch-rockchip/edp_rk3288.h>
- #include <asm/arch-rockchip/grf_rk3288.h>
- +#include <asm/arch-rockchip/hardware.h>
- #include <dt-bindings/clock/rk3288-cru.h>
- #define MAX_CR_LOOP 5
- diff --git a/drivers/video/rockchip/rk_hdmi.c b/drivers/video/rockchip/rk_hdmi.c
- index 5b44a7e8c97d..8f06f43645f8 100644
- --- a/drivers/video/rockchip/rk_hdmi.c
- +++ b/drivers/video/rockchip/rk_hdmi.c
- @@ -5,6 +5,7 @@
- * Copyright 2014 Rockchip Inc.
- */
- +#define DEBUG
- #include <common.h>
- #include <clk.h>
- #include <display.h>
- diff --git a/drivers/video/rockchip/rk_lvds.c b/drivers/video/rockchip/rk_lvds.c
- index cf5c0439b1ad..7d0381ea4293 100644
- --- a/drivers/video/rockchip/rk_lvds.c
- +++ b/drivers/video/rockchip/rk_lvds.c
- @@ -15,6 +15,7 @@
- #include <asm/arch-rockchip/clock.h>
- #include <asm/arch-rockchip/lvds_rk3288.h>
- #include <asm/arch-rockchip/grf_rk3288.h>
- +#include <asm/arch-rockchip/hardware.h>
- #include <dt-bindings/clock/rk3288-cru.h>
- #include <dt-bindings/video/rk3288.h>
- diff --git a/drivers/video/rockchip/rk_vop.c b/drivers/video/rockchip/rk_vop.c
- index b56c3f336c99..85db11409fbc 100644
- --- a/drivers/video/rockchip/rk_vop.c
- +++ b/drivers/video/rockchip/rk_vop.c
- @@ -3,7 +3,7 @@
- * Copyright (c) 2015 Google, Inc
- * Copyright 2014 Rockchip Inc.
- */
- -
- +#define DEBUG
- #include <common.h>
- #include <clk.h>
- #include <display.h>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement