From b48f739ea22ba4ee6c0caecfba0e0b5f9f887429 Mon Sep 17 00:00:00 2001 From: Manuel Arguelles Date: Sun, 7 Aug 2022 04:23:17 +0700 Subject: [PATCH] s32: introduce support for NXP S32 SoCs This patch introduces the initial structure to enable Zephyr support on NXP S32 SoCs. The "drivers" directory contains device header files and bare metal peripheral drivers for S32 SoCs, based on a sub-set of NXP Real-Time Drivers (RTD). The "soc" directory contains SoC-specific default configuration for these drivers, used at driver initialization time. The configuration is generated with NXP S32 Design Studio for S32 Platform. Signed-off-by: Manuel Arguelles --- CMakeLists.txt | 7 ++++++- s32/CMakeLists.txt | 7 +++++++ s32/README | 41 +++++++++++++++++++++++++++++++++++++++++ s32/drivers/.gitkeep | 0 s32/soc/.gitkeep | 0 5 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 s32/CMakeLists.txt create mode 100644 s32/README create mode 100644 s32/drivers/.gitkeep create mode 100644 s32/soc/.gitkeep diff --git a/CMakeLists.txt b/CMakeLists.txt index 88a6ef8e..e17206f2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -if(CONFIG_HAS_MCUX OR CONFIG_HAS_IMX_HAL) +if(CONFIG_HAS_MCUX OR CONFIG_HAS_IMX_HAL OR CONFIG_HAS_S32_HAL) zephyr_library() endif() @@ -11,3 +11,8 @@ add_subdirectory_ifdef( CONFIG_HAS_IMX_HAL imx ) + +add_subdirectory_ifdef( + CONFIG_HAS_S32_HAL + s32 + ) diff --git a/s32/CMakeLists.txt b/s32/CMakeLists.txt new file mode 100644 index 00000000..6fa2b932 --- /dev/null +++ b/s32/CMakeLists.txt @@ -0,0 +1,7 @@ +# Copyright 2022 NXP + +# Set the SoC specific drivers and configuration to build +message(FATAL_ERROR "SoC ${CONFIG_SOC} not supported") + +add_subdirectory(drivers/${DRIVERS_BASE}) +add_subdirectory(soc/${SOC_BASE}) diff --git a/s32/README b/s32/README new file mode 100644 index 00000000..b79c3221 --- /dev/null +++ b/s32/README @@ -0,0 +1,41 @@ +NXP S32 HAL +########### + +Origin: + NXP Real-Time Drivers (RTD) + https://www.nxp.com/design/automotive-software-and-tools/real-time-drivers-rtd:AUTOMOTIVE-RTD + +Purpose: + Provides device header files and bare metal peripheral drivers for NXP S32 SoCs. + Zephyr shim drivers are built on top of these imported drivers to adapt the S32 + drivers APIs to Zephyr APIs. + +Description: + The "drivers" directory contains a sub-set of NXP S32 Real-Time Drivers used to enable + Zephyr support on NXP S32 SoCs. The "soc" directory contains SoC-specific default + configuration for these drivers, used at driver initialization time. The configuration + was generated with NXP S32 Design Studio for S32 Platform. + Care should be taken to retain local changes to the driver files that are documented + in Patch List section of this document. + +Dependencies: + CMSIS header files + +URL: + https://www.nxp.com/design/automotive-software-and-tools/real-time-drivers-rtd:AUTOMOTIVE-RTD + https://www.nxp.com/design/software/development-software/s32-design-studio-ide/s32-design-studio-for-s32-platform:S32DS-S32PLATFORM + +Commit: + N/A + +Maintained-by: + External + +License: + BSD-3-Clause + +License Link: + https://spdx.org/licenses/BSD-3-Clause.html + +Patch List: + N/A diff --git a/s32/drivers/.gitkeep b/s32/drivers/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/s32/soc/.gitkeep b/s32/soc/.gitkeep new file mode 100644 index 00000000..e69de29b