soc: ti: k3: Add support for AM6442
The AM64x and AM62x are both SOCs from the TI K3 family and share common architecture designs. The M4F subsystem is actuall identical on both SOCs. Therefore, just add all missing CONFIGs, files, etc. to support the AM6442x SOC. Since MMR and RAT initialization are identical too, both functions can be re-used. However, since they might differ in the future, the am64x has it's own init function. Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
This commit is contained in:
parent
b52f041172
commit
145e17d1c9
|
@ -7,7 +7,7 @@ if(CONFIG_SOC_AM6234_A53)
|
|||
zephyr_sources_ifdef(CONFIG_ARM_MMU a53/mmu_regions.c)
|
||||
|
||||
set(SOC_LINKER_SCRIPT ${ZEPHYR_BASE}/include/zephyr/arch/arm64/scripts/linker.ld CACHE INTERNAL "")
|
||||
elseif(CONFIG_SOC_AM6234_M4)
|
||||
elseif(CONFIG_SOC_SERIES_AM6X_M4)
|
||||
zephyr_sources(m4/soc.c)
|
||||
|
||||
zephyr_include_directories(m4)
|
||||
|
|
|
@ -21,3 +21,4 @@ config SOC_SERIES_AM6X_M4
|
|||
config SOC_PART_NUMBER
|
||||
default "AM6234" if SOC_AM6234_A53
|
||||
default "AM6234" if SOC_AM6234_M4
|
||||
default "AM6442" if SOC_AM6442_M4
|
||||
|
|
|
@ -25,8 +25,13 @@ config SOC_AM6234_M4
|
|||
bool
|
||||
select SOC_SERIES_AM6X_M4
|
||||
|
||||
config SOC_AM6442_M4
|
||||
bool
|
||||
select SOC_SERIES_AM6X_M4
|
||||
|
||||
config SOC_SERIES
|
||||
default "am6x" if SOC_SERIES_AM6X
|
||||
|
||||
config SOC
|
||||
default "am6234" if SOC_AM6234_M4 || SOC_AM6234_A53
|
||||
default "am6442" if SOC_AM6442_M4
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#define CSL_MCU_PADCONFIG_LOCK0_KICK0_OFFSET (0x1008)
|
||||
#define CSL_MCU_PADCONFIG_LOCK1_KICK0_OFFSET (0x5008)
|
||||
|
||||
static struct address_trans_region_config region_config[] = {
|
||||
static struct address_trans_region_config am6x_region_config[] = {
|
||||
{
|
||||
.system_addr = 0x0u,
|
||||
.local_addr = 0x80000000u,
|
||||
|
@ -44,7 +44,7 @@ static struct address_trans_region_config region_config[] = {
|
|||
*/
|
||||
};
|
||||
|
||||
static void mmr_unlock(void)
|
||||
static void am6x_mmr_unlock(void)
|
||||
{
|
||||
uint32_t baseAddr = PINCTRL_BASE_ADDR;
|
||||
uintptr_t kickAddr;
|
||||
|
@ -62,12 +62,12 @@ static void mmr_unlock(void)
|
|||
sys_write32(KICK1_UNLOCK_VAL, kickAddr); /* KICK 1 */
|
||||
}
|
||||
|
||||
static int am62x_m4_init(void)
|
||||
static int am6x_m4_init(void)
|
||||
{
|
||||
sys_mm_drv_ti_rat_init(
|
||||
region_config, ADDR_TRANSLATE_RAT_BASE_ADDR, ARRAY_SIZE(region_config));
|
||||
mmr_unlock();
|
||||
sys_mm_drv_ti_rat_init(am6x_region_config, ADDR_TRANSLATE_RAT_BASE_ADDR,
|
||||
ARRAY_SIZE(am6x_region_config));
|
||||
am6x_mmr_unlock();
|
||||
return 0;
|
||||
}
|
||||
|
||||
SYS_INIT(am62x_m4_init, EARLY, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);
|
||||
SYS_INIT(am6x_m4_init, EARLY, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);
|
||||
|
|
|
@ -7,3 +7,6 @@ family:
|
|||
cpuclusters:
|
||||
- name: m4
|
||||
- name: a53
|
||||
- name: am6442
|
||||
cpuclusters:
|
||||
- name: m4
|
||||
|
|
Loading…
Reference in a new issue