[0/8] imx8mm: Add serial download support
mbox series

Message ID 20220520082623.1788887-1-tommaso.merciai@amarulasolutions.com
Headers show
Series
  • imx8mm: Add serial download support
Related show

Message

Tommaso Merciai May 20, 2022, 8:26 a.m. UTC
This series brings USB gadget support for i.MX8MM
and allows the usage of the Serial Download Protocol,
which is a convenient way for loading U-Boot via the 
'uuu' tool and and flashing the eMMC via the U-Boot 
'ums' command.

Tested on board based on iMX8MM SOC:

--------------------------------------------------------------------------------
U-Boot SPL 2022.04-00114-gd04ac0fd3a-dirty (May 20 2022 - 10:12:08 +0200)

DEBUG
Normal Boot
WDT:   Started watchdog@30280000 with servicing (60s timeout)
Trying to boot from USB SDP
SDP: initialize...
SDP: handle requests...
Downloading file of size 2366576 to 0x40400000... done
Jumping to header at 0x40400000
Header Tag is not an IMX image
Found header at 0x4041e1a0
NOTICE:  BL31: v2.2(release):android-11.0.0_1.2.0-rc2-0-gcb435ee78
NOTICE:  BL31: Built : 16:43:13, Feb  1 2022

welcome to lk/MP

boot args 0x2000000 0xbe000000 0x2000 0x0
initializing trusty (Built: 12:13:25 Nov 19 2020)
Initializing Trusted OS SMC handler
avb: Initializing AVB App
hwcrypto: Initializing
caam_drv: 318: job failed (0x2000055b)
trusty_gatekeeper: Initializing
hwrng_caam: Init HWRNG service provider
hwrng_srv: Start HWRNG service
hwcrypto_caam: Init HWCRYPTO service provider
hwcrypto_srv: Start HWCRYPTO service
hwkey_caam: Init HWKEY service provider
hwkey_caam: 183: Invalid magic, unpack key package fail.
hwkey_srv: Start HWKEY service
hwcrypto: enter main event loop


U-Boot 2022.04-00114-gd04ac0fd3a-dirty (May 20 2022 - 10:12:08 +0200)

CPU:   Freescale i.MX8MMQ rev1.0 at 1200 MHz
Reset cause: POR
Model: FSL i.MX8MM EVK board
DRAM:  2 GiB
--------------------------------------------------------------------------------

References:
 - https://patchwork.ozlabs.org/project/uboot/list/?series=251796&state=*
 - https://www.mail-archive.com/u-boot@lists.denx.de/msg410536.html

Tommaso Merciai (8):
  configs: imx8mm: imx8mm-evk: add usb defines necessary for ehci-hcd
    usb driver
  imx8mm: Fix USB reg addresses for i.MX8MM
  clock_imx8mm: Add enable_usboh3_clk() for i.MX8M
  usb: ehci-mx6: move mode set/detect to probe
  usb: ehci-mx6: Allow building SDP for imx8mm
  imx8mm_evk: Add an entry for USB boot
  imx8mm_evk: Add Serial Download Protocol support
  doc: imx8mm_evk: Add instructions for eMMC boot

 arch/arm/include/asm/arch-imx8m/clock.h    |  1 +
 arch/arm/include/asm/arch-imx8m/imx-regs.h | 22 +++++++
 arch/arm/mach-imx/imx8m/clock_imx8mm.c     | 16 ++++++
 board/freescale/imx8mm_evk/spl.c           |  2 +
 configs/imx8mm_evk_defconfig               | 21 +++++++
 doc/board/nxp/imx8mm_evk.rst               | 42 ++++++++++++--
 drivers/usb/host/ehci-mx6.c                | 67 ++++++++--------------
 include/configs/imx8mm_evk.h               |  6 ++
 8 files changed, 129 insertions(+), 48 deletions(-)