board: ti: j721s2: 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 <a-nandan@ti.com>
This commit is contained in:
Apurva Nandan 2023-10-07 04:29:41 +05:30 committed by Udit Kumar
parent 4c83cf7017
commit d24c5c55b4
1 changed files with 11 additions and 0 deletions

View File

@ -375,6 +375,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_J721S2_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)
{
}