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_SAMD51_SOC_H_ 9 #define _SOC_ATMEL_SAM0_SAMD51_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_SAMD51G18A) 18 #include <samd51g18a.h> 19 #elif defined(CONFIG_SOC_SAMD51G19A) 20 #include <samd51g19a.h> 21 #elif defined(CONFIG_SOC_SAMD51J18A) 22 #include <samd51j18a.h> 23 #elif defined(CONFIG_SOC_SAMD51J19A) 24 #include <samd51j19a.h> 25 #elif defined(CONFIG_SOC_SAMD51J20A) 26 #include <samd51j20a.h> 27 #elif defined(CONFIG_SOC_SAMD51N19A) 28 #include <samd51n19a.h> 29 #elif defined(CONFIG_SOC_SAMD51N20A) 30 #include <samd51n20a.h> 31 #elif defined(CONFIG_SOC_SAMD51P19A) 32 #include <samd51p19a.h> 33 #elif defined(CONFIG_SOC_SAMD51P20A) 34 #include <samd51p20a.h> 35 #else 36 #error Library does not support the specified device. 37 #endif 38 39 #endif /* _ASMLANGUAGE */ 40 41 #include "sercom_fixup_samd5x.h" 42 #include "tc_fixup_samd5x.h" 43 #include "adc_fixup_sam0.h" 44 #include "../common/soc_port.h" 45 #include "../common/atmel_sam0_dt.h" 46 47 #define SOC_ATMEL_SAM0_OSC32K_FREQ_HZ 32768 48 49 /** Processor Clock (HCLK) Frequency */ 50 #define SOC_ATMEL_SAM0_HCLK_FREQ_HZ CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC 51 /** Master Clock (MCK) Frequency */ 52 #define SOC_ATMEL_SAM0_MCK_FREQ_HZ SOC_ATMEL_SAM0_HCLK_FREQ_HZ 53 #define SOC_ATMEL_SAM0_GCLK0_FREQ_HZ SOC_ATMEL_SAM0_MCK_FREQ_HZ 54 #define SOC_ATMEL_SAM0_GCLK2_FREQ_HZ 48000000 55 56 #endif /* _SOC_ATMEL_SAM0_SAMD51_SOC_H_ */ 57