summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPatrice Chotard <patrice.chotard@st.com>2019-05-02 18:07:14 +0200
committerPatrice Chotard <patrice.chotard@st.com>2019-06-06 17:40:12 +0200
commit87471649a561404a36e9e854d45be95d1599b1c0 (patch)
treee0e5e34eca0426dc5cb429881ffffac657f0a745 /include
parentc4a739ad50f59a8b924c99b46aec7d31bb26d125 (diff)
stm32mp1: support dynamic MTDPARTS
This patch configure the default value for mtdids and mtparts dynamically according the presence of nor and nand in the board device tree Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Signed-off-by: Christophe Kerello <christophe.kerello@st.com> Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Diffstat (limited to 'include')
-rw-r--r--include/configs/stm32mp1.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/configs/stm32mp1.h b/include/configs/stm32mp1.h
index 202c5180aa..a91c15098f 100644
--- a/include/configs/stm32mp1.h
+++ b/include/configs/stm32mp1.h
@@ -102,6 +102,14 @@
#include <config_distro_bootcmd.h>
+#if defined(CONFIG_STM32_QSPI) || defined(CONFIG_NAND_STM32_FMC)
+#define CONFIG_SYS_MTDPARTS_RUNTIME
+#endif
+
+#define STM32MP_MTDPARTS \
+ "mtdparts_nor0=256k(fsbl1),256k(fsbl2),2m(ssbl),-(nor_user)\0" \
+ "mtdparts_nand0=2m(fsbl),2m(ssbl1),2m(ssbl2),-(UBI)\0"
+
/*
* memory layout for 32M uncompressed/compressed kernel,
* 1M fdt, 1M script, 1M pxe and 1M for splashimage
@@ -117,6 +125,7 @@
"fdt_high=0xffffffff\0" \
"initrd_high=0xffffffff\0" \
STM32MP_BOOTCMD \
+ STM32MP_MTDPARTS \
BOOTENV
#endif /* ifndef CONFIG_SPL_BUILD */