aboutsummaryrefslogtreecommitdiffstats
path: root/src/atsamd/Kconfig
blob: 5684ff6fb552c9989259e969be341cee7df7cd91 (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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
# 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
    select HAVE_STRICT_TIMING
    select HAVE_CHIPID

config HAVE_SERCOM
    depends on HAVE_GPIO_I2C || HAVE_GPIO_SPI
    bool
    default y

config BOARD_DIRECTORY
    string
    default "atsamd"

choice
    prompt "Processor model"
    config MACH_SAMD21G18
        bool "SAMD21G18 (Arduino Zero)"
        select MACH_SAMD21
    config MACH_SAMD21E18
        bool "SAMD21E18 (Adafruit Trinket M0)"
        select MACH_SAMD21
    config MACH_SAMD21E15
        bool "SAMD21E15"
        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 "samd21e18a" if MACH_SAMD21E18
    default "samd21e15a" if MACH_SAMD21E15
    default "samd51g19a" if MACH_SAMD51G19
    default "samd51j19a" if MACH_SAMD51J19
    default "samd51n19a" if MACH_SAMD51N19
    default "samd51p20a" if MACH_SAMD51P20

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

config RAM_START
    hex
    default 0x20000000

config RAM_SIZE
    hex
    default 0x1000 if MACH_SAMD21E15
    default 0x8000 if MACH_SAMD21G18 || MACH_SAMD21E18
    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_X25M
        bool "25Mhz crystal" if MACH_SAMD51
    config CLOCK_REF_INTERNAL
        bool "Internal clock"
endchoice

choice
    depends on MACH_SAMD51 && LOW_LEVEL_OPTIONS
    prompt "Processor speed"
    config SAMD51_FREQ_120
        bool "120 MHz (standard)"
    config SAMD51_FREQ_150
        bool "150 MHz (overclock)"
    config SAMD51_FREQ_180
        bool "180 MHz (overclock)"
    config SAMD51_FREQ_200
        bool "200 MHz (overclock)"
endchoice

config CLOCK_FREQ
    int
    default 48000000 if MACH_SAMD21
    default 150000000 if SAMD51_FREQ_150
    default 180000000 if SAMD51_FREQ_180
    default 200000000 if SAMD51_FREQ_200
    default 120000000 if MACH_SAMD51

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
config SERIAL
    bool
choice
    prompt "Communication interface"
    config ATSAMD_USB
        bool "USB"
        select USBSERIAL
    config ATSAMD_SERIAL
        bool "Serial"
        select SERIAL
endchoice

endif