All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] armv8: ls1088: Add fsl_fdt_fixup_flash
@ 2017-11-09  5:44 Ashish Kumar
  2017-12-08 16:47 ` York Sun
  0 siblings, 1 reply; 2+ messages in thread
From: Ashish Kumar @ 2017-11-09  5:44 UTC (permalink / raw)
  To: u-boot

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>
---
 board/freescale/ls1088a/ls1088a.c | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/board/freescale/ls1088a/ls1088a.c b/board/freescale/ls1088a/ls1088a.c
index 96d9ae7..b8d015f 100644
--- a/board/freescale/ls1088a/ls1088a.c
+++ b/board/freescale/ls1088a/ls1088a.c
@@ -368,6 +368,33 @@ void fdt_fixup_board_enet(void *fdt)
 #endif
 
 #ifdef CONFIG_OF_BOARD_SETUP
+void fsl_fdt_fixup_flash(void *fdt)
+{
+	int offset;
+
+/*
+ * IFC-NOR and QSPI are muxed on SoC.
+ * So disable IFC node in dts if QSPI is enabled or
+ * disable QSPI node in dts in case QSPI is not enabled.
+ */
+
+#ifdef CONFIG_FSL_QSPI
+	offset = fdt_path_offset(fdt, "/soc/ifc/nor");
+
+	if (offset < 0)
+		offset = fdt_path_offset(fdt, "/ifc/nor");
+#else
+	offset = fdt_path_offset(fdt, "/soc/quadspi");
+
+	if (offset < 0)
+		offset = fdt_path_offset(fdt, "/quadspi");
+#endif
+	if (offset < 0)
+		return;
+
+	fdt_status_disabled(fdt, offset);
+}
+
 int ft_board_setup(void *blob, bd_t *bd)
 {
 	int err, i;
@@ -394,6 +421,8 @@ int ft_board_setup(void *blob, bd_t *bd)
 
 	fdt_fixup_memory_banks(blob, base, size, CONFIG_NR_DRAM_BANKS);
 
+	fsl_fdt_fixup_flash(blob);
+
 #ifdef CONFIG_FSL_MC_ENET
 	fdt_fixup_board_enet(blob);
 	err = fsl_mc_ldpaa_exit(bd);
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [U-Boot] [PATCH] armv8: ls1088: Add fsl_fdt_fixup_flash
  2017-11-09  5:44 [U-Boot] [PATCH] armv8: ls1088: Add fsl_fdt_fixup_flash Ashish Kumar
@ 2017-12-08 16:47 ` York Sun
  0 siblings, 0 replies; 2+ messages in thread
From: York Sun @ 2017-12-08 16:47 UTC (permalink / raw)
  To: u-boot

On 11/08/2017 09:44 PM, Ashish Kumar wrote:
> 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>
> ---
>  board/freescale/ls1088a/ls1088a.c | 29 +++++++++++++++++++++++++++++
>  1 file changed, 29 insertions(+)


Applied to fsl-qoriq master. Thanks.

York

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-12-08 16:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-09  5:44 [U-Boot] [PATCH] armv8: ls1088: Add fsl_fdt_fixup_flash Ashish Kumar
2017-12-08 16:47 ` York Sun

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.