Advertisement
levindu

Untitled

Oct 11th, 2019
208
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.12 KB | None | 0 0
  1. =========== U-Boot =================
  2. => rockusb 0 mmc 1
  3. DDD board_usb_init called
  4. initializing ep0out
  5. initializing ep1out
  6. initializing ep2out
  7. initializing ep3out
  8. initializing ep4out
  9. initializing ep5out
  10. initializing ep0in
  11. initializing ep1in
  12. initializing ep2in
  13. initializing ep3in
  14. initializing ep4in
  15. initializing ep5in
  16. initializing ep6in
  17. USB init okay: 0
  18. g_dnl_register: g_dnl_driver.name = usb_dnl_rockusb
  19. 0
  20. g_dnl_bind: gadget: 0x00000000f4f590d0 cdev: 0x00000000f4f4fef0
  21. usb_add_config: adding config #1 'usb_dnload'/00000000f4f9d400
  22. g_dnl_do_config: configuration: 0x00000000f4f9d400 composite dev: 0x00000000f4f4fef0
  23. rockusb_add: cdev: 0x00000000f4f4fef0
  24. adding 'f_rockusb'/00000000f4f568c0 to config 'usb_dnload'/00000000f4f9d400
  25. cfg 1/00000000f4f9d400 speeds: high full
  26. usb_add_config: interface 0 = f_rockusb/00000000f4f568c0
  27. g_dnl_bind: calling usb_gadget_connect for controller 'dwc3-gadget'
  28. 0
  29. gadget no-function data soft-connect
  30. usb_dnl_rockusb: ready
  31. 0
  32. Enabling ep0out
  33. Command Complete --> 0
  34. Command Complete --> 0
  35. Command Complete --> 0
  36. Enabling ep0in
  37. Command Complete --> 0
  38. Command Complete --> 0
  39. Command Complete --> 0
  40. 0
  41. gadget <NULL> data soft-connect
  42. g_dnl_register usb_dnl_rockusb okay: 0
  43. cable connected. enter loop: 0
  44. 0
  45. 0
  46. composite_suspend: suspend
  47. 0
  48. gadget <NULL> data soft-disconnect
  49. unbind function 'f_rockusb'/00000000f4f568c0
  50. g_dnl_unbind: calling usb_gadget_disconnect for controller 'dwc3-gadget'
  51. 0
  52. gadget <NULL> data soft-disconnect
  53. 0
  54.  
  55.  
  56. =========== Diff to U-Boot v2019.10 =================
  57. diff --git a/board/rockchip/evb_rk3399/evb-rk3399.c b/board/rockchip/evb_rk3399/evb-rk3399.c
  58. index b9049abcc7e0..13ea91964020 100644
  59. --- a/board/rockchip/evb_rk3399/evb-rk3399.c
  60. +++ b/board/rockchip/evb_rk3399/evb-rk3399.c
  61. @@ -28,3 +28,40 @@ out:
  62. return 0;
  63. }
  64. #endif
  65. +
  66. +#ifdef CONFIG_USB_DWC3
  67. +#include <usb.h>
  68. +#include <dwc3-uboot.h>
  69. +
  70. +static struct dwc3_device dwc3_device_data = {
  71. + .maximum_speed = USB_SPEED_HIGH,
  72. + .base = 0xfe800000,
  73. + .dr_mode = USB_DR_MODE_PERIPHERAL,
  74. + .index = 0,
  75. + .dis_u2_susphy_quirk = 1,
  76. +};
  77. +
  78. +int usb_gadget_handle_interrupts(int controller_index)
  79. +{
  80. + dwc3_uboot_handle_interrupt(controller_index);
  81. + return 0;
  82. +}
  83. +
  84. +int board_usb_init(int index, enum usb_init_type init)
  85. +{
  86. + printf("DDD board_usb_init called\n");
  87. + if (index == 0 && init == USB_INIT_DEVICE)
  88. + return dwc3_uboot_init(&dwc3_device_data);
  89. + return -EINVAL;
  90. +}
  91. +
  92. +int board_usb_cleanup(int index, enum usb_init_type init)
  93. +{
  94. + if (index == 0 && init == USB_INIT_DEVICE) {
  95. + dwc3_uboot_exit(index);
  96. + return 0;
  97. + }
  98. + return -EINVAL;
  99. +}
  100. +
  101. +#endif
  102. diff --git a/cmd/rockusb.c b/cmd/rockusb.c
  103. index 9b70c6a6aff7..5b594865020f 100644
  104. --- a/cmd/rockusb.c
  105. +++ b/cmd/rockusb.c
  106. @@ -39,17 +39,20 @@ static int do_rockusb(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
  107. return CMD_RET_FAILURE;
  108. }
  109.  
  110. + printf("USB init okay: %d\n", ret);
  111. g_dnl_clear_detach();
  112. ret = g_dnl_register("usb_dnl_rockusb");
  113. if (ret)
  114. return CMD_RET_FAILURE;
  115.  
  116. + printf("g_dnl_register usb_dnl_rockusb okay: %d\n", ret);
  117. if (!g_dnl_board_usb_cable_connected()) {
  118. puts("\rUSB cable not detected, Command exit.\n");
  119. ret = CMD_RET_FAILURE;
  120. goto exit;
  121. }
  122.  
  123. + printf("cable connected. enter loop: %d\n", ret);
  124. while (1) {
  125. if (g_dnl_detach())
  126. break;
  127. diff --git a/configs/roc-rk3399-pc_defconfig b/configs/roc-rk3399-pc_defconfig
  128. index 28b18333d784..c624bb864192 100644
  129. --- a/configs/roc-rk3399-pc_defconfig
  130. +++ b/configs/roc-rk3399-pc_defconfig
  131. @@ -8,6 +8,10 @@ CONFIG_SPL_STACK_R_ADDR=0x80000
  132. CONFIG_DEBUG_UART_BASE=0xFF1A0000
  133. CONFIG_DEBUG_UART_CLOCK=24000000
  134. CONFIG_DEBUG_UART=y
  135. +CONFIG_LOCALVERSION="-djw"
  136. +# CONFIG_LOCALVERSION_AUTO is not set
  137. +# CONFIG_ANDROID_BOOT_IMAGE is not set
  138. +# CONFIG_CONSOLE_MUX is not set
  139. CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-roc-pc.dtb"
  140. # CONFIG_DISPLAY_CPUINFO is not set
  141. CONFIG_DISPLAY_BOARDINFO_LATE=y
  142. @@ -17,17 +21,28 @@ CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x10000
  143. CONFIG_TPL=y
  144. CONFIG_CMD_BOOTZ=y
  145. CONFIG_CMD_GPT=y
  146. +CONFIG_CMD_I2C=y
  147. CONFIG_CMD_MMC=y
  148. CONFIG_CMD_SF=y
  149. CONFIG_CMD_USB=y
  150. +CONFIG_CMD_ROCKUSB=y
  151. +CONFIG_CMD_USB_MASS_STORAGE=y
  152. # CONFIG_CMD_SETEXPR is not set
  153. +CONFIG_CMD_BMP=y
  154. CONFIG_CMD_TIME=y
  155. +CONFIG_CMD_PMIC=y
  156. +CONFIG_CMD_REGULATOR=y
  157. CONFIG_SPL_OF_CONTROL=y
  158. +CONFIG_OF_LIVE=y
  159. CONFIG_DEFAULT_DEVICE_TREE="rk3399-roc-pc"
  160. CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
  161. -CONFIG_ENV_IS_IN_MMC=y
  162. +CONFIG_ENV_IS_IN_EXT4=y
  163. +CONFIG_ENV_EXT4_INTERFACE="mmc"
  164. +CONFIG_ENV_EXT4_DEVICE_AND_PART="0:auto"
  165. +CONFIG_ENV_EXT4_FILE="/boot/boot.env"
  166. CONFIG_ROCKCHIP_GPIO=y
  167. CONFIG_SYS_I2C_ROCKCHIP=y
  168. +CONFIG_MISC=y
  169. CONFIG_MMC_DW=y
  170. CONFIG_MMC_DW_ROCKCHIP=y
  171. CONFIG_MMC_SDHCI=y
  172. @@ -35,8 +50,10 @@ CONFIG_MMC_SDHCI_ROCKCHIP=y
  173. CONFIG_DM_ETH=y
  174. CONFIG_ETH_DESIGNWARE=y
  175. CONFIG_GMAC_ROCKCHIP=y
  176. +CONFIG_DM_PMIC_FAN53555=y
  177. CONFIG_PMIC_RK8XX=y
  178. CONFIG_REGULATOR_PWM=y
  179. +CONFIG_DM_REGULATOR_GPIO=y
  180. CONFIG_REGULATOR_RK8XX=y
  181. CONFIG_PWM_ROCKCHIP=y
  182. CONFIG_RAM_RK3399_LPDDR4=y
  183. @@ -48,11 +65,22 @@ CONFIG_USB_XHCI_HCD=y
  184. CONFIG_USB_XHCI_DWC3=y
  185. CONFIG_USB_EHCI_HCD=y
  186. CONFIG_USB_EHCI_GENERIC=y
  187. +CONFIG_USB_DWC3=y
  188. +CONFIG_USB_DWC3_GADGET=y
  189. +CONFIG_USB_DWC3_GENERIC=y
  190. +CONFIG_USB_GADGET=y
  191. +CONFIG_USB_GADGET_MANUFACTURER="Rockchip"
  192. +CONFIG_USB_GADGET_VENDOR_NUM=0x2207
  193. +CONFIG_USB_GADGET_PRODUCT_NUM=0x330a
  194. +CONFIG_USB_FUNCTION_ROCKUSB=y
  195. CONFIG_USB_HOST_ETHER=y
  196. CONFIG_USB_ETHER_ASIX=y
  197. CONFIG_USB_ETHER_ASIX88179=y
  198. CONFIG_USB_ETHER_MCS7830=y
  199. CONFIG_USB_ETHER_RTL8152=y
  200. CONFIG_USB_ETHER_SMSC95XX=y
  201. -CONFIG_SPL_TINY_MEMSET=y
  202. +CONFIG_DM_VIDEO=y
  203. +CONFIG_DISPLAY=y
  204. +CONFIG_VIDEO_ROCKCHIP=y
  205. +CONFIG_DISPLAY_ROCKCHIP_HDMI=y
  206. CONFIG_ERRNO_STR=y
  207. diff --git a/drivers/core/lists.c b/drivers/core/lists.c
  208. index a1f828463ecd..5697e77be419 100644
  209. --- a/drivers/core/lists.c
  210. +++ b/drivers/core/lists.c
  211. @@ -6,6 +6,7 @@
  212. * Marek Vasut <[email protected]>
  213. */
  214.  
  215. +#define DEBUG
  216. #include <common.h>
  217. #include <errno.h>
  218. #include <dm/device.h>
  219. diff --git a/drivers/core/root.c b/drivers/core/root.c
  220. index e85643819e7b..06f3e2385ba9 100644
  221. --- a/drivers/core/root.c
  222. +++ b/drivers/core/root.c
  223. @@ -6,6 +6,7 @@
  224. * Pavel Herrmann <[email protected]>
  225. */
  226.  
  227. +#define DEBUG
  228. #include <common.h>
  229. #include <errno.h>
  230. #include <fdtdec.h>
  231. diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
  232. index 085f7b896884..7868d81ab652 100644
  233. --- a/drivers/usb/dwc3/gadget.c
  234. +++ b/drivers/usb/dwc3/gadget.c
  235. @@ -13,6 +13,7 @@
  236. * commit 8e74475b0e : usb: dwc3: gadget: use udc-core's reset notifier
  237. */
  238.  
  239. +#define DEBUG
  240. #include <common.h>
  241. #include <malloc.h>
  242. #include <asm/dma-mapping.h>
  243. diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c
  244. index c7e762374752..c2d47d256799 100644
  245. --- a/drivers/usb/gadget/composite.c
  246. +++ b/drivers/usb/gadget/composite.c
  247. @@ -5,7 +5,7 @@
  248. * Copyright (C) 2006-2008 David Brownell
  249. * U-Boot porting: Lukasz Majewski <[email protected]>
  250. */
  251. -#undef DEBUG
  252. +#define DEBUG
  253.  
  254. #include <linux/bitops.h>
  255. #include <linux/usb/composite.h>
  256. diff --git a/drivers/usb/gadget/f_rockusb.c b/drivers/usb/gadget/f_rockusb.c
  257. index 1cfeabcd31ae..6f5e99239ce7 100644
  258. --- a/drivers/usb/gadget/f_rockusb.c
  259. +++ b/drivers/usb/gadget/f_rockusb.c
  260. @@ -4,6 +4,7 @@
  261. *
  262. * Eddie Cai <[email protected]>
  263. */
  264. +#define DEBUG
  265. #include <config.h>
  266. #include <common.h>
  267. #include <env.h>
  268. diff --git a/drivers/usb/gadget/g_dnl.c b/drivers/usb/gadget/g_dnl.c
  269. index e9e1600a1a50..8a0d30a5abe9 100644
  270. --- a/drivers/usb/gadget/g_dnl.c
  271. +++ b/drivers/usb/gadget/g_dnl.c
  272. @@ -6,6 +6,7 @@
  273. * Lukasz Majewski <[email protected]>
  274. */
  275.  
  276. +#define DEBUG
  277. #include <common.h>
  278. #include <malloc.h>
  279.  
  280. diff --git a/drivers/video/rockchip/rk3399_hdmi.c b/drivers/video/rockchip/rk3399_hdmi.c
  281. index a62be9832750..b42444ae9f08 100644
  282. --- a/drivers/video/rockchip/rk3399_hdmi.c
  283. +++ b/drivers/video/rockchip/rk3399_hdmi.c
  284. @@ -3,6 +3,7 @@
  285. * Copyright (c) 2017 Theobroma Systems Design und Consulting GmbH
  286. */
  287.  
  288. +#define DEBUG
  289. #include <common.h>
  290. #include <clk.h>
  291. #include <display.h>
  292. diff --git a/drivers/video/rockchip/rk3399_vop.c b/drivers/video/rockchip/rk3399_vop.c
  293. index 81c122d7a9ee..d88388fec828 100644
  294. --- a/drivers/video/rockchip/rk3399_vop.c
  295. +++ b/drivers/video/rockchip/rk3399_vop.c
  296. @@ -5,6 +5,7 @@
  297. * Copyright 2014 Rockchip Inc.
  298. */
  299.  
  300. +#define DEBUG
  301. #include <common.h>
  302. #include <display.h>
  303. #include <dm.h>
  304. diff --git a/drivers/video/rockchip/rk_edp.c b/drivers/video/rockchip/rk_edp.c
  305. index 4330725a2513..3c49d4671d19 100644
  306. --- a/drivers/video/rockchip/rk_edp.c
  307. +++ b/drivers/video/rockchip/rk_edp.c
  308. @@ -17,6 +17,7 @@
  309. #include <asm/arch-rockchip/clock.h>
  310. #include <asm/arch-rockchip/edp_rk3288.h>
  311. #include <asm/arch-rockchip/grf_rk3288.h>
  312. +#include <asm/arch-rockchip/hardware.h>
  313. #include <dt-bindings/clock/rk3288-cru.h>
  314.  
  315. #define MAX_CR_LOOP 5
  316. diff --git a/drivers/video/rockchip/rk_hdmi.c b/drivers/video/rockchip/rk_hdmi.c
  317. index 5b44a7e8c97d..8f06f43645f8 100644
  318. --- a/drivers/video/rockchip/rk_hdmi.c
  319. +++ b/drivers/video/rockchip/rk_hdmi.c
  320. @@ -5,6 +5,7 @@
  321. * Copyright 2014 Rockchip Inc.
  322. */
  323.  
  324. +#define DEBUG
  325. #include <common.h>
  326. #include <clk.h>
  327. #include <display.h>
  328. diff --git a/drivers/video/rockchip/rk_lvds.c b/drivers/video/rockchip/rk_lvds.c
  329. index cf5c0439b1ad..7d0381ea4293 100644
  330. --- a/drivers/video/rockchip/rk_lvds.c
  331. +++ b/drivers/video/rockchip/rk_lvds.c
  332. @@ -15,6 +15,7 @@
  333. #include <asm/arch-rockchip/clock.h>
  334. #include <asm/arch-rockchip/lvds_rk3288.h>
  335. #include <asm/arch-rockchip/grf_rk3288.h>
  336. +#include <asm/arch-rockchip/hardware.h>
  337. #include <dt-bindings/clock/rk3288-cru.h>
  338. #include <dt-bindings/video/rk3288.h>
  339.  
  340. diff --git a/drivers/video/rockchip/rk_vop.c b/drivers/video/rockchip/rk_vop.c
  341. index b56c3f336c99..85db11409fbc 100644
  342. --- a/drivers/video/rockchip/rk_vop.c
  343. +++ b/drivers/video/rockchip/rk_vop.c
  344. @@ -3,7 +3,7 @@
  345. * Copyright (c) 2015 Google, Inc
  346. * Copyright 2014 Rockchip Inc.
  347. */
  348. -
  349. +#define DEBUG
  350. #include <common.h>
  351. #include <clk.h>
  352. #include <display.h>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement