blob: 40080125a386c457a1ec4d60ab65e5a3eb170c3d [file] [log] [blame]
Martin Rothe9af73d2024-02-16 10:47:52 -07001## SPDX-License-Identifier: GPL-2.0-only
2
Martin Rothf3e26792016-12-22 10:21:11 -07003comment "Important: Run 'make distclean' before switching boards"
4
Patrick Georgi0588d192009-08-12 15:00:51 +00005choice
6 prompt "Mainboard vendor"
7 default VENDOR_EMULATION
8
Stefan Reinauer139e1062015-04-03 20:11:13 +02009source "src/mainboard/*/Kconfig.name"
Patrick Georgi0588d192009-08-12 15:00:51 +000010
11endchoice
12
Stefan Reinauer139e1062015-04-03 20:11:13 +020013source "src/mainboard/*/Kconfig"
Patrick Georgi0588d192009-08-12 15:00:51 +000014
Angel Pons9cddae12021-07-23 11:01:50 +020015config MAINBOARD_DIR
16 string
17
Angel Pons2c03ffc2021-07-23 11:11:02 +020018config MAINBOARD_PART_NUMBER
Sam McNally13475712022-10-17 14:57:43 +110019 string "Mainboard part number"
Angel Pons2c03ffc2021-07-23 11:11:02 +020020
Angel Pons7671bce2020-03-01 13:07:19 +010021config MAINBOARD_VENDOR
22 string "Mainboard vendor name"
23
Angel Ponsee3d09b2021-07-23 11:44:04 +020024config VARIANT_DIR
25 string
26
Uwe Hermannd65509d2009-10-16 17:37:20 +000027config BOARD_ROMSIZE_KB_256
28 bool
29config BOARD_ROMSIZE_KB_512
30 bool
31config BOARD_ROMSIZE_KB_1024
32 bool
33config BOARD_ROMSIZE_KB_2048
34 bool
35config BOARD_ROMSIZE_KB_4096
36 bool
Angel Pons50a44542019-12-14 16:16:31 +010037config BOARD_ROMSIZE_KB_5120
38 bool
Kacper Słomiński0d4f95b2019-01-17 22:36:32 +010039config BOARD_ROMSIZE_KB_6144
40 bool
Cristian Măgherușan-Stanciu46b033e2011-06-19 21:07:20 +000041config BOARD_ROMSIZE_KB_8192
42 bool
Jonathan Neuschäferd61c6702017-10-03 20:59:10 +020043config BOARD_ROMSIZE_KB_10240
44 bool
Vladimir Serbinenko01d06dc2014-01-15 15:52:31 +010045config BOARD_ROMSIZE_KB_12288
46 bool
Cristian Măgherușan-Stanciu46b033e2011-06-19 21:07:20 +000047config BOARD_ROMSIZE_KB_16384
48 bool
Maciej Pijanowski71981cc2024-01-18 22:36:06 +010049config BOARD_ROMSIZE_KB_24576
50 bool
Lee Leahy67358712016-06-08 12:47:07 -070051config BOARD_ROMSIZE_KB_32768
52 bool
53config BOARD_ROMSIZE_KB_65536
54 bool
Uwe Hermannd65509d2009-10-16 17:37:20 +000055
Uwe Hermann168b11b2009-10-07 16:15:40 +000056# TODO: No help text possible for choice fields?
Patrick Georgi0588d192009-08-12 15:00:51 +000057choice
58 prompt "ROM chip size"
Angel Pons3e576732020-03-01 13:28:36 +010059 default COREBOOT_ROMSIZE_KB_256 if BOARD_ROMSIZE_KB_256
60 default COREBOOT_ROMSIZE_KB_512 if BOARD_ROMSIZE_KB_512
61 default COREBOOT_ROMSIZE_KB_1024 if BOARD_ROMSIZE_KB_1024
62 default COREBOOT_ROMSIZE_KB_2048 if BOARD_ROMSIZE_KB_2048
63 default COREBOOT_ROMSIZE_KB_4096 if BOARD_ROMSIZE_KB_4096
64 default COREBOOT_ROMSIZE_KB_5120 if BOARD_ROMSIZE_KB_5120
65 default COREBOOT_ROMSIZE_KB_6144 if BOARD_ROMSIZE_KB_6144
66 default COREBOOT_ROMSIZE_KB_8192 if BOARD_ROMSIZE_KB_8192
Jonathan Neuschäferd61c6702017-10-03 20:59:10 +020067 default COREBOOT_ROMSIZE_KB_10240 if BOARD_ROMSIZE_KB_10240
Vladimir Serbinenko01d06dc2014-01-15 15:52:31 +010068 default COREBOOT_ROMSIZE_KB_12288 if BOARD_ROMSIZE_KB_12288
Cristian Măgherușan-Stanciu46b033e2011-06-19 21:07:20 +000069 default COREBOOT_ROMSIZE_KB_16384 if BOARD_ROMSIZE_KB_16384
Maciej Pijanowski71981cc2024-01-18 22:36:06 +010070 default COREBOOT_ROMSIZE_KB_24576 if BOARD_ROMSIZE_KB_24576
Lee Leahy67358712016-06-08 12:47:07 -070071 default COREBOOT_ROMSIZE_KB_32768 if BOARD_ROMSIZE_KB_32768
72 default COREBOOT_ROMSIZE_KB_65536 if BOARD_ROMSIZE_KB_65536
Uwe Hermann168b11b2009-10-07 16:15:40 +000073 help
74 Select the size of the ROM chip you intend to flash coreboot on.
75
76 The build system will take care of creating a coreboot.rom file
77 of the matching size.
Patrick Georgi0588d192009-08-12 15:00:51 +000078
Patrick Georgi0588d192009-08-12 15:00:51 +000079config COREBOOT_ROMSIZE_KB_256
80 bool "256 KB"
81 help
82 Choose this option if you have a 256 KB ROM chip.
83
84config COREBOOT_ROMSIZE_KB_512
85 bool "512 KB"
86 help
87 Choose this option if you have a 512 KB ROM chip.
88
89config COREBOOT_ROMSIZE_KB_1024
90 bool "1024 KB (1 MB)"
91 help
92 Choose this option if you have a 1024 KB (1 MB) ROM chip.
93
94config COREBOOT_ROMSIZE_KB_2048
95 bool "2048 KB (2 MB)"
96 help
97 Choose this option if you have a 2048 KB (2 MB) ROM chip.
98
Cristi Magherusan7e92ff32009-08-17 14:33:03 +000099config COREBOOT_ROMSIZE_KB_4096
100 bool "4096 KB (4 MB)"
101 help
102 Choose this option if you have a 4096 KB (4 MB) ROM chip.
103
Angel Pons50a44542019-12-14 16:16:31 +0100104config COREBOOT_ROMSIZE_KB_5120
105 bool "5120 KB (5 MB)"
106 help
107 Choose this option if you have a 5120 KB (5 MB) ROM chip.
108
Kacper Słomiński0d4f95b2019-01-17 22:36:32 +0100109config COREBOOT_ROMSIZE_KB_6144
110 bool "6144 KB (6 MB)"
111 help
112 Choose this option if you have a 6144 KB (6 MB) ROM chip.
113
Cristian Măgherușan-Stanciu46b033e2011-06-19 21:07:20 +0000114config COREBOOT_ROMSIZE_KB_8192
115 bool "8192 KB (8 MB)"
116 help
117 Choose this option if you have a 8192 KB (8 MB) ROM chip.
118
Jonathan Neuschäferd61c6702017-10-03 20:59:10 +0200119config COREBOOT_ROMSIZE_KB_10240
120 bool "10240 KB (10 MB)"
121 help
122 Choose this option if you have a 10240 KB (10 MB) ROM chip.
123
Vladimir Serbinenko01d06dc2014-01-15 15:52:31 +0100124config COREBOOT_ROMSIZE_KB_12288
125 bool "12288 KB (12 MB)"
126 help
127 Choose this option if you have a 12288 KB (12 MB) ROM chip.
128
Cristian Măgherușan-Stanciu46b033e2011-06-19 21:07:20 +0000129config COREBOOT_ROMSIZE_KB_16384
130 bool "16384 KB (16 MB)"
131 help
132 Choose this option if you have a 16384 KB (16 MB) ROM chip.
133
Maciej Pijanowski71981cc2024-01-18 22:36:06 +0100134config COREBOOT_ROMSIZE_KB_24576
135 bool "24576 KB (24 MB)"
136 help
137 Choose this option if you have a 24576 KB (24 MB) ROM chip.
138
Lee Leahy67358712016-06-08 12:47:07 -0700139config COREBOOT_ROMSIZE_KB_32768
140 bool "32768 KB (32 MB)"
141 help
142 Choose this option if you have a 32768 KB (32 MB) ROM chip.
143
144config COREBOOT_ROMSIZE_KB_65536
145 bool "65536 KB (64 MB)"
146 help
147 Choose this option if you have a 65536 KB (64 MB) ROM chip.
148
Patrick Georgi0588d192009-08-12 15:00:51 +0000149endchoice
150
Uwe Hermann168b11b2009-10-07 16:15:40 +0000151# Map the config names to an integer (KB).
Patrick Georgi0588d192009-08-12 15:00:51 +0000152config COREBOOT_ROMSIZE_KB
153 int
Angel Pons3e576732020-03-01 13:28:36 +0100154 default 256 if COREBOOT_ROMSIZE_KB_256
155 default 512 if COREBOOT_ROMSIZE_KB_512
156 default 1024 if COREBOOT_ROMSIZE_KB_1024
157 default 2048 if COREBOOT_ROMSIZE_KB_2048
158 default 4096 if COREBOOT_ROMSIZE_KB_4096
159 default 5120 if COREBOOT_ROMSIZE_KB_5120
160 default 6144 if COREBOOT_ROMSIZE_KB_6144
161 default 8192 if COREBOOT_ROMSIZE_KB_8192
Jonathan Neuschäferd61c6702017-10-03 20:59:10 +0200162 default 10240 if COREBOOT_ROMSIZE_KB_10240
Vladimir Serbinenko01d06dc2014-01-15 15:52:31 +0100163 default 12288 if COREBOOT_ROMSIZE_KB_12288
Cristian Măgherușan-Stanciu46b033e2011-06-19 21:07:20 +0000164 default 16384 if COREBOOT_ROMSIZE_KB_16384
Maciej Pijanowski71981cc2024-01-18 22:36:06 +0100165 default 24576 if COREBOOT_ROMSIZE_KB_24576
Lee Leahy67358712016-06-08 12:47:07 -0700166 default 32768 if COREBOOT_ROMSIZE_KB_32768
167 default 65536 if COREBOOT_ROMSIZE_KB_65536
Patrick Georgi0588d192009-08-12 15:00:51 +0000168
Uwe Hermann168b11b2009-10-07 16:15:40 +0000169# Map the config names to a hex value (bytes).
Patrick Georgi88f55b22009-09-25 18:43:02 +0000170config ROM_SIZE
171 hex
Angel Pons3e576732020-03-01 13:28:36 +0100172 default 0x00040000 if COREBOOT_ROMSIZE_KB_256
173 default 0x00080000 if COREBOOT_ROMSIZE_KB_512
174 default 0x00100000 if COREBOOT_ROMSIZE_KB_1024
175 default 0x00200000 if COREBOOT_ROMSIZE_KB_2048
176 default 0x00400000 if COREBOOT_ROMSIZE_KB_4096
177 default 0x00500000 if COREBOOT_ROMSIZE_KB_5120
178 default 0x00600000 if COREBOOT_ROMSIZE_KB_6144
179 default 0x00800000 if COREBOOT_ROMSIZE_KB_8192
180 default 0x00a00000 if COREBOOT_ROMSIZE_KB_10240
181 default 0x00c00000 if COREBOOT_ROMSIZE_KB_12288
182 default 0x01000000 if COREBOOT_ROMSIZE_KB_16384
Maciej Pijanowski71981cc2024-01-18 22:36:06 +0100183 default 0x01800000 if COREBOOT_ROMSIZE_KB_24576
Angel Pons3e576732020-03-01 13:28:36 +0100184 default 0x02000000 if COREBOOT_ROMSIZE_KB_32768
185 default 0x04000000 if COREBOOT_ROMSIZE_KB_65536
Patrick Georgi88f55b22009-09-25 18:43:02 +0000186
Peter Stuge51eafde2010-10-13 06:23:02 +0000187config ENABLE_POWER_BUTTON
188 bool "Enable the power button" if POWER_BUTTON_IS_OPTIONAL
189 default y if POWER_BUTTON_DEFAULT_ENABLE
190 default n if POWER_BUTTON_DEFAULT_DISABLE
191 help
192 The selected mainboard can optionally have the power button tied
193 to ground with a jumper so that the button appears to be
194 constantly depressed. If this option is enabled and the jumper is
195 installed then the board will turn on, but turn off again after a
196 short timeout, usually 4 seconds.
197
198 Select Y here if you have removed the jumper and want to use an
199 actual power button. Select N if you have the jumper installed.
200
201config ENABLE_POWER_BUTTON
202 def_bool y if !POWER_BUTTON_IS_OPTIONAL && POWER_BUTTON_FORCE_ENABLE
203 def_bool n if !POWER_BUTTON_IS_OPTIONAL && POWER_BUTTON_FORCE_DISABLE
Nico Huber9faae2b2018-11-14 00:00:35 +0100204
205config HAVE_POWER_STATE_AFTER_FAILURE
206 bool
207
208if HAVE_POWER_STATE_AFTER_FAILURE
209
210config HAVE_POWER_STATE_PREVIOUS_AFTER_FAILURE
211 bool
212
213config POWER_STATE_DEFAULT_ON_AFTER_FAILURE
214 bool
215 help
216 Selected by platforms or mainboards that want a "default on"
217 behaviour.
218
219choice
220 prompt "System Power State after Failure"
221 default POWER_STATE_ON_AFTER_FAILURE \
222 if POWER_STATE_DEFAULT_ON_AFTER_FAILURE
223 default POWER_STATE_OFF_AFTER_FAILURE
224 help
225 Provides a default for the power state the system should
226 go into after G3 (power loss). On many boards this can be
227 overridden by an NVRAM option.
228
229config POWER_STATE_OFF_AFTER_FAILURE
230 bool "S5 Soft Off"
231 help
232 Choose this option if you want to put system into
233 S5 after reapplying power after failure.
234
235config POWER_STATE_ON_AFTER_FAILURE
236 bool "S0 Full On"
237 help
238 Choose this option if you want to keep system in
239 S0 after reapplying power after failure.
240
241config POWER_STATE_PREVIOUS_AFTER_FAILURE
242 bool "Keep Previous State"
243 depends on HAVE_POWER_STATE_PREVIOUS_AFTER_FAILURE
244 help
245 Choose this option if you want to keep system in the
246 same power state as before failure after reapplying
247 power.
248
249endchoice
250
251config MAINBOARD_POWER_FAILURE_STATE
252 int
253 default 2 if POWER_STATE_PREVIOUS_AFTER_FAILURE
254 default 1 if POWER_STATE_ON_AFTER_FAILURE
255 default 0
256
257endif # HAVE_POWER_STATE_AFTER_FAILURE