blob: bec96336fb30da8613f13eb24420abe80cdf8559 (
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
151
152
153
154
|
# Kconfig settings for RPxxxx processors
if MACH_RPXXXX
config RPXXXX_SELECT
bool
default y
select HAVE_GPIO
select HAVE_GPIO_ADC
select HAVE_GPIO_SPI
select HAVE_GPIO_I2C
select HAVE_STRICT_TIMING
select HAVE_CHIPID
select HAVE_GPIO_HARD_PWM
select HAVE_STEPPER_BOTH_EDGE
select HAVE_BOOTLOADER_REQUEST
config BOARD_DIRECTORY
string
default "rp2040"
######################################################################
# Chip selection
######################################################################
choice
prompt "Processor model"
config MACH_RP2040
bool "rp2040"
endchoice
config MCU
string
default "rp2040"
config CLOCK_FREQ
int
default 12000000
config FLASH_SIZE
hex
default 0x200000
config FLASH_BOOT_ADDRESS
hex
default 0x10000100 # Stage2 binary starts at 0x10000000
config RAM_START
hex
default 0x20000000
config RAM_SIZE
hex
default 0x42000
config STACK_SIZE
int
default 512
######################################################################
# Bootloader options
######################################################################
config RP2040_HAVE_STAGE2
bool
config RPXXXX_HAVE_BOOTLOADER
bool
default y if !RP2040_HAVE_STAGE2
choice
prompt "Bootloader offset"
config RPXXXX_FLASH_START_0100
bool "No bootloader"
select RP2040_HAVE_STAGE2
config RPXXXX_FLASH_START_4000
bool "16KiB bootloader"
endchoice
config FLASH_APPLICATION_ADDRESS
hex
default 0x10004000 if RPXXXX_FLASH_START_4000
default 0x10000100
choice
prompt "Flash chip" if LOW_LEVEL_OPTIONS && RP2040_HAVE_STAGE2
config RP2040_FLASH_W25Q080
bool "W25Q080 with CLKDIV 2"
config RP2040_FLASH_GENERIC_03
bool "GENERIC_03H with CLKDIV 4"
endchoice
config RP2040_STAGE2_FILE
string
default "boot2_generic_03h.S" if RP2040_FLASH_GENERIC_03
default "boot2_w25q080.S"
config RP2040_STAGE2_CLKDIV
int
default 4 if RP2040_FLASH_GENERIC_03
default 2
######################################################################
# Communication inteface
######################################################################
choice
prompt "Communication Interface"
config RPXXXX_USB
bool "USBSERIAL"
select USBSERIAL
config RPXXXX_SERIAL_UART0_PINS_0_1
bool "UART0 on GPIO0/GPIO1"
select SERIAL
config RPXXXX_SERIAL_UART0_PINS_12_13
bool "UART0 on GPIO12/GPIO13" if LOW_LEVEL_OPTIONS
select SERIAL
config RPXXXX_SERIAL_UART0_PINS_16_17
bool "UART0 on GPIO16/GPIO17" if LOW_LEVEL_OPTIONS
select SERIAL
config RPXXXX_SERIAL_UART0_PINS_28_29
bool "UART0 on GPIO28/GPIO29" if LOW_LEVEL_OPTIONS
select SERIAL
config RPXXXX_SERIAL_UART1_PINS_4_5
bool "UART1 on GPIO4/GPIO5" if LOW_LEVEL_OPTIONS
select SERIAL
config RPXXXX_SERIAL_UART1_PINS_8_9
bool "UART1 on GPIO8/GPIO9" if LOW_LEVEL_OPTIONS
select SERIAL
config RPXXXX_SERIAL_UART1_PINS_20_21
bool "UART1 on GPIO20/GPIO21" if LOW_LEVEL_OPTIONS
select SERIAL
config RPXXXX_SERIAL_UART1_PINS_24_25
bool "UART1 on GPIO24/GPIO25" if LOW_LEVEL_OPTIONS
select SERIAL
config RPXXXX_CANBUS
bool "CAN bus"
select CANSERIAL
config RPXXXX_USBCANBUS
bool "USB to CAN bus bridge"
select USBCANBUS
endchoice
config RPXXXX_CANBUS_GPIO_RX
int "CAN RX gpio number" if CANBUS
default 4
range 0 29
config RPXXXX_CANBUS_GPIO_TX
int "CAN TX gpio number" if CANBUS
default 5
range 0 29
endif
|