diff --git a/arch/arm/soc/nxp_lpc/lpc54xxx/Kconfig.defconfig.lpc54114 b/arch/arm/soc/nxp_lpc/lpc54xxx/Kconfig.defconfig.lpc54114_m4 similarity index 89% rename from arch/arm/soc/nxp_lpc/lpc54xxx/Kconfig.defconfig.lpc54114 rename to arch/arm/soc/nxp_lpc/lpc54xxx/Kconfig.defconfig.lpc54114_m4 index 6d4809ad6a2..383b1e77c10 100644 --- a/arch/arm/soc/nxp_lpc/lpc54xxx/Kconfig.defconfig.lpc54114 +++ b/arch/arm/soc/nxp_lpc/lpc54xxx/Kconfig.defconfig.lpc54114_m4 @@ -5,7 +5,7 @@ # SPDX-License-Identifier: Apache-2.0 # -if SOC_LPC54114 +if SOC_LPC54114_M4 config SOC string @@ -32,4 +32,4 @@ config USART_MCUX_LPC endif # SERIAL -endif # SOC_LPC54114 +endif # SOC_LPC54114_M4 diff --git a/arch/arm/soc/nxp_lpc/lpc54xxx/Kconfig.series b/arch/arm/soc/nxp_lpc/lpc54xxx/Kconfig.series index 506754c2022..a09ab550f19 100644 --- a/arch/arm/soc/nxp_lpc/lpc54xxx/Kconfig.series +++ b/arch/arm/soc/nxp_lpc/lpc54xxx/Kconfig.series @@ -7,7 +7,7 @@ config SOC_SERIES_LPC54XXX bool "LPC LPC54xxx Series MCU" - select CPU_CORTEX_M4 + select HAS_MCUX select SOC_FAMILY_LPC select SYS_POWER_LOW_POWER_STATE_SUPPORTED select CPU_HAS_SYSTICK diff --git a/arch/arm/soc/nxp_lpc/lpc54xxx/Kconfig.soc b/arch/arm/soc/nxp_lpc/lpc54xxx/Kconfig.soc index aec026ee41a..1c3a03011b3 100644 --- a/arch/arm/soc/nxp_lpc/lpc54xxx/Kconfig.soc +++ b/arch/arm/soc/nxp_lpc/lpc54xxx/Kconfig.soc @@ -9,9 +9,9 @@ choice prompt "LPC LPC54XXX MCU Selection" depends on SOC_SERIES_LPC54XXX -config SOC_LPC54114 - bool "SOC_LPC54114" - select HAS_MCUX +config SOC_LPC54114_M4 + bool "SOC_LPC54114_M4" + select CPU_CORTEX_M4 endchoice diff --git a/arch/arm/soc/nxp_lpc/lpc54xxx/soc.h b/arch/arm/soc/nxp_lpc/lpc54xxx/soc.h index acac87399b5..6131a709dee 100644 --- a/arch/arm/soc/nxp_lpc/lpc54xxx/soc.h +++ b/arch/arm/soc/nxp_lpc/lpc54xxx/soc.h @@ -25,6 +25,17 @@ extern "C" { #include #endif /* !_ASMLANGUAGE */ +#define IOCON_PIO_DIGITAL_EN 0x80u +#define IOCON_PIO_FUNC0 0x00u +#define IOCON_PIO_FUNC1 0x01u +#define IOCON_PIO_FUNC2 0x02u +#define IOCON_PIO_INPFILT_OFF 0x0100u +#define IOCON_PIO_INV_DI 0x00u +#define IOCON_PIO_MODE_INACT 0x00u +#define IOCON_PIO_OPENDRAIN_DI 0x00u +#define IOCON_PIO_SLEW_STANDARD 0x00u +#define IOCON_PIO_MODE_PULLUP 0x10u + #ifdef __cplusplus } #endif diff --git a/boards/arm/lpcxpresso54114/lpcxpresso54114.dts b/boards/arm/lpcxpresso54114/lpcxpresso54114.dts index 04438043dac..c9b23950b64 100644 --- a/boards/arm/lpcxpresso54114/lpcxpresso54114.dts +++ b/boards/arm/lpcxpresso54114/lpcxpresso54114.dts @@ -6,7 +6,7 @@ /dts-v1/; -#include +#include / { model = "NXP LPCXpresso54114 board"; diff --git a/boards/arm/lpcxpresso54114/lpcxpresso54114_defconfig b/boards/arm/lpcxpresso54114/lpcxpresso54114_defconfig index aa35e07a0d4..0fb0c71e0f1 100644 --- a/boards/arm/lpcxpresso54114/lpcxpresso54114_defconfig +++ b/boards/arm/lpcxpresso54114/lpcxpresso54114_defconfig @@ -5,7 +5,7 @@ # CONFIG_ARM=y -CONFIG_SOC_LPC54114=y +CONFIG_SOC_LPC54114_M4=y CONFIG_SOC_SERIES_LPC54XXX=y CONFIG_BOARD_LPCXPRESSO54114=y CONFIG_CONSOLE=y diff --git a/boards/arm/lpcxpresso54114/pinmux.c b/boards/arm/lpcxpresso54114/pinmux.c index a08d224ea8e..4d816a4f3f0 100644 --- a/boards/arm/lpcxpresso54114/pinmux.c +++ b/boards/arm/lpcxpresso54114/pinmux.c @@ -7,17 +7,7 @@ #include #include #include - -#define IOCON_PIO_DIGITAL_EN 0x80u -#define IOCON_PIO_FUNC0 0x00u -#define IOCON_PIO_FUNC1 0x01u -#define IOCON_PIO_FUNC2 0x02u -#define IOCON_PIO_INPFILT_OFF 0x0100u -#define IOCON_PIO_INV_DI 0x00u -#define IOCON_PIO_MODE_INACT 0x00u -#define IOCON_PIO_OPENDRAIN_DI 0x00u -#define IOCON_PIO_SLEW_STANDARD 0x00u -#define IOCON_PIO_MODE_PULLUP 0x10u +#include static int lpcxpresso_54114_pinmux_init(struct device *dev) { diff --git a/dts/arm/nxp/nxp_lpc54xxx.dtsi b/dts/arm/nxp/nxp_lpc54xxx.dtsi index ffc756ab5b3..388083dcd91 100644 --- a/dts/arm/nxp/nxp_lpc54xxx.dtsi +++ b/dts/arm/nxp/nxp_lpc54xxx.dtsi @@ -4,7 +4,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include #include / { diff --git a/dts/arm/nxp/nxp_lpc54xxx_m4.dtsi b/dts/arm/nxp/nxp_lpc54xxx_m4.dtsi new file mode 100644 index 00000000000..11cd0176fd2 --- /dev/null +++ b/dts/arm/nxp/nxp_lpc54xxx_m4.dtsi @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2018 Linaro Limited + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include +#include + +/ { + cpus { + cpu@0 { + compatible = "arm,cortex-m4f"; + }; + + /delete-node/ cpu@1; + }; +}; + +&nvic { + arm,num-irq-priority-bits = <3>; +};