Skip to content

Commit 25cd705

Browse files
ashishnxpAlison Wang
authored andcommitted
board/ls1088: Add fsl_fdt_fixup_flash
IFC-NOR and QSPI-NOR signals are muxed on SoC to save pins Add fsl_fdt_fixup_flash() -To disable IFC-NOR node in dts if QSPI is enabled and vice-versa Signed-off-by: Ashish Kumar <Ashish.Kumar@nxp.com>
1 parent 85bfc58 commit 25cd705

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

board/freescale/ls1088a/ls1088a.c

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,33 @@ void fdt_fixup_board_enet(void *fdt)
491491
#endif
492492

493493
#ifdef CONFIG_OF_BOARD_SETUP
494+
void fsl_fdt_fixup_flash(void *fdt)
495+
{
496+
int offset;
497+
498+
/*
499+
* IFC-NOR and QSPI are muxed on SoC.
500+
* So disable IFC node in dts if QSPI is enabled or
501+
* disable QSPI node in dts in case QSPI is not enabled.
502+
*/
503+
504+
#ifdef CONFIG_FSL_QSPI
505+
offset = fdt_path_offset(fdt, "/soc/ifc/nor");
506+
507+
if (offset < 0)
508+
offset = fdt_path_offset(fdt, "/ifc/nor");
509+
#else
510+
offset = fdt_path_offset(fdt, "/soc/quadspi");
511+
512+
if (offset < 0)
513+
offset = fdt_path_offset(fdt, "/quadspi");
514+
#endif
515+
if (offset < 0)
516+
return;
517+
518+
fdt_status_disabled(fdt, offset);
519+
}
520+
494521
int ft_board_setup(void *blob, bd_t *bd)
495522
{
496523
int err, i;
@@ -517,6 +544,8 @@ int ft_board_setup(void *blob, bd_t *bd)
517544

518545
fdt_fixup_memory_banks(blob, base, size, CONFIG_NR_DRAM_BANKS);
519546

547+
fsl_fdt_fixup_flash(blob);
548+
520549
#ifdef CONFIG_FSL_MC_ENET
521550
fdt_fixup_board_enet(blob);
522551
err = fsl_mc_ldpaa_exit(bd);

0 commit comments

Comments
 (0)