MLK-22357-2 sdp/fastboot: Add board_usb_gadget_port_auto() to autodetect the connecte...
authorSherry Sun <sherry.sun@nxp.com>
Fri, 2 Aug 2019 17:58:03 +0000 (13:58 -0400)
committerYe Li <ye.li@nxp.com>
Thu, 29 Apr 2021 07:56:29 +0000 (00:56 -0700)
commitf680079db70dfb53a96dbafe0b3f6bf8f3f6ca42
tree8f48cc37ef9907117421775f18b7841c949f1350
parentd2fe116607c4f7c462de497e66b2a5c9c9f1ea8e
MLK-22357-2 sdp/fastboot: Add board_usb_gadget_port_auto() to autodetect the connected usb port

On imx8 platform, the usb2 and usb3 ports are both supported. Which
means we can use usb2(ci_udc_otg) and usb3(cdns3_generic_peripheral)
gadget driver to run sdp/fastboot/ums at the same time.

For sdp and the fastboot that runs automatically when uboot starts,
board_usb_gadget_port_auto() is added to autodetect usb port, this
means that we don't have to specify which USB port should be used to
download in code, now we can just connect either usb port then it
will download automatically.

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
(cherry picked from commit 2b6fd3da6fffae0732e8e91ef5c1f870ea393ca9)
(cherry picked from commit 7c8e0606ea4aaeceae1f1d1e17db1503ac9f841e)
arch/arm/mach-imx/imx8/cpu.c
cmd/fastboot.c
common/spl/spl_sdp.c
drivers/usb/gadget/g_dnl.c
include/configs/imx_env.h
include/g_dnl.h