soc: atmel_sam0: Add SAME53
This adds supoprt for the Atmel SAME53 SoC. The SAME5x/SAMD5x is a line of Cortex-M4F MCUs that share peripherals with the sam0 Cortex-M0+ and saml1x Cortex-M23 parts. Signed-off-by: Benjamin Valentin <benpicco@googlemail.com>
This commit is contained in:
parent
de6bc41430
commit
7e722564df
7 changed files with 135 additions and 0 deletions
|
@ -9,6 +9,7 @@ zephyr_sources_ifdef(CONFIG_SOC_SERIES_SAMR21 soc_samd2x.c)
|
|||
|
||||
zephyr_sources_ifdef(CONFIG_SOC_SERIES_SAMD51 soc_samd5x.c)
|
||||
zephyr_sources_ifdef(CONFIG_SOC_SERIES_SAME51 soc_samd5x.c)
|
||||
zephyr_sources_ifdef(CONFIG_SOC_SERIES_SAME53 soc_samd5x.c)
|
||||
zephyr_sources_ifdef(CONFIG_SOC_SERIES_SAME54 soc_samd5x.c)
|
||||
|
||||
zephyr_include_directories(.)
|
||||
|
|
28
soc/arm/atmel_sam0/same53/Kconfig.defconfig.series
Normal file
28
soc/arm/atmel_sam0/same53/Kconfig.defconfig.series
Normal file
|
@ -0,0 +1,28 @@
|
|||
# Kconfig - Atmel SAME53 MCU series configuration options
|
||||
#
|
||||
# Copyright (c) 2019 ML!PA Consulting GmbH
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
if SOC_SERIES_SAME53
|
||||
|
||||
config SOC_SERIES
|
||||
string
|
||||
default "same53"
|
||||
|
||||
config SOC_PART_NUMBER
|
||||
string
|
||||
default "same53j18a" if SOC_PART_NUMBER_SAME53J18A
|
||||
default "same53j19a" if SOC_PART_NUMBER_SAME53J19A
|
||||
default "same53j20a" if SOC_PART_NUMBER_SAME53J20A
|
||||
default "same53n19a" if SOC_PART_NUMBER_SAME53N19A
|
||||
default "same53n20a" if SOC_PART_NUMBER_SAME53N20A
|
||||
|
||||
config NUM_IRQS
|
||||
int
|
||||
default 137
|
||||
|
||||
config SYS_CLOCK_HW_CYCLES_PER_SEC
|
||||
int
|
||||
default 120000000
|
||||
|
||||
endif # SOC_SERIES_SAME53
|
14
soc/arm/atmel_sam0/same53/Kconfig.series
Normal file
14
soc/arm/atmel_sam0/same53/Kconfig.series
Normal file
|
@ -0,0 +1,14 @@
|
|||
# Kconfig - Atmel SAME53 MCU series
|
||||
#
|
||||
# Copyright (c) 2019 ML!PA Consulting GmbH
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
config SOC_SERIES_SAME53
|
||||
bool "Atmel SAME53 MCU"
|
||||
select CPU_CORTEX_M4
|
||||
select SOC_FAMILY_SAM0
|
||||
select CPU_CORTEX_M_HAS_SYSTICK
|
||||
select CPU_CORTEX_M_HAS_VTOR
|
||||
select ASF
|
||||
help
|
||||
Enable support for Atmel SAME53 Cortex-M4F microcontrollers.
|
25
soc/arm/atmel_sam0/same53/Kconfig.soc
Normal file
25
soc/arm/atmel_sam0/same53/Kconfig.soc
Normal file
|
@ -0,0 +1,25 @@
|
|||
# Kconfig - Atmel SAME53 MCU series
|
||||
#
|
||||
# Copyright (c) 2019 ML!PA Consulting GmbH
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
choice
|
||||
prompt "Atmel SAME53 MCU Selection"
|
||||
depends on SOC_SERIES_SAME53
|
||||
|
||||
config SOC_PART_NUMBER_SAME53J18A
|
||||
bool "SAME53J18A"
|
||||
|
||||
config SOC_PART_NUMBER_SAME53J19A
|
||||
bool "SAME53J19A"
|
||||
|
||||
config SOC_PART_NUMBER_SAME53J20A
|
||||
bool "SAME53J20A"
|
||||
|
||||
config SOC_PART_NUMBER_SAME53N19A
|
||||
bool "SAME53N19A"
|
||||
|
||||
config SOC_PART_NUMBER_SAME53N20A
|
||||
bool "SAME53N20A"
|
||||
|
||||
endchoice
|
15
soc/arm/atmel_sam0/same53/dts_fixup.h
Normal file
15
soc/arm/atmel_sam0/same53/dts_fixup.h
Normal file
|
@ -0,0 +1,15 @@
|
|||
/*
|
||||
* Copyright (c) 2019 ML!PA Consulting GmbH
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/* SoC level DTS fixup file */
|
||||
|
||||
#define DT_FLASH_DEV_NAME DT_ATMEL_SAM0_NVMCTRL_0_LABEL
|
||||
|
||||
#define CONFIG_ENTROPY_NAME DT_ATMEL_SAM0_TRNG_0_LABEL
|
||||
|
||||
#define DT_NUM_IRQ_PRIO_BITS DT_ARM_V7M_NVIC_E000E100_ARM_NUM_IRQ_PRIORITY_BITS
|
||||
|
||||
/* End of SoC Level DTS fixup file */
|
8
soc/arm/atmel_sam0/same53/linker.ld
Normal file
8
soc/arm/atmel_sam0/same53/linker.ld
Normal file
|
@ -0,0 +1,8 @@
|
|||
/* linker.ld - Linker command/script file */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2017 Google LLC.
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <arch/arm/cortex_m/scripts/linker.ld>
|
44
soc/arm/atmel_sam0/same53/soc.h
Normal file
44
soc/arm/atmel_sam0/same53/soc.h
Normal file
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
* Copyright (c) 2019 ML!PA Consulting GmbH
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#ifndef _ATMEL_SAME53_SOC_H_
|
||||
#define _ATMEL_SAME53_SOC_H_
|
||||
|
||||
#ifndef _ASMLANGUAGE
|
||||
|
||||
#define DONT_USE_CMSIS_INIT
|
||||
|
||||
#include <zephyr/types.h>
|
||||
|
||||
#if defined(CONFIG_SOC_PART_NUMBER_SAME53J18A)
|
||||
#include <same53j18a.h>
|
||||
#elif defined(CONFIG_SOC_PART_NUMBER_SAME53J19A)
|
||||
#include <same53j19a.h>
|
||||
#elif defined(CONFIG_SOC_PART_NUMBER_SAME53J20A)
|
||||
#include <same53j20a.h>
|
||||
#elif defined(CONFIG_SOC_PART_NUMBER_SAME53N19A)
|
||||
#include <same53n19a.h>
|
||||
#elif defined(CONFIG_SOC_PART_NUMBER_SAME53N20A)
|
||||
#include <same53n20a.h>
|
||||
#else
|
||||
#error Library does not support the specified device.
|
||||
#endif
|
||||
|
||||
#endif /* _ASMLANGUAGE */
|
||||
|
||||
#include "sercom_fixup_samd5x.h"
|
||||
#include "tc_fixup_samd5x.h"
|
||||
|
||||
#define SOC_ATMEL_SAM0_OSC32K_FREQ_HZ 32768
|
||||
|
||||
/** Processor Clock (HCLK) Frequency */
|
||||
#define SOC_ATMEL_SAM0_HCLK_FREQ_HZ CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC
|
||||
/** Master Clock (MCK) Frequency */
|
||||
#define SOC_ATMEL_SAM0_MCK_FREQ_HZ SOC_ATMEL_SAM0_HCLK_FREQ_HZ
|
||||
#define SOC_ATMEL_SAM0_GCLK0_FREQ_HZ SOC_ATMEL_SAM0_MCK_FREQ_HZ
|
||||
#define SOC_ATMEL_SAM0_GCLK2_FREQ_HZ 48000000
|
||||
|
||||
#endif /* _ATMEL_SAME53_SOC_H_ */
|
Loading…
Add table
Add a link
Reference in a new issue