From patchwork Tue Jan 14 06:13:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiko Schocher X-Patchwork-Id: 239585 List-Id: U-Boot discussion From: hs at denx.de (Heiko Schocher) Date: Tue, 14 Jan 2020 07:13:11 +0100 Subject: [RFC WIP PATCH v1 4/7] wandboard: enable CONFIG_DTB_RESELECT In-Reply-To: <20200114061314.148491-1-hs@denx.de> References: <20200114061314.148491-1-hs@denx.de> Message-ID: <20200114061314.148491-5-hs@denx.de> 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 --- 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