|
| 1 | +/* |
| 2 | + * Copyright (c) 2019 ML!PA Consulting GmbH |
| 3 | + * |
| 4 | + * SPDX-License-Identifier: Apache-2.0 |
| 5 | + */ |
| 6 | + |
| 7 | +#ifndef _ATMEL_SAMD51_SOC_H_ |
| 8 | +#define _ATMEL_SAMD51_SOC_H_ |
| 9 | + |
| 10 | +#ifndef _ASMLANGUAGE |
| 11 | + |
| 12 | +#define DONT_USE_CMSIS_INIT |
| 13 | + |
| 14 | +#include <zephyr/types.h> |
| 15 | + |
| 16 | +#if defined(CONFIG_SOC_PART_NUMBER_SAMD51G18A) |
| 17 | +#include <samd51g18a.h> |
| 18 | +#elif defined(CONFIG_SOC_PART_NUMBER_SAMD51G19A) |
| 19 | +#include <samd51g19a.h> |
| 20 | +#elif defined(CONFIG_SOC_PART_NUMBER_SAMD51J18A) |
| 21 | +#include <samd51j18a.h> |
| 22 | +#elif defined(CONFIG_SOC_PART_NUMBER_SAMD51J19A) |
| 23 | +#include <samd51j19a.h> |
| 24 | +#elif defined(CONFIG_SOC_PART_NUMBER_SAMD51J20A) |
| 25 | +#include <samd51j20a.h> |
| 26 | +#elif defined(CONFIG_SOC_PART_NUMBER_SAMD51N19A) |
| 27 | +#include <samd51n19a.h> |
| 28 | +#elif defined(CONFIG_SOC_PART_NUMBER_SAMD51N20A) |
| 29 | +#include <samd51n20a.h> |
| 30 | +#elif defined(CONFIG_SOC_PART_NUMBER_SAMD51P19A) |
| 31 | +#include <samd51p19a.h> |
| 32 | +#elif defined(CONFIG_SOC_PART_NUMBER_SAMD51P20A) |
| 33 | +#include <samd51p20a.h> |
| 34 | +#else |
| 35 | +#error Library does not support the specified device. |
| 36 | +#endif |
| 37 | + |
| 38 | +#endif /* _ASMLANGUAGE */ |
| 39 | + |
| 40 | +#include "sercom_fixup_samd5x.h" |
| 41 | +#include "tc_fixup_samd5x.h" |
| 42 | + |
| 43 | +#define SOC_ATMEL_SAM0_OSC32K_FREQ_HZ 32768 |
| 44 | + |
| 45 | +/** Processor Clock (HCLK) Frequency */ |
| 46 | +#define SOC_ATMEL_SAM0_HCLK_FREQ_HZ CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC |
| 47 | +/** Master Clock (MCK) Frequency */ |
| 48 | +#define SOC_ATMEL_SAM0_MCK_FREQ_HZ SOC_ATMEL_SAM0_HCLK_FREQ_HZ |
| 49 | +#define SOC_ATMEL_SAM0_GCLK0_FREQ_HZ SOC_ATMEL_SAM0_MCK_FREQ_HZ |
| 50 | +#define SOC_ATMEL_SAM0_GCLK2_FREQ_HZ 48000000 |
| 51 | + |
| 52 | +#endif /* _ATMEL_SAMD51_SOC_H_ */ |
0 commit comments