summaryrefslogtreecommitdiff
path: root/board/st
diff options
context:
space:
mode:
authorPatrick Delaunay <patrick.delaunay@st.com>2018-03-20 10:54:52 +0100
committerTom Rini <trini@konsulko.com>2018-04-06 20:45:28 -0400
commit0ed232b15386616d186b67a3689e149581dcf2b7 (patch)
treee7d48b767ca22f2754413e569f55d8de8d045aa9 /board/st
parent35a66960cd7358588bd678b4b3dfedb27226fe3e (diff)
stm32mp1: add eMMC support for ED1
Add command GPT support Add EMMC boot support Add the 2 other SDMMC instances for ED1: - SDMMC2 = mmc 1, eMMC on the ED1 board - SDMMC3 = extension connector, deactivated by default Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Diffstat (limited to 'board/st')
-rw-r--r--board/st/stm32mp1/README83
1 files changed, 59 insertions, 24 deletions
diff --git a/board/st/stm32mp1/README b/board/st/stm32mp1/README
index 4adc978d1e..42a39d013e 100644
--- a/board/st/stm32mp1/README
+++ b/board/st/stm32mp1/README
@@ -115,7 +115,31 @@ the supported device trees for stm32mp157 are:
+ FSBL = spl/u-boot-spl.stm32
+ SSBL = u-boot.img
-6. Prepare an SDCard
+6. Switch Setting for Boot Mode
+===============================
+
+You can select the boot mode, on the board ed1 with the switch SW1
+
+ -----------------------------------
+ Boot Mode BOOT2 BOOT1 BOOT0
+ -----------------------------------
+ Reserved 0 0 0
+ NOR 0 0 1
+ SD-Card 1 1 1
+ SD-Card 1 0 1
+ eMMC 0 1 0
+ NAND 0 1 1
+ Recovery 1 1 0
+ Recovery 0 0 0
+
+Recovery is a boot from serial link (UART/USB) and it is used with
+STM32CubeProgrammer tool to load executable in RAM and to update the flash
+devices available on the board (NOR/NAND/eMMC/SDCARD).
+The communication between HOST and board is based on
+- for UARTs : the uart protocol used with all MCU STM32
+- for USB : based on USB DFU 1.1 (without the ST extensions used on MCU STM32)
+
+7. Prepare an SDCard
===================
The minimal requirements for STMP32MP1 boot up to U-Boot are:
@@ -147,13 +171,13 @@ for example: with gpt table with 128 entries
# sgdisk -o /dev/<SDCard dev>
b) create minimal image
- # sgdisk --resize-table=128 -a 1 \
+ # sgdisk --resize-table=128 -a 1 \
-n 1:34:545 -c 1:fsbl1 \
-n 2:546:1057 -c 2:fsbl2 \
-n 3:1058:5153 -c 3:ssbl \
-p /dev/<SDCard dev>
- you can add other partition for kernel (rootfs)
+ you can add other partition for kernel (rootfs for example)
c) copy the FSBL (2 times) and SSBL file on the correct partition.
in this example in partition 1 to 3
@@ -163,29 +187,40 @@ for example: with gpt table with 128 entries
# dd if=u-boot-spl.stm32 of=/dev/mmcblk0p2
# dd if=u-boot.img of=/dev/mmcblk0p3
-7. Switch Setting
-==================
-
-You can select the boot mode, on the board ed1 with the switch SW1
+To boot from SDCard, select BootPinMode = 1 1 1 and reset.
- -----------------------------------
- Boot Mode BOOT2 BOOT1 BOOT0
- -----------------------------------
- Reserved 0 0 0
- NOR 0 0 1
- SD-Card 1 1 1
- SD-Card 1 0 1
- eMMC 0 1 0
- NAND 0 1 1
- Recovery 1 1 0
- Recovery 0 0 0
+8. Prepare eMMC
+===============
+You can use U-Boot to copy binary in eMMC.
+In the next example, you need to boot from SDCARD and the images (u-boot-spl.stm32, u-boot.img)
+are presents on SDCARD (mmc 0) in ext4 partition 4 (bootfs).
To boot from SDCard, select BootPinMode = 1 1 1 and reset.
-Recovery is a boot from serial link (UART/USB) and it is used with
-STM32CubeProgrammer tool to load executable in RAM and to update the flash
-devices available on the board (NOR/NAND/eMMC/SDCARD).
-The communication between HOST and board is based on
-- for UARTs : the uart protocol used with all MCU STM32
-- for USB : based on USB DFU 1.1 (without the ST extensions used on MCU STM32)
+Then you update the eMMC with the next U-Boot command :
+
+a) prepare GPT on eMMC,
+ example with 2 partitions, bootfs and roots:
+
+ # setenv emmc_part "name=ssbl,size=2MiB;name=bootfs,type=linux,bootable,size=64MiB;name=rootfs,type=linux,size=512"
+ # gpt write mmc 1 ${emmc_part}
+
+b) copy SPL on eMMC on firts boot partition
+ (SPL max size is 256kB, with LBA 512, 0x200)
+
+ # ext4load mmc 0:4 0xC0000000 u-boot-spl.stm32
+ # mmc dev 1
+ # mmc partconf 1 1 1 1
+ # mmc write ${fileaddr} 0 200
+ # mmc partconf 1 1 1 0
+
+b) copy U-Boot in first GPT partition of eMMC
+
+ # ext4load mmc 0:4 0xC0000000 u-boot.img
+ # mmc dev 1
+ # part start mmc 1 1 partstart
+ # part size mmc 1 1 partsize
+ # mmc write ${fileaddr} ${partstart} ${partsize}
+
+To boot from eMMC, select BootPinMode = 0 1 0 and reset.