[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v2 5/8] xen/arm: platforms: Add NXP S32CC platform code


  • To: xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: "Andrei Cherechesu (OSS)" <andrei.cherechesu@xxxxxxxxxxx>
  • Date: Mon, 30 Sep 2024 14:47:11 +0300
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=wX/sA+HbyjLIrbQJLtP2qYPtkhD5N253XrdmtBbQxPg=; b=IZ0PvksUZp7j1xOmGJymXfK7eRJggyh+PRJQQfNiYt2XWahJFDJIY5wQXEiO3xDGODekTwhJU2bmCpLWXHb9auU3tYgtamNCK/6L3t2wY4MO0wr0kY4vTWuMu4ZNZtNM3gshkOR6yG63U/5qenIrQfu8tWAYabwQ/RjAs+HC+yP7ijcauSvX7rdSVtPmY2iobAJDykEVzbFsLNcQ9Bd3r+otdVekfhvmezESdRW6OWlR4dLWFrTa8cYc/UAS4iCjZ4aGKbt8aefuk93bhdvI2xmrD0t7vvPUoGlDdiwPoGOFkpi+N/+D8g2GmYOkwMvft2QMyCny6lWbtUSEH3F6hQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=B1sBmOKJkp9yq3cPjJmOCtZURxJLsGYbYnWja8fNdCOfyFLKD1w/ixTiX/Io00GOZjcu6mKl5DQPUTQFhJQ4bKVlnN4nW5MQ+2rH6FwQURsBFZ0yhrTWZ43j5GIy3Dh7010Egg9zW+u84PjcCVreJluvgzZYbkZQ3VWf6Za2pASKHMM3RMASkcRYUvJBOhVp5M57EXneFFwU9PwEptkDUor/HikKM1NlsC9JQyEBMoqdEleRtF68pXbuPKh1Wa7zRh7mG/ti35p5h8nl6ZvEEOrx6nZcs05EHjV4qFk3cVsr60LAVNRUUZBnfjdHWaqt+W3i9Xwn1Ku9BO/4LhWG4w==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com;
  • Cc: andrei.cherechesu@xxxxxxxxxxx, S32@xxxxxxx, Andrei Cherechesu <andrei.cherechesu@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, s32@xxxxxxx
  • Delivery-date: Mon, 30 Sep 2024 11:47:45 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

From: Andrei Cherechesu <andrei.cherechesu@xxxxxxx>

Add code for NXP S32CC platforms (S32G2, S32G3, S32R45).

S32CC platforms use the NXP LINFlexD UART driver for
console by default, and rely on Dom0 having access to
SCMI services for system-level resources from firmware
at EL3.

Platform-related quirks will be addressed in following
commits.

Signed-off-by: Andrei Cherechesu <andrei.cherechesu@xxxxxxx>
---
 xen/arch/arm/platforms/Kconfig  | 11 +++++++++++
 xen/arch/arm/platforms/Makefile |  1 +
 xen/arch/arm/platforms/s32cc.c  | 32 ++++++++++++++++++++++++++++++++
 3 files changed, 44 insertions(+)
 create mode 100644 xen/arch/arm/platforms/s32cc.c

diff --git a/xen/arch/arm/platforms/Kconfig b/xen/arch/arm/platforms/Kconfig
index 76f7e76b1b..9837cba475 100644
--- a/xen/arch/arm/platforms/Kconfig
+++ b/xen/arch/arm/platforms/Kconfig
@@ -37,6 +37,14 @@ config MPSOC
        help
        Enable all the required drivers for Xilinx Ultrascale+ MPSoC
 
+config S32CC
+       bool "NXP S32CC platforms support"
+       depends on ARM_64
+       select HAS_LINFLEX
+       select SCMI_SMC
+       help
+       Enable all the required drivers for NXP S32CC platforms
+
 config NO_PLAT
        bool "No Platforms"
        help
@@ -56,3 +64,6 @@ config MPSOC_PLATFORM
        bool
        default (ALL64_PLAT || MPSOC)
 
+config S32CC_PLATFORM
+       bool
+       default (ALL64_PLAT || S32CC)
diff --git a/xen/arch/arm/platforms/Makefile b/xen/arch/arm/platforms/Makefile
index bec6e55d1f..2c304b964d 100644
--- a/xen/arch/arm/platforms/Makefile
+++ b/xen/arch/arm/platforms/Makefile
@@ -10,5 +10,6 @@ obj-$(CONFIG_ALL64_PLAT) += thunderx.o
 obj-$(CONFIG_ALL64_PLAT) += xgene-storm.o
 obj-$(CONFIG_ALL64_PLAT) += brcm-raspberry-pi.o
 obj-$(CONFIG_ALL64_PLAT) += imx8qm.o
+obj-$(CONFIG_S32CC_PLATFORM)  += s32cc.o
 obj-$(CONFIG_MPSOC_PLATFORM)  += xilinx-zynqmp.o
 obj-$(CONFIG_MPSOC_PLATFORM)  += xilinx-zynqmp-eemi.o
diff --git a/xen/arch/arm/platforms/s32cc.c b/xen/arch/arm/platforms/s32cc.c
new file mode 100644
index 0000000000..f99a2d56f6
--- /dev/null
+++ b/xen/arch/arm/platforms/s32cc.c
@@ -0,0 +1,32 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+/*
+ * xen/arch/arm/platforms/s32cc.c
+ *
+ * NXP S32CC Platform-specific settings
+ *
+ * Andrei Cherechesu <andrei.cherechesu@xxxxxxx>
+ * Copyright 2021-2024 NXP
+ */
+
+#include <asm/platform.h>
+
+static const char * const s32cc_dt_compat[] __initconst =
+{
+    "nxp,s32g2",
+    "nxp,s32g3",
+    "nxp,s32r45",
+    NULL
+};
+
+PLATFORM_START(s32cc, "NXP S32CC")
+    .compatible = s32cc_dt_compat,
+PLATFORM_END
+
+/*
+ * Local variables:
+ * mode: C
+ * c-file-style: "BSD"
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
-- 
2.45.2




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.