When an i.MX board is booted in USB serial download mode, the host
(typically uuu) expects U-Boot to enter fastboot so that it can go on
to flash the board. Support for this is duplicated and inconsistent
across different boards.

This series adds a common handler to introduce consistent behaviour:
when booting over USB, launch fastboot mode (after the usual
interruptible timeout) without checking if bootable devices are
available. After the fastboot session ends, continue the usual boot
flow, which will result in any newly flashed OS being booted. The
handler acts as a soft-default: it will not take effect if bootcmd was
customised by the user or the board code.

In addition to standardising behaviour over existing boards with
fastboot behaviour, this generic handler will introduce this automatic
fastboot behaviour on boards that enable USB fastboot but have no USB
boot handling of their own:

  i.MX9:  Variscite i.MX93 VAR-SOM, Toradex Aquila, SMARC and Verdin
          i.MX95
  i.MX8M: NXP i.MX8MP EVK, Toradex Verdin i.MX8MM/i.MX8MP and SMARC
          i.MX8MP, Variscite i.MX8MN VAR-SOM, DH i.MX8MP, Data Modul
          i.MX8M

I also remove now-redundant board specific code from the i.MX9 family of
boards. If this is accepted I'll follow up with similar cleanup of the
i.MX8 boards.

Tested on FRDM-IMX93 (I don't have any other affected hardware
available).
 

---
Daniel Drake (4):
      imx: enter fastboot on USB serial download boot
      imx93_frdm: drop board-specific USB boot fastboot handling
      board: phytec: phycore-imx91-93: use common USB boot fastboot handling
      board: kontron: osm-s-mx93: use common USB boot fastboot handling

 arch/arm/mach-imx/Makefile                       |  6 ++++
 arch/arm/mach-imx/usb_boot.c                     | 45 ++++++++++++++++++++++++
 board/kontron/osm-s-mx93/osm-s-mx93.c            |  5 ---
 board/nxp/imx93_frdm/imx93_frdm.c                |  5 ---
 board/nxp/imx93_frdm/imx93_frdm.env              |  4 ---
 board/phytec/phycore_imx91_93/phycore-imx91-93.c |  5 ---
 6 files changed, 51 insertions(+), 19 deletions(-)
---
base-commit: ab4dc5aacf957835c295b59ef2dd28281839cb20
change-id: 20261103-imx-usb-boot-fastboot-16965fa8e5d6

Best regards,
-- 
Daniel Drake <[email protected]>

Reply via email to