soc: mspm0: Add a support for TI MSPM0-G series SoC

Add a support for Texas Instruments MSPM0 fmaily and
MSPM0-G series SoC.

Signed-off-by: Saravanan Sekar <saravanan@linumiz.com>
Signed-off-by: Jackson Farley <j-farley@ti.com>
This commit is contained in:
Saravanan Sekar 2025-04-10 13:03:31 +05:30 committed by Benjamin Cabé
commit ce2c8f2b99
13 changed files with 239 additions and 0 deletions

View file

@ -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"

13
modules/Kconfig.mspm0 Normal file
View file

@ -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

View file

@ -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()

18
soc/ti/mspm0/Kconfig Normal file
View file

@ -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

View file

@ -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

13
soc/ti/mspm0/Kconfig.soc Normal file
View file

@ -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"

View file

@ -0,0 +1,4 @@
# SPDX-License-Identifier: Apache-2.0
zephyr_sources(soc.c)
zephyr_include_directories(.)

View file

@ -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

View file

@ -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

View file

@ -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

17
soc/ti/mspm0/mspm0g/soc.c Normal file
View file

@ -0,0 +1,17 @@
/*
* Copyright (c) 2025 Texas Instruments
* Copyright (c) 2025 Linumiz
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/init.h>
#include <ti/driverlib/driverlib.h>
#include <soc.h>
void soc_early_init_hook(void)
{
/* Low Power Mode is configured to be SLEEP0 */
DL_SYSCTL_setBORThreshold(DL_SYSCTL_BOR_THRESHOLD_LEVEL_0);
}

14
soc/ti/mspm0/mspm0g/soc.h Normal file
View file

@ -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 <ti/devices/msp/msp.h>
#include <ti/driverlib/m0p/dl_core.h>
#endif /* _MSPM0_SOC_H */

19
soc/ti/mspm0/soc.yml Normal file
View file

@ -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