All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [v3] armv8: ls1028a: disable multimedia feature when not supported
@ 2019-11-15  2:51 Wen He
  0 siblings, 0 replies; only message in thread
From: Wen He @ 2019-11-15  2:51 UTC (permalink / raw)
  To: u-boot

From: Yuantian Tang <andy.tang@nxp.com>

Ls1028a has 4 personalities: Ls1028a, Ls1027a, Ls1017a and Ls1018a.
Both Ls1027a and Ls1017a personalities are lower functionality version
which doesn't support the multimedia subsystems, like LCD, GPU.

To disable multimedia feature on non-multimedia version, set the status
property to disabled in dts nodes.

Signed-off-by: Tang Yuantian <andy.tang@nxp.com>
Signed-off-by: Wen He <wen.he_1@nxp.com>
---
 arch/arm/cpu/armv8/fsl-layerscape/fdt.c | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/arch/arm/cpu/armv8/fsl-layerscape/fdt.c b/arch/arm/cpu/armv8/fsl-layerscape/fdt.c
index 19917b207a..5a16b63800 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/fdt.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/fdt.c
@@ -401,6 +401,24 @@ void fdt_fixup_remove_jr(void *blob)
 }
 #endif
 
+void fdt_disable_multimedia(void *blob, unsigned int svr)
+{
+	int off;
+
+	if (!((svr >> 10) & 0x1))
+		return;
+
+	/* Disable eDP/LCD node */
+	off = fdt_node_offset_by_compatible(blob, -1, "arm,mali-dp500");
+	if (off != -FDT_ERR_NOTFOUND)
+		fdt_status_disabled(blob, off);
+
+	/* Disable GPU node */
+	off = fdt_node_offset_by_compatible(blob, -1, "fsl,ls1028a-gpu");
+	if (off != -FDT_ERR_NOTFOUND)
+		fdt_status_disabled(blob, off);
+}
+
 void ft_cpu_setup(void *blob, bd_t *bd)
 {
 	struct ccsr_gur __iomem *gur = (void *)(CONFIG_SYS_FSL_GUTS_ADDR);
@@ -462,4 +480,7 @@ void ft_cpu_setup(void *blob, bd_t *bd)
 #ifdef CONFIG_HAS_FEATURE_ENHANCED_MSI
 	fdt_fixup_msi(blob);
 #endif
+#ifdef CONFIG_ARCH_LS1028A
+	fdt_disable_multimedia(blob, svr);
+#endif
 }
-- 
2.17.1

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2019-11-15  2:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-15  2:51 [U-Boot] [v3] armv8: ls1028a: disable multimedia feature when not supported Wen He

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.