USB
conga-QMX6 uses two USB interfaces of i.MX6:
Hardware name | Device name (linux) | Purpose |
---|---|---|
usbotg: usb@2184000 | Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub | Q7: USB_P1, also USB-OTG and used for firmware update |
usbh1: usb@2184200 | Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub | 4 Port USB-Hub is on the module to provide 4 USB ports on edge connector
|
Access from kernel
Check devices:
root@cgtqmx6:~# lsusb
Bus 002 Device 002: ID 0424:2514 Microchip Technology, Inc. (formerly SMSC) USB 2.0 Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Access from u-boot
Check devices:
=> usb reset
=> usb tree
Boot from USB
Copy BSP image to USB drive
Connect USB drive to backplane
Ensure no other device is connected (like SATA disk or other USB pen drive)
Stop at bootloader and configure environment like below:
=> setenv usbdev 0
=> setenv usbpart 1
=> setenv usbroot '/dev/sda1 rootwait rw'
=> setenv usbargs 'setenv bootargs console=${console},${baudrate} earlycon root=${usbroot}'
=> setenv usbloadfdt 'echo Loading ${fdt_file}; load usb ${usbdev}:${usbpart} ${fdt_addr} boot/${fdt_file}'
=> setenv usbloadimage 'echo Loading ${image}; load usb ${usbdev}:${usbpart} ${loadaddr} boot/${image}'
=> setenv usbboot 'echo Booting from usb ...; run usbargs; if test ${tee} = yes; then run usbloadfdt; run usbloadtee; bootm ${tee_addr} - ${fdt_addr}; else if test ${boot_fdt} = yes || test ${boot_fdt} = try; then if run usbloadfdt; then bootm ${loadaddr} - ${fdt_addr}; else if test ${boot_fdt} = try; then bootm; else echo WARN: Cannot load the DT; fi; fi; else bootm; fi;fi;'
=> setenv bootcmd_usb 'run findfdt; if usb start; then if usb dev ${usbdev}; then if run usbloadimage; then run usbboot; fi;fi;fi;'
# save for future reboot
=> setenv bootcmd 'run bootcmd_usb'
=> saveenv
Afterwards boot via "boot" cmd or reset board