From 93c6c913cb5f49cbda214d68c6e698804534d555 Mon Sep 17 00:00:00 2001 From: Henrik Brix Andersen Date: Sat, 18 Apr 2020 20:16:02 +0200 Subject: [PATCH] soc: arm: nxp: add LPC55S16 support Add initial support for the NXP LPC55S16. Signed-off-by: Henrik Brix Andersen --- .../lpc55xxx/Kconfig.defconfig.lpc55S16 | 27 +++++++++++++++++++ soc/arm/nxp_lpc/lpc55xxx/Kconfig.soc | 14 ++++++++++ soc/arm/nxp_lpc/lpc55xxx/soc.c | 6 ++--- 3 files changed, 44 insertions(+), 3 deletions(-) create mode 100644 soc/arm/nxp_lpc/lpc55xxx/Kconfig.defconfig.lpc55S16 diff --git a/soc/arm/nxp_lpc/lpc55xxx/Kconfig.defconfig.lpc55S16 b/soc/arm/nxp_lpc/lpc55xxx/Kconfig.defconfig.lpc55S16 new file mode 100644 index 00000000000..83fa8c7bc5b --- /dev/null +++ b/soc/arm/nxp_lpc/lpc55xxx/Kconfig.defconfig.lpc55S16 @@ -0,0 +1,27 @@ +# NXP LPC55S16 platform configuration options + +# Copyright (c) 2020 Henrik Brix Andersen +# SPDX-License-Identifier: Apache-2.0 + +if SOC_LPC55S16 + +config SOC + default "lpc55S16" + +config PINMUX_MCUX_LPC + default y + depends on PINMUX + +config GPIO_MCUX_LPC + default y + depends on GPIO + +config UART_MCUX_FLEXCOMM + default y + depends on SERIAL + +config SOC_FLASH_MCUX + default y + depends on FLASH + +endif # SOC_LPC55S16 diff --git a/soc/arm/nxp_lpc/lpc55xxx/Kconfig.soc b/soc/arm/nxp_lpc/lpc55xxx/Kconfig.soc index 78a474c03d1..0297ed6ff4e 100644 --- a/soc/arm/nxp_lpc/lpc55xxx/Kconfig.soc +++ b/soc/arm/nxp_lpc/lpc55xxx/Kconfig.soc @@ -7,6 +7,16 @@ choice prompt "LPC5500 Series MCU Selection" depends on SOC_SERIES_LPC55XXX +config SOC_LPC55S16 + bool "SOC_LPC55S16 M33" + select CPU_CORTEX_M33 + select CPU_HAS_ARM_SAU + select CPU_HAS_ARM_MPU + select CPU_HAS_FPU + select ARMV8_M_DSP + select ARM_TRUSTZONE_M + select HAS_MCUX_IAP if !TRUSTED_EXECUTION_NONSECURE + config SOC_LPC55S69_CPU0 bool "SOC_LPC55S69 M33 [CPU 0]" select CPU_CORTEX_M33 @@ -25,6 +35,9 @@ endchoice if SOC_SERIES_LPC55XXX +config SOC_PART_NUMBER_LPC55S16JBD100 + bool + config SOC_PART_NUMBER_LPC55S69JBD100 bool @@ -33,6 +46,7 @@ config SOC_PART_NUMBER_LPC55S69JET98 config SOC_PART_NUMBER_LPC55XXX string + default "LPC55S16JBD100" if SOC_PART_NUMBER_LPC55S16JBD100 default "LPC55S69JBD100" if SOC_PART_NUMBER_LPC55S69JBD100 default "LPC55S69JET98" if SOC_PART_NUMBER_LPC55S69JET98 diff --git a/soc/arm/nxp_lpc/lpc55xxx/soc.c b/soc/arm/nxp_lpc/lpc55xxx/soc.c index 375ec32b0b4..0ede9672bfe 100644 --- a/soc/arm/nxp_lpc/lpc55xxx/soc.c +++ b/soc/arm/nxp_lpc/lpc55xxx/soc.c @@ -36,7 +36,7 @@ static ALWAYS_INLINE void clock_init(void) { -#ifdef CONFIG_SOC_LPC55S69_CPU0 +#if defined(CONFIG_SOC_LPC55S16) || defined(CONFIG_SOC_LPC55S69_CPU0) /*!< Set up the clock sources */ /*!< Configure FRO192M */ /*!< Ensure FRO is on */ @@ -90,7 +90,7 @@ static ALWAYS_INLINE void clock_init(void) * @return 0 */ -static int nxp_lpc55s69_init(struct device *arg) +static int nxp_lpc55xxx_init(struct device *arg) { ARG_UNUSED(arg); @@ -122,4 +122,4 @@ static int nxp_lpc55s69_init(struct device *arg) return 0; } -SYS_INIT(nxp_lpc55s69_init, PRE_KERNEL_1, 0); +SYS_INIT(nxp_lpc55xxx_init, PRE_KERNEL_1, 0);