soc: ti_k3: Added SoC files for Cortex M4F on ti_am62x_sk
Added SoC support files for the Cortex M4F core on the TI AM62X SK EVM. Signed-off-by: L Lakshmanan <l-lakshmanan@ti.com>
This commit is contained in:
parent
c59b04299f
commit
0e97c9d14d
12 changed files with 243 additions and 0 deletions
8
soc/arm/ti_k3/CMakeLists.txt
Normal file
8
soc/arm/ti_k3/CMakeLists.txt
Normal file
|
@ -0,0 +1,8 @@
|
|||
# Copyright (c) 2023 Texas Instruments Incorporated
|
||||
# Copyright (c) 2023 L Lakshmanan
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
zephyr_include_directories(.)
|
||||
|
||||
add_subdirectory(${SOC_SERIES})
|
19
soc/arm/ti_k3/Kconfig
Normal file
19
soc/arm/ti_k3/Kconfig
Normal file
|
@ -0,0 +1,19 @@
|
|||
# Texas Instruments K3 Family
|
||||
#
|
||||
# Copyright (c) 2023 Texas Instruments Incorporated
|
||||
# Copyright (c) 2023 L Lakshmanan
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
config SOC_FAMILY_TI_K3
|
||||
bool
|
||||
|
||||
if SOC_FAMILY_TI_K3
|
||||
|
||||
config SOC_FAMILY
|
||||
string
|
||||
default "ti_k3"
|
||||
|
||||
source "soc/arm/ti_k3/*/Kconfig.soc"
|
||||
|
||||
endif # SOC_FAMILY_TI_K3
|
8
soc/arm/ti_k3/Kconfig.defconfig
Normal file
8
soc/arm/ti_k3/Kconfig.defconfig
Normal file
|
@ -0,0 +1,8 @@
|
|||
# Texas Instruments K3 Family
|
||||
#
|
||||
# Copyright (c) 2023 Texas Instruments Incorporated
|
||||
# Copyright (c) 2023 L Lakshmanan
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
source "soc/arm/ti_k3/*/Kconfig.defconfig.series"
|
8
soc/arm/ti_k3/Kconfig.soc
Normal file
8
soc/arm/ti_k3/Kconfig.soc
Normal file
|
@ -0,0 +1,8 @@
|
|||
# Texas Instruments K3 Family
|
||||
#
|
||||
# Copyright (c) 2023 Texas Instruments Incorporated
|
||||
# Copyright (c) 2023 L Lakshmanan
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
source "soc/arm/ti_k3/*/Kconfig.series"
|
11
soc/arm/ti_k3/am62x_m4/CMakeLists.txt
Normal file
11
soc/arm/ti_k3/am62x_m4/CMakeLists.txt
Normal file
|
@ -0,0 +1,11 @@
|
|||
# Copyright (c) 2023 Texas Instruments Incorporated
|
||||
# Copyright (c) 2023 L Lakshmanan
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
zephyr_sources(soc.c)
|
||||
|
||||
if(CONFIG_OPENAMP_RSC_TABLE)
|
||||
zephyr_linker_section(NAME .resource_table GROUP ROM_REGION NOINPUT)
|
||||
zephyr_linker_section_configure(SECTION .resource_table KEEP INPUT ".resource_table*")
|
||||
endif()
|
13
soc/arm/ti_k3/am62x_m4/Kconfig.defconfig.am62xm4
Normal file
13
soc/arm/ti_k3/am62x_m4/Kconfig.defconfig.am62xm4
Normal file
|
@ -0,0 +1,13 @@
|
|||
# Texas Instruments Sitara AM62x-SK-M4 EVM
|
||||
#
|
||||
# Copyright (c) 2023 Texas Instruments Incorporated
|
||||
# Copyright (c) 2023 L Lakshmanan
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
if SOC_AM62x_M4
|
||||
|
||||
config SOC
|
||||
default "am62x_m4"
|
||||
|
||||
endif
|
52
soc/arm/ti_k3/am62x_m4/Kconfig.defconfig.series
Normal file
52
soc/arm/ti_k3/am62x_m4/Kconfig.defconfig.series
Normal file
|
@ -0,0 +1,52 @@
|
|||
# Texas Instruments Sitara AM62x-SK-M4 EVM
|
||||
#
|
||||
# Copyright (c) 2023 Texas Instruments Incorporated
|
||||
# Copyright (c) 2023 L Lakshmanan
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
if SOC_SERIES_AM62X_M4
|
||||
|
||||
source "soc/arm/ti_k3/am62x_m4/Kconfig.defconfig.am62xm4*"
|
||||
|
||||
config SOC_SERIES
|
||||
default "am62x_m4"
|
||||
|
||||
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))
|
||||
|
||||
config NUM_IRQS
|
||||
default 64
|
||||
|
||||
config SYS_CLOCK_HW_CYCLES_PER_SEC
|
||||
int
|
||||
default 400000000
|
||||
|
||||
config PINCTRL
|
||||
default y
|
||||
|
||||
if SERIAL
|
||||
|
||||
config UART_NS16550
|
||||
default y
|
||||
|
||||
config UART_NS16550_TI_K3
|
||||
default y
|
||||
|
||||
choice UART_NS16550_VARIANT
|
||||
default UART_NS16550_VARIANT_NS16750
|
||||
endchoice
|
||||
|
||||
endif # SERIAL
|
||||
|
||||
config BUILD_OUTPUT_BIN
|
||||
default n
|
||||
|
||||
source "soc/arm/ti_k3/am62x_m4/Kconfig.defconfig.am62*"
|
||||
|
||||
endif # SOC_SERIES_AM62X_M4
|
22
soc/arm/ti_k3/am62x_m4/Kconfig.series
Normal file
22
soc/arm/ti_k3/am62x_m4/Kconfig.series
Normal file
|
@ -0,0 +1,22 @@
|
|||
# Texas Instruments Sitara AM62x-SK-M4 EVM
|
||||
#
|
||||
# Copyright (c) 2023 Texas Instruments Incorporated
|
||||
# Copyright (c) 2023 L Lakshmanan
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
config SOC_SERIES_AM62X_M4
|
||||
bool "TI AM62X M4 Core Series"
|
||||
select SOC_FAMILY_TI_K3
|
||||
select ARM
|
||||
select CPU_CORTEX_M4
|
||||
select CPU_CORTEX_M_HAS_SYSTICK
|
||||
select DYNAMIC_INTERRUPTS
|
||||
select CPU_CORTEX_M_HAS_DWT
|
||||
select OPENAMP_RSC_TABLE
|
||||
select UART_NS16550_ACCESS_WORD_ONLY
|
||||
select EXTERNAL_ADDRESS_TRANSLATION
|
||||
select MM_DRV
|
||||
select MM_TI_RAT
|
||||
help
|
||||
Enable support for AM62X M4 Series.
|
28
soc/arm/ti_k3/am62x_m4/Kconfig.soc
Normal file
28
soc/arm/ti_k3/am62x_m4/Kconfig.soc
Normal file
|
@ -0,0 +1,28 @@
|
|||
# Texas Instruments Sitara AM62x-SK-M4
|
||||
#
|
||||
# Copyright (c) 2023 Texas Instruments Incorporated
|
||||
# Copyright (c) 2023 L Lakshmanan
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
choice
|
||||
prompt "TI AM62X M4 Selection"
|
||||
depends on SOC_SERIES_AM62X_M4
|
||||
|
||||
config SOC_AM62x_M4
|
||||
bool "TI AM62x M4"
|
||||
select SOC_PART_NUMBER_AM62x
|
||||
|
||||
endchoice
|
||||
|
||||
config SOC_PART_NUMBER_AM62x
|
||||
bool
|
||||
|
||||
config SOC_PART_NUMBER_AM62X_M4
|
||||
string
|
||||
default "AM62x" if SOC_PART_NUMBER_AM62x
|
||||
help
|
||||
Full part number of the SoC. Do not select directly.
|
||||
|
||||
config SOC_PART_NUMBER
|
||||
default SOC_PART_NUMBER_AM62X_M4 if SOC_SERIES_AM62X_M4
|
18
soc/arm/ti_k3/am62x_m4/linker.ld
Normal file
18
soc/arm/ti_k3/am62x_m4/linker.ld
Normal file
|
@ -0,0 +1,18 @@
|
|||
/* linker.ld - Linker command/script file
|
||||
*
|
||||
* Copyright (c) 2023 Texas Instruments Incorporated
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <zephyr/arch/arm/aarch32/cortex_m/scripts/linker.ld>
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
#ifdef CONFIG_OPENAMP_RSC_TABLE
|
||||
SECTION_PROLOGUE(.resource_table,, SUBALIGN(4))
|
||||
{
|
||||
KEEP(*(.resource_table*))
|
||||
} GROUP_LINK_IN(DDR)
|
||||
#endif
|
||||
}
|
49
soc/arm/ti_k3/am62x_m4/soc.c
Normal file
49
soc/arm/ti_k3/am62x_m4/soc.c
Normal file
|
@ -0,0 +1,49 @@
|
|||
/*
|
||||
* Copyright (c) 2023 Texas Instruments Incorporated
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <zephyr/arch/cpu.h>
|
||||
#include <zephyr/kernel.h>
|
||||
#include <zephyr/device.h>
|
||||
#include <zephyr/init.h>
|
||||
#include <soc.h>
|
||||
|
||||
#define ADDR_TRANSLATE_RAT_BASE_ADDR (0x044200000u)
|
||||
|
||||
static struct address_trans_region_config region_config[] = {
|
||||
{
|
||||
.system_addr = 0x0u,
|
||||
.local_addr = 0x80000000u,
|
||||
.size = address_trans_region_size_512M,
|
||||
},
|
||||
{
|
||||
.local_addr = 0xA0000000u,
|
||||
.system_addr = 0x20000000u,
|
||||
.size = address_trans_region_size_512M,
|
||||
},
|
||||
{
|
||||
.local_addr = 0xC0000000u,
|
||||
.system_addr = 0x40000000u,
|
||||
.size = address_trans_region_size_512M,
|
||||
},
|
||||
{
|
||||
.local_addr = 0x60000000u,
|
||||
.system_addr = 0x60000000u,
|
||||
.size = address_trans_region_size_512M,
|
||||
},
|
||||
|
||||
/*
|
||||
* Add regions here if you want to map more memory.
|
||||
*/
|
||||
};
|
||||
|
||||
static int am62x_m4_init(void)
|
||||
{
|
||||
sys_mm_drv_ti_rat_init(
|
||||
region_config, ADDR_TRANSLATE_RAT_BASE_ADDR, ARRAY_SIZE(region_config));
|
||||
return 0;
|
||||
}
|
||||
|
||||
SYS_INIT(am62x_m4_init, PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);
|
7
soc/arm/ti_k3/am62x_m4/soc.h
Normal file
7
soc/arm/ti_k3/am62x_m4/soc.h
Normal file
|
@ -0,0 +1,7 @@
|
|||
/*
|
||||
* Copyright (c) 2023 Texas Instruments Incorporated
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <zephyr/drivers/mm/rat.h>
|
Loading…
Add table
Add a link
Reference in a new issue