1 /* 2 * Copyright (c) 2022 Kamil Serwus 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_SAMC20_SOC_H_ 9 #define _SOC_ATMEL_SAM0_SAMC20_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_SAMC20E15A) 18 #include <samc20e15a.h> 19 #elif defined(CONFIG_SOC_SAMC20E16A) 20 #include <samc20e16a.h> 21 #elif defined(CONFIG_SOC_SAMC20E17A) 22 #include <samc20e17a.h> 23 #elif defined(CONFIG_SOC_SAMC20E18A) 24 #include <samc20e18a.h> 25 #elif defined(CONFIG_SOC_SAMC20G15A) 26 #include <samc20g15a.h> 27 #elif defined(CONFIG_SOC_SAMC20G16A) 28 #include <samc20g16a.h> 29 #elif defined(CONFIG_SOC_SAMC20G17A) 30 #include <samc20g17a.h> 31 #elif defined(CONFIG_SOC_SAMC20G18A) 32 #include <samc20g18a.h> 33 #elif defined(CONFIG_SOC_SAMC20J15A) 34 #include <samc20j15a.h> 35 #elif defined(CONFIG_SOC_SAMC20J16A) 36 #include <samc20j16a.h> 37 #elif defined(CONFIG_SOC_SAMC20J17A) 38 #include <samc20j17a.h> 39 #elif defined(CONFIG_SOC_SAMC20J18A) 40 #include <samc20j18a.h> 41 #elif defined(CONFIG_SOC_SAMC20J17AU) 42 #include <samc20j17au.h> 43 #elif defined(CONFIG_SOC_SAMC20J18AU) 44 #include <samc20j18au.h> 45 #elif defined(CONFIG_SOC_SAMC20N17A) 46 #include <samc20n17a.h> 47 #elif defined(CONFIG_SOC_SAMC20N18A) 48 #include <samc20n18a.h> 49 #else 50 #error Library does not support the specified device. 51 #endif 52 53 #endif /* _ASMLANGUAGE */ 54 55 #define ADC_SAM0_REFERENCE_ENABLE_PROTECTED 56 57 #include "adc_fixup_sam0.h" 58 #include "../common/soc_port.h" 59 #include "../common/atmel_sam0_dt.h" 60 61 #define SOC_ATMEL_SAM0_OSC32K_FREQ_HZ 32768 62 #define SOC_ATMEL_SAM0_OSC48M_FREQ_HZ 48000000 63 64 /** Processor Clock (HCLK) Frequency */ 65 #define SOC_ATMEL_SAM0_HCLK_FREQ_HZ CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC 66 /** Master Clock (MCK) Frequency */ 67 #define SOC_ATMEL_SAM0_MCK_FREQ_HZ SOC_ATMEL_SAM0_HCLK_FREQ_HZ 68 #define SOC_ATMEL_SAM0_GCLK0_FREQ_HZ SOC_ATMEL_SAM0_MCK_FREQ_HZ 69 70 #endif /* _SOC_ATMEL_SAM0_SAMC20_SOC_H_ */ 71