Skip to contentSkip to conversation

armv8: ls1028a: disable multimedia feature when not supported

PATCH Superseded Yuantian Tang 2 participants 2 messages Sep 26, 2019 – Sep 30, 2019 Arm (32-bit)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 armv8: ls1028a: disable multimedia feature when not supported

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.

---
 arch/arm/cpu/armv8/fsl-layerscape/fdt.c | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
arch/arm/cpu/armv8/fsl-layerscape/fdt.c +21 -0
index 19917b207a..ef0e2095a6 100644
@@ -401,6 +401,24 @@ void fdt_fixup_remove_jr(void *blob)
 }
 #endif
 
+static 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
 }
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/1 armv8: ls1028a: disable multimedia feature when not supported

Quoted 11 lines

-----Original Message-----
From: U-Boot <[email protected]> On Behalf Of Yuantian Tang
Sent: Thursday, September 26, 2019 11:09 AM
To: Prabhakar X <[email protected]>
Cc: u-boot at lists.denx.de; Andy Tang <[email protected]>
Subject: [U-Boot] [PATCH] armv8: ls1028a: disable multimedia feature when not supported

Ls1028a has 4 personalities: ls1028a, ls1027a, ls1017a and ls1018a.

Please use same case : Ls -> ls

Quoted 17 lines

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.

---
arch/arm/cpu/armv8/fsl-layerscape/fdt.c | 21 +++++++++++++++++++++

1 file changed, 21 insertions(+)
arch/arm/cpu/armv8/fsl-layerscape/fdt.c +0 -0
index 19917b207a..ef0e2095a6 100644

arch/arm/cpu/armv8/fsl-layerscape/fdt.c void fdt_fixup_remove_jr(void *blob) } #endif · line 407

Quoted 7 lines
arch/arm/cpu/armv8/fsl-layerscape/fdt.c +6 -0
@@ -401,6 +401,24 @@ void fdt_fixup_remove_jr(void *blob)  }  #endif
 
+static void fdt_disable_multimedia(void *blob, unsigned int svr) {
+	int off;
+
+	if (!((svr >> 10) & 0x1))
+		return;
+

Use macros, instead of magic values

Quoted 34 lines
arch/arm/cpu/armv8/fsl-layerscape/fdt.c +11 -0
+	/* 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

arch/arm/cpu/armv8/fsl-layerscape/fdt.c +3 -0
+#ifdef CONFIG_ARCH_LS1028A
+	fdt_disable_multimedia(blob, svr);
+#endif

}
--
2.17.1

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.de
nx.de%2Flistinfo%2Fu- boot&amp;data=02%7C01%7Cpriyanka.jain%40nxp.com%7C1dd219d687c848b 4645008d742454cc6%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C6 37050737736807646&amp;sdata=DVekJ9T5xPpgYOgPJgCeBMBpmL0BRTzJEvsEx jJVcPE%3D&amp;reserved=0