From patchwork Mon Sep 30 11:47:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Cherechesu X-Patchwork-Id: 13815927 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DEC15CF649C for ; Mon, 30 Sep 2024 11:47:58 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.807255.1218623 (Exim 4.92) (envelope-from ) id 1svEsP-0001TP-Vy; Mon, 30 Sep 2024 11:47:41 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 807255.1218623; Mon, 30 Sep 2024 11:47:41 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1svEsP-0001TB-Qp; Mon, 30 Sep 2024 11:47:41 +0000 Received: by outflank-mailman (input) for mailman id 807255; Mon, 30 Sep 2024 11:47:40 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1svEsO-0001MH-Lx for xen-devel@lists.xenproject.org; Mon, 30 Sep 2024 11:47:40 +0000 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on20605.outbound.protection.outlook.com [2a01:111:f403:2613::605]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id cacf8c2f-7f21-11ef-99a2-01e77a169b0f; Mon, 30 Sep 2024 13:47:38 +0200 (CEST) Received: from PA4PR04MB9565.eurprd04.prod.outlook.com (2603:10a6:102:26b::13) by AS8PR04MB8357.eurprd04.prod.outlook.com (2603:10a6:20b:3f1::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8005.26; Mon, 30 Sep 2024 11:47:36 +0000 Received: from PA4PR04MB9565.eurprd04.prod.outlook.com ([fe80::d8ae:2e16:5a97:1709]) by PA4PR04MB9565.eurprd04.prod.outlook.com ([fe80::d8ae:2e16:5a97:1709%4]) with mapi id 15.20.8005.024; Mon, 30 Sep 2024 11:47:36 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: cacf8c2f-7f21-11ef-99a2-01e77a169b0f ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=B1sBmOKJkp9yq3cPjJmOCtZURxJLsGYbYnWja8fNdCOfyFLKD1w/ixTiX/Io00GOZjcu6mKl5DQPUTQFhJQ4bKVlnN4nW5MQ+2rH6FwQURsBFZ0yhrTWZ43j5GIy3Dh7010Egg9zW+u84PjcCVreJluvgzZYbkZQ3VWf6Za2pASKHMM3RMASkcRYUvJBOhVp5M57EXneFFwU9PwEptkDUor/HikKM1NlsC9JQyEBMoqdEleRtF68pXbuPKh1Wa7zRh7mG/ti35p5h8nl6ZvEEOrx6nZcs05EHjV4qFk3cVsr60LAVNRUUZBnfjdHWaqt+W3i9Xwn1Ku9BO/4LhWG4w== 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-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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector1-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wX/sA+HbyjLIrbQJLtP2qYPtkhD5N253XrdmtBbQxPg=; b=fbiZ7E3QakNJBW45SoL+lrEI7Hl/dYZw3FdSQZ+5FPO1FNfydWIfZL4PHtGTJMj1Hn0vc/w4BjnTtJ7PwhFzVVkz4cd1BgzC7McFOWo7JupJiD+T72UqmHDajn3VxnCrQFtKBOOpnueXsOMJbzGqV1oO5OBwi0pyZ7spPaCu5n7KayhcT0G2FXgcUlQWMgxRqGMU9CxeAfSE747vkAmjng3GZ/9ccfaE/RQwINWMXUo3mi6mM0CWTjx0aZGDtYKkLbklQcG4aipo8dwdsQJrK2kz0vT8Q9Rbq36fh6LT0WrIz8zIOGZqhQWZ0CHz4kgzUKTVyOIowEvexL7MPpp1cA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; From: "Andrei Cherechesu (OSS)" To: xen-devel@lists.xenproject.org Cc: andrei.cherechesu@oss.nxp.com, S32@nxp.com, Andrei Cherechesu , Stefano Stabellini , Julien Grall , Bertrand Marquis , Michal Orzel , Volodymyr Babchuk , s32@nxp.com Subject: [PATCH v2 5/8] xen/arm: platforms: Add NXP S32CC platform code Date: Mon, 30 Sep 2024 14:47:11 +0300 Message-ID: <20240930114715.642978-6-andrei.cherechesu@oss.nxp.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240930114715.642978-1-andrei.cherechesu@oss.nxp.com> References: <20240930114715.642978-1-andrei.cherechesu@oss.nxp.com> X-ClientProxiedBy: AM0PR10CA0016.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:208:17c::26) To PA4PR04MB9565.eurprd04.prod.outlook.com (2603:10a6:102:26b::13) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PA4PR04MB9565:EE_|AS8PR04MB8357:EE_ X-MS-Office365-Filtering-Correlation-Id: 98730b9b-71fb-4a3c-42ef-08dce145ad66 X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|52116014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: E3g0GugfsiPtud6qW82PHGgoVx35DcM01XVdp3WErxzJtAtkz60Hn99+oE1nwTv6xpj53ezyj1JNTtHGvfULr9dH9+V673XDrBmlZGELpD8piRJgZIp5aUUH0+nLJF5Hdf0RyFQwDm9/XaNm+IJaTEKXPflVP2M3fzdq2hKQkBS8th0IQyQ17BhN7bIuMXNchvJ2bhWYpAap8+0SwSF/3qqXqOIsQvVNQFuczH8igrK2oufWA0hao5u495WVqrnS7rQLmkc7R2Zi0QY3GK/E9HqIamkQKIjZJv2km1CWGnbDe401v/VhU+5Vqol96IokQTJAsa/nPzM7aSE+gVjAMhBjfAmPn1ec9PQg6zt1hBQmT/rjFyLAZTFzwcOG3OBWvx969fD5PExcdxFGzAbav4HaT+w8gzgvoAyNVz6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014)(52116014)(1800799024)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: MNdGevpOQHc65sCY8SzNnD8emq0+WCCb2by23UXm688n3+AglKXpA7GYa5/VrI+/H5x22WuE0M1TpMr2E+92W3FUINucSG7D5IbA6m9lnSDohv6IXu7WLJ6VbeFAqfl47yLiknoMMJQjVRrOrI9ZQQGVv8J/twv0Ys3Vmn5Vz8o0ilJM6KVKm5WBngnKW8h+ISegBEmMXTImqWLsdYST0k7Kt+ONG+eEJTZUV1AUmzKPlCMzcoKoPAUcam9Ho1areHlagkDf93QIbD+XEqpPFsplE3YIzZNqLxgVtjNBjgZzNDRiB4dgMLSreDPeQgsgHmOIOfCQs5dcFtyCeDnWO2LSqMDSnoQinYcoFcACqdRAHMnZnipfnSuutiw3iFYU5N6bx13JJGaa1rV7zFwpPZlDCKJ6OhrCjPaVAXbvSuCUEKe0huN0TrWVNi8RQMI2arNSlnrcZWjHTXpK5mPgnhl1/MqyoGkHaYvjHgon1Is1Ji2nNz3vKZWyMrZrzSLSs+4p5uqJimRjpz9s05Dl+QaV3Ia/vktDMqlIoo7mdn5LHf26dYjtyKmzGohF9BhrJEWzphRJBpXFPOFhzWVTCSpD/lO1G2HHWSrV4EzXklMZFz/NlybLYj0mUIgdzvs9v6ujq+iyUXz/dOWVembKpFTP1dEufpnnLzQtVaoN592hvqpMmvxS6qvD8yBkTRnVTGl8RlGEni79jjpHNnysZnybJaTdNPZ/3OHlsQ0JOUGRPiDxqyrqZp7Epnt1b3xSD4mSF1GcS4lfc+bWpWlrQtr3SOLqds3QuW8MVwhjhi9HuEoZPQF1+GmOSl24/Xxuz1+qOEy/WS785XJWwmBJ19Qku7LVWcUNr1UqpjdByVdNWev8SIqFzaj6IaeXjb0SjdnTmGOSObyciL+tp3JhirL1HSAT3DlWwlUobRkS2G32MhtyXfIXz/woc8ZlRayrEkBQbb4SqCPUG/uxMfft5HMGD32LE5cmsVRhPfBuDVokwp+uKNiyEhm/zJYz8fXbbKHiwIeplS2tzSe1RrN1Ka7tE/MLs4ysBt4GPdF5nT/C6VQ5UG2eCjB/C3jHARhdErOdY+GF+0Yybh564ruduUK6e9mXm5xNJVEtO4FSNNYIA9pFrw12tHvdB5rkMQHLutGaT3mWU1mS9n8ypSmZbEQ6Splk10ym+mklT276tPrwToSu3NqPBHyz9xCPEtFHe/UwSeecfAuSh76SUmRZ7Gx6gQTwMeNPe3kgTisZ71+k4HznPlwVl6XrfTlgHa43ApAPIxr5J/hgLrhV3BkOwe02EscerHUpZf7GeNCXkDXGVEY5hM0XC18wKydZ0l9P3TNinv3SmU8MSDcd2Ys1HpsWjt67Xntb6b9m+sBzMgqJZqB7tExW6hYel6lQ51Umz8H9j6Gjwbtd43CDnvujGK8F3YhQfKQOl1HG42iuQ5t1xHIl9bH/tpt+H45gW9xcmic9s32Ic04mrvBw2awwNzPEgVeLX75Ehn7xdyHjPhDBDL98UymqdwtmYPMfCfCjf27+XfY7tm4OP4GzCczFzz5C75FVBf9C+m1IyFTeSEGH1xjmlWPyxWusWZpp/Posda4VM4OE30lw+rA3p5vkNw== X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 98730b9b-71fb-4a3c-42ef-08dce145ad66 X-MS-Exchange-CrossTenant-AuthSource: PA4PR04MB9565.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Sep 2024 11:47:35.9870 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: VMz2Ga6/eY4McP1BLH+ShRxpd8HidvSLgTzqTk/EXe6zH729eU6J7qMajvcvbvjSAqmweP5OrveJgUwwYohUcWmEALTN48o72z7FGuQJ2vQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8357 From: Andrei Cherechesu 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 Reviewed-by: Stefano Stabellini --- 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 + * Copyright 2021-2024 NXP + */ + +#include + +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: + */