<levd>
hi all, I'm trying the U-Boot v2019.10 version. After getting tired of plugging out and in of SD cards each time recompiling U-Boot, I'm in despair needing the rockusb mode.
<levd>
However, it is not easy to setup obviously. Run "rockusb 0 mmc 1" got "No USB device found\nUSB init failed: -19"
<levd>
After checking the code, it failed at "usb_gadget_initialize(controller_index);" which failed uclass_get_device_by_seq(UCLASS_USB_GADGET_GENERIC, index, &dev) and uclass_get_device(UCLASS_USB_GADGET_GENERIC, index, &dev).
<levd>
I run "dm uclass", showing no devices under "uclass 89: usb".
<levd>
Really got stuck at the U-Boot device model. I grep the source code, finding the driver dwc3_generic_peripheral defines the driver of uclass UCLASS_USB_GADGET_GENERIC. But what device does the driver match? I'm really clueless.
<levd>
Would anyone shed some light on this?
<levd>
kevery: I find no defconfig of rockchip boards using rockusb. Some boards are not entering MaskRom mode easily. How did you guys do U-Boot maindevelopment in that situation?
<kevery>
levd: some board enable rockusb in Kconfig instead of defconfig file. It will be better to enable recovery button to enter rockusb mode in U-Boot, but many boards do not have good support for this feature. Rockchip vendor U-Boot support this feature for most of boards.
<kevery>
If the board not easy to enter MaskRom mode, you can try to :
<kevery>
2. if the U-Boot works, use 'emmc erase' cmd to erase data at 0x40 to force the chip enter Maskrom mode.
<kevery>
3. use 'ums' cmd in U-Boot to update file system based image.
<kevery>
1. use SD card instead(always make SD card has higher priority than eMMC at SPL or miniloader);
return0e has joined #linux-rockchip
return0e has quit [Ping timeout: 265 seconds]
<levd>
Thanks kevery, the tips are very useful. I'll make a comparison between vendor and mainline to figure rockusb out.
nsaenz has quit [Remote host closed the connection]
nsaenz has joined #linux-rockchip
vstehle has joined #linux-rockchip
nsaenz has quit [Remote host closed the connection]
nsaenz has joined #linux-rockchip
nsaenz has quit [Max SendQ exceeded]
return0e has joined #linux-rockchip
return0e has quit [Ping timeout: 268 seconds]
aballier has quit [Ping timeout: 245 seconds]
drrty has quit [Ping timeout: 245 seconds]
<levd>
kevery: port some code from vendor u-boot to `evb-rk3399.c`, and turn on some DEBUG, the `rockusb 0 mmc 1` seems to have enter the loop. Yet the PC host does not see the gadget.