From: Vignesh Raghavendra Date: Thu, 13 Aug 2020 09:26:16 +0000 (+0530) Subject: board: ti: j721e: Add support for HyperFlash detection X-Git-Url: http://git.dujemihanovic.xyz/img/sics.gif?a=commitdiff_plain;h=e85382fc53cbcd3a348815016b71af7e7542f18e;p=u-boot.git board: ti: j721e: Add support for HyperFlash detection On J7200 SoC OSPI and HypeFlash are muxed at HW level and only one of them can be used at any time. J7200 EVM has both HyperFlash and OSPI flash on board. There is a user switch (SW3.1) that can be toggled to select OSPI flash vs HyperFlash. Read the state of this switch via wkup_gpio0_6 line and fixup the DT nodes to select OSPI vs HyperFlash Signed-off-by: Vignesh Raghavendra --- diff --git a/board/ti/j721e/evm.c b/board/ti/j721e/evm.c index ebaa6faa93..7925b76ab7 100644 --- a/board/ti/j721e/evm.c +++ b/board/ti/j721e/evm.c @@ -117,6 +117,13 @@ static void __maybe_unused detect_enable_hyperflash(void *blob) } #endif +#if defined(CONFIG_SPL_BUILD) && defined(CONFIG_TARGET_J7200_A72_EVM) +void spl_perform_fixups(struct spl_image_info *spl_image) +{ + detect_enable_hyperflash(spl_image->fdt_addr); +} +#endif + #if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) int ft_board_setup(void *blob, struct bd_info *bd) {