colibri_imx7_emmc: add Colibri iMX7D 1GB (eMMC) module support
This commit adds support for the Toradex Colibri iMX7D 1GB Computer
on Module. The module is very similar to the Colibri iMX7D 512MB
but uses eMMC instead of raw NAND. This patch introduces a new
board specific Kconfig symbol to select between the two flash
options.
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
diff --git a/board/toradex/colibri_imx7/Kconfig b/board/toradex/colibri_imx7/Kconfig
index 414a600..d33ec63 100644
--- a/board/toradex/colibri_imx7/Kconfig
+++ b/board/toradex/colibri_imx7/Kconfig
@@ -1,5 +1,24 @@
if TARGET_COLIBRI_IMX7
+choice
+ prompt "Colibri iMX7S/D variant"
+
+config TARGET_COLIBRI_IMX7_NAND
+ bool "Support Colibri iMX7 Solo 256MB/Dual 512MB (raw NAND) modules"
+ imply NAND_MXS
+ help
+ Choose this option if you build for a Toradex Colibri iMX7S
+ 256MB or Colibri iMX7D 512MB module which do have raw NAND
+ on-module.
+
+config TARGET_COLIBRI_IMX7_EMMC
+ bool "Support Colibri iMX7 Dual 1GB (eMMC) modules"
+ help
+ Choose this option if you build for a Toradex Colibri iMX7D
+ 1GB module which does have eMMC on-module.
+
+endchoice
+
config SYS_BOARD
default "colibri_imx7"
@@ -19,6 +38,11 @@
config TDX_CFG_BLOCK
default y
+config TDX_CFG_BLOCK_2ND_ETHADDR
+ default y
+
+if TARGET_COLIBRI_IMX7_NAND
+
config TDX_HAVE_NAND
default y
@@ -28,9 +52,25 @@
config TDX_CFG_BLOCK_OFFSET2
default "133120"
-config TDX_CFG_BLOCK_2ND_ETHADDR
+endif
+
+if TARGET_COLIBRI_IMX7_EMMC
+
+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
+
source "board/toradex/common/Kconfig"
endif