]>
Commit | Line | Data |
---|---|---|
731fd50e MV |
1 | /* SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause */ |
2 | /* | |
3 | * Copyright (C) 2020 Marek Vasut <[email protected]> | |
4 | * | |
5 | * Configuration settings for the DH STM32MP15x SoMs | |
6 | */ | |
7 | ||
c67ca25d PD |
8 | #ifndef __CONFIG_STM32MP15_DH_DHSOM_H__ |
9 | #define __CONFIG_STM32MP15_DH_DHSOM_H__ | |
731fd50e | 10 | |
e1d7b0b9 | 11 | /* PHY needs a longer autoneg timeout */ |
e1d7b0b9 | 12 | |
3919aa17 | 13 | #ifdef CONFIG_SPL_BUILD |
82f5942e | 14 | #define CFG_EXTRA_ENV_SETTINGS \ |
3919aa17 MV |
15 | "dfu_alt_info_ram=u-boot.itb ram " \ |
16 | __stringify(CONFIG_SPL_LOAD_FIT_ADDRESS) \ | |
17 | " 0x800000\0" | |
18 | #endif | |
19 | ||
82f5942e | 20 | #define STM32MP_BOARD_EXTRA_ENV \ |
dbfe77a5 MV |
21 | "dh_update_sd_to_emmc=" /* Install U-Boot from SD to eMMC */ \ |
22 | "setexpr loadaddr1 ${loadaddr} + 0x1000000 && " \ | |
23 | "load mmc 0:4 ${loadaddr1} boot/u-boot-spl.stm32 && " \ | |
24 | "setexpr sblkcnt ${filesize} + 0x1ff && " \ | |
25 | "setexpr sblkcnt ${sblkcnt} / 0x200 && " \ | |
26 | "load mmc 0:4 ${loadaddr} boot/u-boot.itb && " \ | |
27 | "setexpr ublkcnt ${filesize} + 0x1ff && " \ | |
28 | "setexpr ublkcnt ${ublkcnt} / 0x200 && " \ | |
29 | "mmc partconf 1 1 1 1 && mmc dev 1 1 && " \ | |
30 | "mmc write ${loadaddr1} 0 ${sblkcnt} && " \ | |
31 | "mmc dev 1 2 && " \ | |
32 | "mmc write ${loadaddr1} 0 ${sblkcnt} && " \ | |
33 | "mmc dev 1 && " \ | |
34 | "gpt write mmc 1 'name=ssbl,size=2MiB' && " \ | |
35 | "mmc write ${loadaddr} 0x22 ${ublkcnt} && " \ | |
36 | "mmc partconf 1 1 1 0 && " \ | |
37 | "setenv loadaddr1 && " \ | |
38 | "setenv sblkcnt && " \ | |
39 | "setenv ublkcnt\0" \ | |
2ea4f974 | 40 | "dh_update_sd_to_sf=" /* Erase SPI NOR and install U-Boot from SD */ \ |
44beea28 MV |
41 | "setexpr loadaddr1 ${loadaddr} + 0x1000000 && " \ |
42 | "load mmc 0:4 ${loadaddr1} /boot/u-boot-spl.stm32 && " \ | |
43 | "env set filesize1 ${filesize} && " \ | |
44 | "load mmc 0:4 ${loadaddr} /boot/u-boot.itb && " \ | |
45 | "sf probe && sf erase 0 0x200000 && " \ | |
46 | "sf update ${loadaddr1} 0 ${filesize1} && " \ | |
47 | "sf update ${loadaddr1} 0x40000 ${filesize1} && " \ | |
48 | "sf update ${loadaddr} 0x80000 ${filesize} && " \ | |
2ea4f974 | 49 | "env set filesize1 && env set loadaddr1\0" \ |
82f5942e MV |
50 | "stdin=serial\0" \ |
51 | "stdout=serial\0" \ | |
52 | "stderr=serial\0" \ | |
53 | "update_sf=run dh_update_sd_to_sf\0" \ | |
54 | "usb_pgood_delay=1000\0" | |
2ea4f974 | 55 | |
e8e66801 | 56 | |
c67ca25d | 57 | #include <configs/stm32mp15_common.h> |
731fd50e | 58 | |
731fd50e | 59 | #endif |