u-boot/arch
Patrick Delaunay 954bd1a923 stm32mp: add the command stm32prog
Add a specific command stm32prog for STM32MP soc family
witch allows to program the boot devices with the tool
STM32CubeProgrammer (http://www.st.com/STM32CubeProg).

This command uses the same UART STM32 protocol than MCU
STM32 with or USB with DFU protocol v1.1 (ithe MCU ST
extension are no supported).

The executed actions are based on a tab separated value file
with a stm32 header, the FlashLayout file
(https://wiki.st.com/stm32mpu/wiki/STM32CubeProgrammer_flashlayout).

This file is parsed by the U-Boot command to:
- initialize the devices
- create the partition table on each device
- initialize the DFU backend to access to not volatile memory
  (NOR/NAND/SD/eMMC) or to virtual device (OTP/PMIC)

Up to STM32PROG_MAX_DEV (5) devices can be updated with a FlashLayout.

The communication between U-Boot and STM32CubeProgrammer is done with
the specific alternate configuration (see "AN5275: USB DFU/USART protocols
used in STM32MP1 Series bootloaders" for details).

The command stm32prog is executed when a boot from USB is detected
(selected with bootpins) and we can program the boot devices with
a simple command (on Windows or Linux):

PC $>  STM32_Programmer_CLI -c port=usb1 -w flaslayout.tsv

1/ the ROM code loads TF-A in embedded RAM (DFU or uart)
2/ TF-A loads flashlayout file and U-Boot in DDR (DFU or uart)
3/ U-Boot executes the stm32prog command (DFU or uart)

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
2020-05-14 09:02:12 +02:00
..
arc ARC: AXS10x: cleanup kconfig 2020-04-27 15:04:42 +03:00
arm stm32mp: add the command stm32prog 2020-05-14 09:02:12 +02:00
m68k kconfig / kbuild: Re-sync with Linux 4.19 2020-04-10 11:18:32 -04:00
microblaze Kconfig: Remove redundant variable sets 2020-03-16 16:42:50 -04:00
mips mips: Add support for SoM "VoCore2". 2020-04-27 20:30:14 +02:00
nds32 dma-mapping: move dma_map_(un)single() to <linux/dma-mapping.h> 2020-02-19 21:27:30 +08:00
nios2 common: Move hang() to the same header as panic() 2020-01-24 23:06:49 +05:30
powerpc powerpc: dts: p1010: add i2c node 2020-05-04 09:12:37 +05:30
riscv sifive: fu540: Enable spi-nor flash support 2020-04-30 22:34:20 +05:30
sandbox test: dm: update test for open-drain/open-source emulation in gpio-uclass 2020-05-11 15:12:56 +02:00
sh dma-mapping: add <asm/dma-mapping.h> for all architectures 2020-02-20 15:09:54 +08:00
x86 x86: coreboot: Allow building an SPL image 2020-05-04 15:28:28 +08:00
xtensa dma-mapping: add <asm/dma-mapping.h> for all architectures 2020-02-20 15:09:54 +08:00
.gitignore
Kconfig sandbox: implement ft_board_setup() 2020-04-16 08:07:58 -06:00
u-boot-elf.lds arch: Add explicit linker script for u-boot-elf 2020-04-03 11:52:55 -04:00