Commit 6b6b7e8a6c228e9d717617b4b2a28c7fd0773bb0

Authored by Ashish Kumar
Committed by York Sun
1 parent 2557c5a942

armv8: 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>
Reviewed-by: York Sun <york.sun@nxp.com>

Showing 1 changed file with 29 additions and 0 deletions Side-by-side Diff

board/freescale/ls1088a/ls1088a.c
... ... @@ -368,6 +368,33 @@
368 368 #endif
369 369  
370 370 #ifdef CONFIG_OF_BOARD_SETUP
  371 +void fsl_fdt_fixup_flash(void *fdt)
  372 +{
  373 + int offset;
  374 +
  375 +/*
  376 + * IFC-NOR and QSPI are muxed on SoC.
  377 + * So disable IFC node in dts if QSPI is enabled or
  378 + * disable QSPI node in dts in case QSPI is not enabled.
  379 + */
  380 +
  381 +#ifdef CONFIG_FSL_QSPI
  382 + offset = fdt_path_offset(fdt, "/soc/ifc/nor");
  383 +
  384 + if (offset < 0)
  385 + offset = fdt_path_offset(fdt, "/ifc/nor");
  386 +#else
  387 + offset = fdt_path_offset(fdt, "/soc/quadspi");
  388 +
  389 + if (offset < 0)
  390 + offset = fdt_path_offset(fdt, "/quadspi");
  391 +#endif
  392 + if (offset < 0)
  393 + return;
  394 +
  395 + fdt_status_disabled(fdt, offset);
  396 +}
  397 +
371 398 int ft_board_setup(void *blob, bd_t *bd)
372 399 {
373 400 int err, i;
... ... @@ -393,6 +420,8 @@
393 420 #endif
394 421  
395 422 fdt_fixup_memory_banks(blob, base, size, CONFIG_NR_DRAM_BANKS);
  423 +
  424 + fsl_fdt_fixup_flash(blob);
396 425  
397 426 #ifdef CONFIG_FSL_MC_ENET
398 427 fdt_fixup_board_enet(blob);