From 6466a6cf1ea529180d41ef4e75b16f33a050673a Mon Sep 17 00:00:00 2001
From: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
Date: Thu, 29 May 2025 14:42:42 +0100
Subject: [PATCH 36/37] corstone1000: Purge U-Boot specific DT nodes

Remove U-Boot specific DT nodes before passing the DT to Linux

This is needed to pass SystemReady IR 2.0 dt-schema tests

Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
Upstream-Status: Denied [RFC: https://lore.kernel.org/u-boot/aca7e6fa-2dec-a7c5-e47e-84c5ffa6f9b7@gmx.de/T/#m16d14ee960427cc88066bdcdd76f0a26738bb66d]
---
 board/armltd/corstone1000/corstone1000.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/board/armltd/corstone1000/corstone1000.c b/board/armltd/corstone1000/corstone1000.c
index 39fd10ed653..c8fcbf976e0 100644
--- a/board/armltd/corstone1000/corstone1000.c
+++ b/board/armltd/corstone1000/corstone1000.c
@@ -23,6 +23,18 @@
 #include <generated/dt.h>
 #include <linux/bitfield.h>
 
+/* remove the DT nodes not needed in Linux */
+DT_NON_COMPLIANT_PURGE_LIST(foo) = {
+	{ .node_path = "/fwu-mdata" },
+	{ .node_path = "/nvmxip-qspi@08000000" },
+	{ .node_path = "/soc/mailbox@1b820000" },
+	{ .node_path = "/soc/mailbox@1b830000" },
+	{ .node_path = "/soc/mhu@1b000000" },
+	{ .node_path = "/soc/mhu@1b010000" },
+	{ .node_path = "/soc/mhu@1b020000" },
+	{ .node_path = "/soc/mhu@1b030000" },
+};
+
 #define CORSTONE1000_KERNEL_PARTS 2
 #define CORSTONE1000_KERNEL_PRIMARY "kernel_primary"
 #define CORSTONE1000_KERNEL_SECONDARY "kernel_secondary"
-- 
2.25.1

