diff --git a/modules/Kconfig b/modules/Kconfig index 1906d6b2414..eda6daa1609 100644 --- a/modules/Kconfig +++ b/modules/Kconfig @@ -29,6 +29,7 @@ source "modules/Kconfig.infineon" source "modules/Kconfig.libmetal" source "modules/lvgl/Kconfig" source "modules/Kconfig.microchip" +source "modules/Kconfig.mspm0" source "modules/Kconfig.nuvoton" source "modules/Kconfig.open-amp" source "modules/Kconfig.picolibc" diff --git a/modules/Kconfig.mspm0 b/modules/Kconfig.mspm0 new file mode 100644 index 00000000000..97ec56c4454 --- /dev/null +++ b/modules/Kconfig.mspm0 @@ -0,0 +1,13 @@ +# MSPM0 SDK configuration + +# Copyright (c) 2025 Texas Instruments +# SPDX-License-Identifier: Apache-2.0 + +config HAS_MSPM0_SDK + bool + +config USE_MSPM0_DL_GPIO + bool + +config USE_MSPM0_DL_UART + bool diff --git a/soc/ti/mspm0/CMakeLists.txt b/soc/ti/mspm0/CMakeLists.txt new file mode 100644 index 00000000000..c5487db5246 --- /dev/null +++ b/soc/ti/mspm0/CMakeLists.txt @@ -0,0 +1,10 @@ +# SPDX-License-Identifier: Apache-2.0 + +set(SOC_LINKER_SCRIPT ${ZEPHYR_BASE}/include/zephyr/arch/arm/cortex_m/scripts/linker.ld CACHE INTERNAL "SoC Linker Script") + +add_subdirectory(${SOC_SERIES}) + +if(CONFIG_SOC_FAMILY_TI_MSPM0) + string(TOUPPER ${CONFIG_SOC} SDK_SOC_SELECT) + zephyr_compile_definitions(-D__${SDK_SOC_SELECT}__) +endif() diff --git a/soc/ti/mspm0/Kconfig b/soc/ti/mspm0/Kconfig new file mode 100644 index 00000000000..3c1293fb9eb --- /dev/null +++ b/soc/ti/mspm0/Kconfig @@ -0,0 +1,18 @@ +# Texas Instruments MSPM0 Family +# Copyright (c) 2025 Texas Instruments +# Copyright (c) 2025 Linumiz +# SPDX-License-Identifier: Apache-2.0 + +if SOC_FAMILY_TI_MSPM0 + +rsource "*/Kconfig" + +# Per TRM Section 2.2.7 Peripheral Power Enable Control: wait at least 4 ULPCLK +# clock cycles before accessing the peripheral's memory-mapped registers. +# ULPCLK will either be equivalent or half of the main MCLK and CPUCLK, +# yielding the delay time of 8 cycles +config MSPM0_PERIPH_STARTUP_DELAY + int + default 8 + +endif # SOC_FAMILY_TI_MSPM0 diff --git a/soc/ti/mspm0/Kconfig.defconfig b/soc/ti/mspm0/Kconfig.defconfig new file mode 100644 index 00000000000..950579024a8 --- /dev/null +++ b/soc/ti/mspm0/Kconfig.defconfig @@ -0,0 +1,9 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2025 Texas Instruments +# Copyright (c) 2025 Linumiz + +if SOC_FAMILY_TI_MSPM0 + +rsource "*/Kconfig.defconfig" + +endif # SOC_FAMILY_TI_MSPM0 diff --git a/soc/ti/mspm0/Kconfig.soc b/soc/ti/mspm0/Kconfig.soc new file mode 100644 index 00000000000..9aaaf8daa0c --- /dev/null +++ b/soc/ti/mspm0/Kconfig.soc @@ -0,0 +1,13 @@ +# Texas Instruments MSPM0 Family + +# Copyright (c) 2025 Texas Instruments +# Copyright (c) 2025 Linumiz +# SPDX-License-Identifier: Apache-2.0 + +config SOC_FAMILY_TI_MSPM0 + bool + +config SOC_FAMILY + default "ti_mspm0" if SOC_FAMILY_TI_MSPM0 + +rsource "*/Kconfig.soc" diff --git a/soc/ti/mspm0/mspm0g/CMakeLists.txt b/soc/ti/mspm0/mspm0g/CMakeLists.txt new file mode 100644 index 00000000000..956e8a01395 --- /dev/null +++ b/soc/ti/mspm0/mspm0g/CMakeLists.txt @@ -0,0 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 + +zephyr_sources(soc.c) +zephyr_include_directories(.) diff --git a/soc/ti/mspm0/mspm0g/Kconfig b/soc/ti/mspm0/mspm0g/Kconfig new file mode 100644 index 00000000000..8a0241246d4 --- /dev/null +++ b/soc/ti/mspm0/mspm0g/Kconfig @@ -0,0 +1,17 @@ +# TI MSPM0G + +# Copyright (c) 2025 Texas Instruments +# Copyright (c) 2025 Linumiz +# SPDX-License-Identifier: Apache-2.0 + +config SOC_SERIES_MSPM0G + select ARM + select CPU_CORTEX_M0PLUS + select CPU_CORTEX_M_HAS_VTOR + select CPU_HAS_ARM_MPU + select CPU_CORTEX_M_HAS_SYSTICK + select BUILD_OUTPUT_BIN + select BUILD_OUTPUT_HEX + select HAS_MSPM0_SDK + select CLOCK_CONTROL + select SOC_EARLY_INIT_HOOK diff --git a/soc/ti/mspm0/mspm0g/Kconfig.defconfig b/soc/ti/mspm0/mspm0g/Kconfig.defconfig new file mode 100644 index 00000000000..17828deb55a --- /dev/null +++ b/soc/ti/mspm0/mspm0g/Kconfig.defconfig @@ -0,0 +1,20 @@ +# TI MSPM0G series + +# Copyright (c) 2025 Texas Instruments +# Copyright (c) 2025 Linumiz +# SPDX-License-Identifier: Apache-2.0 + +DT_CHOSEN_Z_FLASH := zephyr,flash + +config FLASH_SIZE + default $(dt_chosen_reg_size_int,$(DT_CHOSEN_Z_FLASH),0,K) + +config FLASH_BASE_ADDRESS + default $(dt_chosen_reg_addr_hex,$(DT_CHOSEN_Z_FLASH)) + +if SOC_SERIES_MSPM0G + +config NUM_IRQS + default 32 + +endif # SOC_SERIES_MSPM0G diff --git a/soc/ti/mspm0/mspm0g/Kconfig.soc b/soc/ti/mspm0/mspm0g/Kconfig.soc new file mode 100644 index 00000000000..6bf4f51cdae --- /dev/null +++ b/soc/ti/mspm0/mspm0g/Kconfig.soc @@ -0,0 +1,84 @@ +# Copyright (c) 2024 Texas Instruments +# Copyright (c) 2025 Linumiz +# SPDX-License-Identifier: Apache-2.0 + +config SOC_SERIES_MSPM0G + bool + select SOC_FAMILY_TI_MSPM0 + help + Enable support for TI MSPM0G series SoCs + +config SOC_MSPM0G1105 + bool + select SOC_SERIES_MSPM0G + +config SOC_MSPM0G1106 + bool + select SOC_SERIES_MSPM0G + +config SOC_MSPM0G1107 + bool + select SOC_SERIES_MSPM0G + +config SOC_MSPM0G1505 + bool + select SOC_SERIES_MSPM0G + +config SOC_MSPM0G1506 + bool + select SOC_SERIES_MSPM0G + +config SOC_MSPM0G1507 + bool + select SOC_SERIES_MSPM0G + +config SOC_MSPM0G1519 + bool + select SOC_SERIES_MSPM0G + +config SOC_MSPM0G3105 + bool + select SOC_SERIES_MSPM0G + +config SOC_MSPM0G3106 + bool + select SOC_SERIES_MSPM0G + +config SOC_MSPM0G3107 + bool + select SOC_SERIES_MSPM0G + +config SOC_MSPM0G3505 + bool + select SOC_SERIES_MSPM0G + +config SOC_MSPM0G3506 + bool + select SOC_SERIES_MSPM0G + +config SOC_MSPM0G3507 + bool + select SOC_SERIES_MSPM0G + +config SOC_MSPM0G3519 + bool + select SOC_SERIES_MSPM0G + +config SOC_SERIES + default "mspm0g" if SOC_SERIES_MSPM0G + +config SOC + default "mspm0g1105" if SOC_MSPM0G1105 + default "mspm0g1106" if SOC_MSPM0G1106 + default "mspm0g1107" if SOC_MSPM0G1107 + default "mspm0g1505" if SOC_MSPM0G1505 + default "mspm0g1506" if SOC_MSPM0G1506 + default "mspm0g1507" if SOC_MSPM0G1507 + default "mspm0g1519" if SOC_MSPM0G1519 + default "mspm0g3105" if SOC_MSPM0G3105 + default "mspm0g3106" if SOC_MSPM0G3106 + default "mspm0g3107" if SOC_MSPM0G3107 + default "mspm0g3505" if SOC_MSPM0G3505 + default "mspm0g3506" if SOC_MSPM0G3506 + default "mspm0g3507" if SOC_MSPM0G3507 + default "mspm0g3519" if SOC_MSPM0G3519 diff --git a/soc/ti/mspm0/mspm0g/soc.c b/soc/ti/mspm0/mspm0g/soc.c new file mode 100644 index 00000000000..7dd0a95a0dc --- /dev/null +++ b/soc/ti/mspm0/mspm0g/soc.c @@ -0,0 +1,17 @@ +/* + * Copyright (c) 2025 Texas Instruments + * Copyright (c) 2025 Linumiz + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include +#include + +#include + +void soc_early_init_hook(void) +{ + /* Low Power Mode is configured to be SLEEP0 */ + DL_SYSCTL_setBORThreshold(DL_SYSCTL_BOR_THRESHOLD_LEVEL_0); +} diff --git a/soc/ti/mspm0/mspm0g/soc.h b/soc/ti/mspm0/mspm0g/soc.h new file mode 100644 index 00000000000..3737f990731 --- /dev/null +++ b/soc/ti/mspm0/mspm0g/soc.h @@ -0,0 +1,14 @@ +/* + * Copyright (c) 2025 Texas Instruments + * Copyright (c) 2025 Linumiz + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#ifndef _MSPM0_SOC_H +#define _MSPM0_SOC_H + +#include +#include + +#endif /* _MSPM0_SOC_H */ diff --git a/soc/ti/mspm0/soc.yml b/soc/ti/mspm0/soc.yml new file mode 100644 index 00000000000..fa02fa7ea57 --- /dev/null +++ b/soc/ti/mspm0/soc.yml @@ -0,0 +1,19 @@ +family: +- name: ti_mspm0 + series: + - name: mspm0g + socs: + - name: mspm0g1105 + - name: mspm0g1106 + - name: mspm0g1107 + - name: mspm0g1505 + - name: mspm0g1506 + - name: mspm0g1507 + - name: mspm0g1519 + - name: mspm0g3105 + - name: mspm0g3106 + - name: mspm0g3107 + - name: mspm0g3505 + - name: mspm0g3506 + - name: mspm0g3507 + - name: mspm0g3519