[RFC WIP PATCH v1 4/7] wandboard: enable CONFIG_DTB_RESELECT

Heiko Schocher hs at denx.de
Tue Jan 14 07:13:11 CET 2020


we have to reselect the DTB, as we need to start
with DTB for revision D1 boards, as there is
a PMIC which is not on other board revisions.
If we do not find the PMIC, we are not on D1
revision board.

Signed-off-by: Heiko Schocher <hs at denx.de>
---

 board/wandboard/wandboard.c | 21 +++++++++++++++++++++
 configs/wandboard_defconfig |  1 +
 2 files changed, 22 insertions(+)

diff --git a/board/wandboard/wandboard.c b/board/wandboard/wandboard.c
index 4cb9bf6f8c2..ae4ad765a83 100644
--- a/board/wandboard/wandboard.c
+++ b/board/wandboard/wandboard.c
@@ -510,3 +510,24 @@ int board_fit_config_name_match(const char *name)
 	return -EINVAL;
 }
 #endif
+
+#if !defined(CONFIG_SPL_BUILD)
+#ifdef CONFIG_DTB_RESELECT
+/*
+ * we have to reselect the DTB, as we need to start
+ * with DTB for revision D1 boards, as there is
+ * a PMIC which is not on other board revisions.
+ * If we do not find the PMIC, we are not on D1
+ * revision board.
+ */
+int embedded_dtb_select(void)
+{
+	int rescan;
+
+	power_init_board();
+	fdtdec_resetup(&rescan);
+
+	return 0;
+}
+#endif
+#endif
diff --git a/configs/wandboard_defconfig b/configs/wandboard_defconfig
index d6bde4bf28b..b8ed143ee99 100644
--- a/configs/wandboard_defconfig
+++ b/configs/wandboard_defconfig
@@ -44,6 +44,7 @@ CONFIG_CMD_EXT4_WRITE=y
 CONFIG_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE="imx6dl-wandboard-revb1"
 CONFIG_OF_LIST="imx6q-wandboard-revb1 imx6qp-wandboard-revd1 imx6dl-wandboard-revb1 imx6q-wandboard-revd1 imx6dl-wandboard-revd1"
+CONFIG_DTB_RESELECT=y
 CONFIG_MULTI_DTB_FIT=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-- 
2.24.1



More information about the U-Boot mailing list