aboutsummaryrefslogtreecommitdiffstats
path: root/src/atsamd/Kconfig
blob: 68232acd9bedafebc1b979aa84d3971e1edb2348 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# Kconfig settings for Atmel SAMD processors

if MACH_ATSAMD

config ATSAMD_SELECT
    bool
    default y
    select HAVE_GPIO
    select HAVE_GPIO_ADC
    select HAVE_GPIO_I2C
    select HAVE_GPIO_SPI
    select HAVE_GPIO_HARD_PWM if MACH_SAMD21
    select HAVE_GPIO_BITBANGING

config BOARD_DIRECTORY
    string
    default "atsamd"

choice
    prompt "Processor model"
    config MACH_SAMD21G18
        bool "SAMD21G18 (Arduino Zero)"
        select MACH_SAMD21
    config MACH_SAMD51G19
        bool "SAMD51G19 (Adafruit ItsyBitsy M4)"
        select MACH_SAMD51
    config MACH_SAMD51J19
        bool "SAMD51J19 (Adafruit Metro M4)"
        select MACH_SAMD51
    config MACH_SAMD51N19
        bool "SAMD51N19"
        select MACH_SAMD51
    config MACH_SAMD51P20
        bool "SAMD51P20 (Adafruit Grand Central)"
        select MACH_SAMD51
endchoice

config MACH_SAMD21
    bool
config MACH_SAMD51
    bool

config MCU
    string
    default "samd21g18a" if MACH_SAMD21G18
    default "samd51g19a" if MACH_SAMD51G19
    default "samd51j19a" if MACH_SAMD51J19
    default "samd51n19a" if MACH_SAMD51N19
    default "samd51p20a" if MACH_SAMD51P20

config CLOCK_FREQ
    int
    default 48000000 if MACH_SAMD21
    default 120000000 if MACH_SAMD51

config FLASH_SIZE
    hex
    default 0x40000 if MACH_SAMD21G18
    default 0x80000 if MACH_SAMD51G19 || MACH_SAMD51J19 || MACH_SAMD51N19
    default 0x100000 if MACH_SAMD51P20

config RAM_SIZE
    hex
    default 0x8000 if MACH_SAMD21G18
    default 0x30000 if MACH_SAMD51G19 || MACH_SAMD51J19 || MACH_SAMD51N19
    default 0x40000 if MACH_SAMD51P20

config STACK_SIZE
    int
    default 512

choice
    prompt "Clock Reference"
    config CLOCK_REF_X32K
        bool "32.768Khz crystal"
    config CLOCK_REF_INTERNAL
        bool "Internal clock"
endchoice

choice
    prompt "Bootloader offset"
    config FLASH_START_2000
        depends on MACH_SAMD21
        bool "8KiB bootloader (Arduino Zero)"
    config FLASH_START_4000
        bool "16KiB bootloader (Arduino M0)"
    config FLASH_START_0000
        bool "No bootloader"
endchoice

config FLASH_START
    hex
    default 0x4000 if FLASH_START_4000
    default 0x2000 if FLASH_START_2000
    default 0x0000

config USBSERIAL
    bool "Use USB for communication (instead of serial)" if MACH_SAMD21
    default y
config SERIAL
    depends on !USBSERIAL
    bool
    default y
config HAVE_SERCOM
    depends on HAVE_GPIO_I2C || HAVE_GPIO_SPI
    bool
    default y

endif