arm: mach-k3: am6_init: Do USB fixups to facilitate host and device boot modes
authorFaiz Abbas <faiz_abbas@ti.com>
Mon, 3 Aug 2020 06:05:09 +0000 (11:35 +0530)
committerLokesh Vutla <lokeshvutla@ti.com>
Tue, 11 Aug 2020 15:04:46 +0000 (20:34 +0530)
commit403fc5c9cf2c40c85e0c3d0c8bc36244a665cb74
tree3dc51ba06f5c3de72e5354a77ae4cb91a7fa81c9
parentfebb47ac61085d45d8b21a69c31b59b162e82a2a
arm: mach-k3: am6_init: Do USB fixups to facilitate host and device boot modes

U-boot only supports either USB host or device mode for a node at a
time in dts. To support both host and dfu bootmodes, set "peripheral"
as the default dr_mode but fixup property to "host" if host bootmode
is detected.

This needs to happen before the dwc3 generic layer binds the usb device
to a host or device driver. Therefore, add an fdtdec_setup_board()
implementation to fixup the dt based on the boot mode.

Also use the same fixup function to set the USB-PCIe Serdes mux to PCIe
in both the host and device cases. This is required for accessing the
interface at USB 2.0 speeds.

Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
arch/arm/mach-k3/am6_init.c