board: ti_am62x_sk_m4: Added board files for TI AM62X SK
Added configuration and documentation files for the AM62x board M4 core. Signed-off-by: L Lakshmanan <l-lakshmanan@ti.com>
This commit is contained in:
parent
5b210fe35a
commit
71244acd22
9 changed files with 307 additions and 0 deletions
|
@ -11,6 +11,11 @@
|
|||
#include <soc.h>
|
||||
|
||||
#define ADDR_TRANSLATE_RAT_BASE_ADDR (0x044200000u)
|
||||
#define PINCTRL_BASE_ADDR (0x4080000u)
|
||||
#define KICK0_UNLOCK_VAL (0x68EF3490U)
|
||||
#define KICK1_UNLOCK_VAL (0xD172BC5AU)
|
||||
#define CSL_MCU_PADCONFIG_LOCK0_KICK0_OFFSET (0x1008)
|
||||
#define CSL_MCU_PADCONFIG_LOCK1_KICK0_OFFSET (0x5008)
|
||||
|
||||
static struct address_trans_region_config region_config[] = {
|
||||
{
|
||||
|
@ -39,10 +44,29 @@ static struct address_trans_region_config region_config[] = {
|
|||
*/
|
||||
};
|
||||
|
||||
static void mmr_unlock(void)
|
||||
{
|
||||
uint32_t baseAddr = PINCTRL_BASE_ADDR;
|
||||
uintptr_t kickAddr;
|
||||
|
||||
/* Lock 0 */
|
||||
kickAddr = baseAddr + CSL_MCU_PADCONFIG_LOCK0_KICK0_OFFSET;
|
||||
sys_write32(KICK0_UNLOCK_VAL, kickAddr); /* KICK 0 */
|
||||
kickAddr = kickAddr + sizeof(uint32_t *);
|
||||
sys_write32(KICK1_UNLOCK_VAL, kickAddr); /* KICK 1 */
|
||||
|
||||
/* Lock 1 */
|
||||
kickAddr = baseAddr + CSL_MCU_PADCONFIG_LOCK1_KICK0_OFFSET;
|
||||
sys_write32(KICK0_UNLOCK_VAL, kickAddr); /* KICK 0 */
|
||||
kickAddr = kickAddr + sizeof(uint32_t *);
|
||||
sys_write32(KICK1_UNLOCK_VAL, kickAddr); /* KICK 1 */
|
||||
}
|
||||
|
||||
static int am62x_m4_init(void)
|
||||
{
|
||||
sys_mm_drv_ti_rat_init(
|
||||
region_config, ADDR_TRANSLATE_RAT_BASE_ADDR, ARRAY_SIZE(region_config));
|
||||
mmr_unlock();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
37
soc/arm/ti_k3/pinctrl_soc.h
Normal file
37
soc/arm/ti_k3/pinctrl_soc.h
Normal file
|
@ -0,0 +1,37 @@
|
|||
/*
|
||||
* Copyright (c) 2023 Texas Instruments Incorporated
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#ifndef ZEPHYR_SOC_ARM_TI_K3_PINCTRL_SOC_H_
|
||||
#define ZEPHYR_SOC_ARM_TI_K3_PINCTRL_SOC_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct pinctrl_soc_pin {
|
||||
uint32_t offset;
|
||||
uint32_t value;
|
||||
};
|
||||
|
||||
typedef struct pinctrl_soc_pin pinctrl_soc_pin_t;
|
||||
|
||||
#define TI_K3_DT_PIN(node_id) \
|
||||
{ \
|
||||
.offset = DT_PROP_BY_IDX(node_id, pinmux, 0), \
|
||||
.value = DT_PROP_BY_IDX(node_id, pinmux, 1) \
|
||||
},
|
||||
|
||||
#define Z_PINCTRL_STATE_PIN_INIT(node_id, prop, idx) \
|
||||
TI_K3_DT_PIN(DT_PROP_BY_IDX(node_id, prop, idx))
|
||||
|
||||
#define Z_PINCTRL_STATE_PINS_INIT(node_id, prop) \
|
||||
{ DT_FOREACH_PROP_ELEM(node_id, prop, Z_PINCTRL_STATE_PIN_INIT) }
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* ZEPHYR_SOC_ARM_TI_K3_PINCTRL_SOC_H_ */
|
Loading…
Add table
Add a link
Reference in a new issue