colibri-imx6ull: add emmc variant
Add code to build the eMMC variant of the Colibri iMX6ULL, i.e. the
'Colibri iMX6ULL 1GB' which has a eMMC instead of the raw NAND used
on other SKUs.
Related-to: ELB-4056, ELB-4057
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
diff --git a/board/toradex/colibri-imx6ull/Kconfig b/board/toradex/colibri-imx6ull/Kconfig
index e5e4af3..9fbc30f 100644
--- a/board/toradex/colibri-imx6ull/Kconfig
+++ b/board/toradex/colibri-imx6ull/Kconfig
@@ -1,5 +1,24 @@
if TARGET_COLIBRI_IMX6ULL
+choice
+ prompt "Colibri iMX6ULL variant"
+ optional
+
+config TARGET_COLIBRI_IMX6ULL_NAND
+ bool "Support Colibri iMX6ULL 256MB / 512MB (raw NAND) modules"
+ imply NAND_MXS
+ help
+ Choose this option if you build for a Toradex Colibri iMX6ULL
+ 256MB or 512MB module which do have raw NAND on-module.
+
+config TARGET_COLIBRI_IMX6ULL_EMMC
+ bool "Support Colibri iMX6ULL 1GB (eMMC) modules"
+ help
+ Choose this option if you build for a Toradex Colibri iMX6ULL
+ 1GB module which does have eMMC on-module.
+
+endchoice
+
config SYS_BOARD
default "colibri-imx6ull"
@@ -7,11 +26,16 @@
default "toradex"
config SYS_CONFIG_NAME
- default "colibri-imx6ull"
+ default "colibri-imx6ull-tezi-recovery" if (!TARGET_COLIBRI_IMX6ULL_NAND && !TARGET_COLIBRI_IMX6ULL_EMMC)
config TDX_CFG_BLOCK
default y
+if TARGET_COLIBRI_IMX6ULL_NAND
+
+config SYS_CONFIG_NAME
+ default "colibri-imx6ull"
+
config TDX_HAVE_NAND
default y
@@ -21,6 +45,28 @@
config TDX_CFG_BLOCK_OFFSET2
default "133120"
+endif
+
+if TARGET_COLIBRI_IMX6ULL_EMMC
+
+config SYS_CONFIG_NAME
+ default "colibri-imx6ull"
+
+config TDX_HAVE_MMC
+ default y
+
+config TDX_CFG_BLOCK_DEV
+ default "0"
+
+config TDX_CFG_BLOCK_PART
+ default "1"
+
+# Toradex config block in eMMC, at the end of 1st "boot sector"
+config TDX_CFG_BLOCK_OFFSET
+ default "-512"
+
+endif
+
config TDX_CFG_BLOCK_2ND_ETHADDR
default y