From a4e4f38a060f9d8b438d9f845530a35adae8835c Mon Sep 17 00:00:00 2001 From: Apurva Nandan Date: Sat, 7 Oct 2023 04:31:27 +0530 Subject: [PATCH] board: ti: j784s4: Add cadence-qspi flash node selection Add cadence-qspi flash node selection for choosing between OSPI NOR and OSPI NAND flashes put under OSPI0 instance. This is needed for R5 SPL as it is not possible to apply fixup at this stage. Signed-off-by: Apurva Nandan --- board/ti/j784s4/evm.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/board/ti/j784s4/evm.c b/board/ti/j784s4/evm.c index f17b88248f..48e4d70aea 100644 --- a/board/ti/j784s4/evm.c +++ b/board/ti/j784s4/evm.c @@ -238,6 +238,17 @@ int board_late_init(void) return 0; } +ofnode cadence_qspi_get_subnode(struct udevice *dev) +{ + if (IS_ENABLED(CONFIG_SPL_BUILD) && + IS_ENABLED(CONFIG_TARGET_J784S4_R5_EVM)) { + if (spl_boot_device() == BOOT_DEVICE_SPINAND) + return ofnode_by_compatible(dev_ofnode(dev), "spi-nand"); + } + + return dev_read_first_subnode(dev); +} + void spl_board_init(void) { }