1 /*
2  * Copyright (c) 2019 ML!PA Consulting GmbH
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #ifndef _ATMEL_SAME54_SOC_H_
8 #define _ATMEL_SAME54_SOC_H_
9 
10 #ifndef _ASMLANGUAGE
11 
12 #define DONT_USE_CMSIS_INIT
13 
14 #include <zephyr/types.h>
15 
16 
17 #if defined(CONFIG_SOC_PART_NUMBER_SAME54N19A)
18 #include <same54n19a.h>
19 #elif defined(CONFIG_SOC_PART_NUMBER_SAME54N20A)
20 #include <same54n20a.h>
21 #elif defined(CONFIG_SOC_PART_NUMBER_SAME54P19A)
22 #include <same54p19a.h>
23 #elif defined(CONFIG_SOC_PART_NUMBER_SAME54P20A)
24 #include <same54p20a.h>
25 #else
26 #error Library does not support the specified device.
27 #endif
28 
29 #endif /* _ASMLANGUAGE */
30 
31 #include "sercom_fixup_samd5x.h"
32 #include "tc_fixup_samd5x.h"
33 #include "gmac_fixup_samd5x.h"
34 #include "adc_fixup_sam0.h"
35 #include "../common/soc_port.h"
36 #include "../common/atmel_sam0_dt.h"
37 
38 #define SOC_ATMEL_SAM0_OSC32K_FREQ_HZ 32768
39 
40 /** Processor Clock (HCLK) Frequency */
41 #define SOC_ATMEL_SAM0_HCLK_FREQ_HZ CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC
42 /** Master Clock (MCK) Frequency */
43 #define SOC_ATMEL_SAM0_MCK_FREQ_HZ SOC_ATMEL_SAM0_HCLK_FREQ_HZ
44 #define SOC_ATMEL_SAM0_GCLK0_FREQ_HZ SOC_ATMEL_SAM0_MCK_FREQ_HZ
45 #define SOC_ATMEL_SAM0_GCLK2_FREQ_HZ 48000000
46 
47 #endif /* _ATMEL_SAME54_SOC_H_ */
48