summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Agner <stefan.agner@toradex.com>2018-05-01 13:50:59 +0200
committerMax Krummenacher <max.krummenacher@toradex.com>2018-11-29 10:49:37 +0100
commit0798437c661ef3ca11f84fb45b4cce5b7ac145d9 (patch)
treec95cbe27da7e274eb648391fab1943c05e6ecd0c
parentf06fc58f6e30607475dab127cdaa525417022c36 (diff)
tdx-cfg-block: add config block support
Add Toradex config block support for i.MX8QM. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> (cherry picked from commit 18426b50681e6cd64ab5977f0ba84efd3f7c4495) (cherry picked from commit c6d0e1042170d273a5b5434abe867213155d5582) (cherry picked from commit ae31e946da33510a352795de09aa1c0ea9fc8280)
-rw-r--r--board/toradex/apalis-imx8/Kconfig18
-rw-r--r--board/toradex/apalis-imx8/apalis-imx8.c2
-rw-r--r--configs/apalis-imx8_defconfig2
-rw-r--r--include/configs/apalis-imx8.h5
4 files changed, 23 insertions, 4 deletions
diff --git a/board/toradex/apalis-imx8/Kconfig b/board/toradex/apalis-imx8/Kconfig
index 84e4e5157e..c680d63fa1 100644
--- a/board/toradex/apalis-imx8/Kconfig
+++ b/board/toradex/apalis-imx8/Kconfig
@@ -9,4 +9,22 @@ config SYS_VENDOR
config SYS_CONFIG_NAME
default "apalis-imx8"
+config TDX_CFG_BLOCK
+ default y
+
+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"
+
+source "board/toradex/common/Kconfig"
+
endif
diff --git a/board/toradex/apalis-imx8/apalis-imx8.c b/board/toradex/apalis-imx8/apalis-imx8.c
index d653539936..2b5ad9ff43 100644
--- a/board/toradex/apalis-imx8/apalis-imx8.c
+++ b/board/toradex/apalis-imx8/apalis-imx8.c
@@ -28,6 +28,8 @@
#include <asm/arch/video_common.h>
#include <power-domain.h>
+#include "../common/tdx-cfg-block.h"
+
DECLARE_GLOBAL_DATA_PTR;
#define ESDHC_PAD_CTRL ((SC_PAD_CONFIG_NORMAL << PADRING_CONFIG_SHIFT) | (SC_PAD_ISO_OFF << PADRING_LPCONFIG_SHIFT) \
diff --git a/configs/apalis-imx8_defconfig b/configs/apalis-imx8_defconfig
index 296a5326d8..6e7500145e 100644
--- a/configs/apalis-imx8_defconfig
+++ b/configs/apalis-imx8_defconfig
@@ -6,6 +6,8 @@ CONFIG_IMX_BOOTAUX=y
CONFIG_VIDEO=y
CONFIG_DEFAULT_DEVICE_TREE="fsl-imx8qm-apalis"
CONFIG_BOOTDELAY=3
+# CONFIG_DISPLAY_BOARDINFO is not set
+CONFIG_BOARD_EARLY_INIT_F=y
# CONFIG_CMD_IMPORTENV is not set
CONFIG_CMD_MMC=y
CONFIG_CMD_SF=y
diff --git a/include/configs/apalis-imx8.h b/include/configs/apalis-imx8.h
index 34eccd19ca..3df4c7e655 100644
--- a/include/configs/apalis-imx8.h
+++ b/include/configs/apalis-imx8.h
@@ -13,11 +13,8 @@
#define CONFIG_REMAKE_ELF
-#define CONFIG_BOARD_EARLY_INIT_F
#define CONFIG_ARCH_MISC_INIT
-
-/* Flat Device Tree Definitions */
-#define CONFIG_OF_BOARD_SETUP
+#define CONFIG_DISPLAY_BOARDINFO_LATE
#undef CONFIG_CMD_EXPORTENV
#undef CONFIG_CMD_IMPORTENV