Skip to content

board: samsung: e850-96: Support USB boot

Sam Protsenko u-boot 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest6 patches 2 repliesIn review
  2. v25 patches 0 repliesSuperseded
  3. v15 patches 1 replySuperseded

Changes in v3 from the cover letter

- Added PATCH #6 (enter DFU automatically on USB boot)
- Rebased on top of the most recent master

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6board: samsung: e850-96: Keep public functions togetherboard/samsung/e850-96/e850-96.c+10 -100 replies
2/6board: samsung: e850-96: Add routines for checking boot devboard/samsung/e850-96/Makefile board/samsung/e850-96/bootdev.c board/samsung/e850-96/bootdev.h+123 -10 replies
3/6board: samsung: e850-96: Split LDFW loading and initboard/samsung/e850-96/e850-96.c board/samsung/e850-96/fw.c board/samsung/e850-96/fw.h+34 -150 replies
4/6board: samsung: e850-96: Add routine for loading images over USBboard/samsung/e850-96/fw.c board/samsung/e850-96/fw.h+39 -70 replies
5/6board: samsung: e850-96: Load firmwares over USB on USB bootboard/samsung/e850-96/e850-96.c+34 -20 replies
6/6board: samsung: e850-96: Enter DFU automatically on USB bootboard/samsung/e850-96/e850-96.c+6 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH v3 0/6] board: samsung: e850-96: Support USB boot

When U-Boot is executed during USB boot [1,2] on E850-96 board, two issues happen:

1. eMMC fails to initialize
2. Attempt to use USB PHY driver leads to abort

It was identified that issue #1 happens due to enalbed Flash Memory Protector bits in MMC block registers during USB boot, and it's handled in patch series [3].

Issue #2 on the other hand happens because ROM code expects the bootloader (U-Boot) to download remaining binaries (LDFW and TZSW) over USB using SMC calls. Before that, the access to USB blocks (USB PHY and DWC3) is disabled, probably because corresponding TrustZone domains are configured for access from Secure World only.

This patch series implements downloading LDFW and TZSW firmware over USB during USB boot, which makes it possible to use U-Boot for flashing images to eMMC using fastboot and DFU protocols. That in turn simplifies the U-Boot development, as one can use `dltool' [1] to run U-Boot binary during USB boot, and update U-Boot on eMMC this way (e.g. using DFU). It's not possible when using LittleKernel bootloader, as it expects non-standard Samsung GPT partition, but in case of U-Boot we use the regular one.

Once this patch series and patch series [3] are applied it'll be possible to use U-Boot during USB boot. The two series are independent of each other, and can be applied in any particular order.

Changes in v3:
- Added PATCH #6 (enter DFU automatically on USB boot)
- Rebased on top of the most recent master

Changes in v2:
- PATCH #4: Return 0 on success in load_image_usb()

[1] https://gitlab.com/LinaroLtd/e850-96/tools/dltool
[2] https://docs.u-boot.org/en/latest/board/samsung/e850-96.html
[3] https://lore.kernel.org/u-boot/[email protected]/

Sam Protsenko (6):
board: samsung: e850-96: Keep public functions together
board: samsung: e850-96: Add routines for checking boot dev
board: samsung: e850-96: Split LDFW loading and init
board: samsung: e850-96: Add routine for loading images over USB
board: samsung: e850-96: Load firmwares over USB on USB boot
board: samsung: e850-96: Enter DFU automatically on USB boot

 board/samsung/e850-96/Makefile  |  2 +-
 board/samsung/e850-96/bootdev.c | 99 +++++++++++++++++++++++++++++++++
 board/samsung/e850-96/bootdev.h | 23 ++++++++
 board/samsung/e850-96/e850-96.c | 71 ++++++++++++++++++-----
 board/samsung/e850-96/fw.c      | 76 ++++++++++++++++++-------
 board/samsung/e850-96/fw.h      | 10 +++-
 6 files changed, 246 insertions(+), 35 deletions(-)
 create mode 100644 board/samsung/e850-96/bootdev.c
 create mode 100644 board/samsung/e850-96/bootdev.h

base-commit: 91861e5a30d217d8e70130c9124c1646f4afef29

Signature · 1 line
2.47.3