1 /*
2  * Copyright (c) 2019 ML!PA Consulting GmbH
3  * Copyright (c) 2024 Gerson Fernando Budke <nandojve@gmail.com>
4  *
5  * SPDX-License-Identifier: Apache-2.0
6  */
7 
8 #ifndef _SOC_ATMEL_SAM0_SAME54_SOC_H_
9 #define _SOC_ATMEL_SAM0_SAME54_SOC_H_
10 
11 #ifndef _ASMLANGUAGE
12 
13 #define DONT_USE_CMSIS_INIT
14 
15 #include <zephyr/types.h>
16 
17 #if defined(CONFIG_SOC_SAME54N19A)
18 #include <same54n19a.h>
19 #elif defined(CONFIG_SOC_SAME54N20A)
20 #include <same54n20a.h>
21 #elif defined(CONFIG_SOC_SAME54P19A)
22 #include <same54p19a.h>
23 #elif defined(CONFIG_SOC_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 #define SOC_ATMEL_SAM0_DFLL48_FREQ_HZ 48000000
40 
41 /** Processor Clock (HCLK) Frequency */
42 #define SOC_ATMEL_SAM0_HCLK_FREQ_HZ CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC
43 /** Master Clock (MCK) Frequency */
44 #define SOC_ATMEL_SAM0_MCK_FREQ_HZ SOC_ATMEL_SAM0_HCLK_FREQ_HZ
45 #define SOC_ATMEL_SAM0_GCLK0_FREQ_HZ SOC_ATMEL_SAM0_MCK_FREQ_HZ
46 #define SOC_ATMEL_SAM0_GCLK2_FREQ_HZ 48000000
47 
48 #endif /* _SOC_ATMEL_SAM0_SAME54_SOC_H_ */
49