blob: aec996ab0b0c487b0d8879a8199dd10c3dc56049 [file] [log] [blame]
Martin Rothf3e26792016-12-22 10:21:11 -07001comment "Important: Run 'make distclean' before switching boards"
2
Patrick Georgi0588d192009-08-12 15:00:51 +00003choice
4 prompt "Mainboard vendor"
5 default VENDOR_EMULATION
6
Stefan Reinauer139e1062015-04-03 20:11:13 +02007source "src/mainboard/*/Kconfig.name"
Patrick Georgi0588d192009-08-12 15:00:51 +00008
9endchoice
10
Stefan Reinauer139e1062015-04-03 20:11:13 +020011source "src/mainboard/*/Kconfig"
Patrick Georgi0588d192009-08-12 15:00:51 +000012
Angel Pons9cddae12021-07-23 11:01:50 +020013config MAINBOARD_DIR
14 string
15
Angel Pons2c03ffc2021-07-23 11:11:02 +020016config MAINBOARD_PART_NUMBER
Sam McNally13475712022-10-17 14:57:43 +110017 string "Mainboard part number"
Angel Pons2c03ffc2021-07-23 11:11:02 +020018
Angel Pons7671bce2020-03-01 13:07:19 +010019config MAINBOARD_VENDOR
20 string "Mainboard vendor name"
21
Angel Ponsee3d09b2021-07-23 11:44:04 +020022config VARIANT_DIR
23 string
24
Uwe Hermannd65509d2009-10-16 17:37:20 +000025config BOARD_ROMSIZE_KB_256
26 bool
27config BOARD_ROMSIZE_KB_512
28 bool
29config BOARD_ROMSIZE_KB_1024
30 bool
31config BOARD_ROMSIZE_KB_2048
32 bool
33config BOARD_ROMSIZE_KB_4096
34 bool
Angel Pons50a44542019-12-14 16:16:31 +010035config BOARD_ROMSIZE_KB_5120
36 bool
Kacper Słomiński0d4f95b2019-01-17 22:36:32 +010037config BOARD_ROMSIZE_KB_6144
38 bool
Cristian Măgherușan-Stanciu46b033e2011-06-19 21:07:20 +000039config BOARD_ROMSIZE_KB_8192
40 bool
Jonathan Neuschäferd61c6702017-10-03 20:59:10 +020041config BOARD_ROMSIZE_KB_10240
42 bool
Vladimir Serbinenko01d06dc2014-01-15 15:52:31 +010043config BOARD_ROMSIZE_KB_12288
44 bool
Cristian Măgherușan-Stanciu46b033e2011-06-19 21:07:20 +000045config BOARD_ROMSIZE_KB_16384
46 bool
Lee Leahy67358712016-06-08 12:47:07 -070047config BOARD_ROMSIZE_KB_32768
48 bool
49config BOARD_ROMSIZE_KB_65536
50 bool
Uwe Hermannd65509d2009-10-16 17:37:20 +000051
Uwe Hermann168b11b2009-10-07 16:15:40 +000052# TODO: No help text possible for choice fields?
Patrick Georgi0588d192009-08-12 15:00:51 +000053choice
54 prompt "ROM chip size"
Angel Pons3e576732020-03-01 13:28:36 +010055 default COREBOOT_ROMSIZE_KB_256 if BOARD_ROMSIZE_KB_256
56 default COREBOOT_ROMSIZE_KB_512 if BOARD_ROMSIZE_KB_512
57 default COREBOOT_ROMSIZE_KB_1024 if BOARD_ROMSIZE_KB_1024
58 default COREBOOT_ROMSIZE_KB_2048 if BOARD_ROMSIZE_KB_2048
59 default COREBOOT_ROMSIZE_KB_4096 if BOARD_ROMSIZE_KB_4096
60 default COREBOOT_ROMSIZE_KB_5120 if BOARD_ROMSIZE_KB_5120
61 default COREBOOT_ROMSIZE_KB_6144 if BOARD_ROMSIZE_KB_6144
62 default COREBOOT_ROMSIZE_KB_8192 if BOARD_ROMSIZE_KB_8192
Jonathan Neuschäferd61c6702017-10-03 20:59:10 +020063 default COREBOOT_ROMSIZE_KB_10240 if BOARD_ROMSIZE_KB_10240
Vladimir Serbinenko01d06dc2014-01-15 15:52:31 +010064 default COREBOOT_ROMSIZE_KB_12288 if BOARD_ROMSIZE_KB_12288
Cristian Măgherușan-Stanciu46b033e2011-06-19 21:07:20 +000065 default COREBOOT_ROMSIZE_KB_16384 if BOARD_ROMSIZE_KB_16384
Lee Leahy67358712016-06-08 12:47:07 -070066 default COREBOOT_ROMSIZE_KB_32768 if BOARD_ROMSIZE_KB_32768
67 default COREBOOT_ROMSIZE_KB_65536 if BOARD_ROMSIZE_KB_65536
Uwe Hermann168b11b2009-10-07 16:15:40 +000068 help
69 Select the size of the ROM chip you intend to flash coreboot on.
70
71 The build system will take care of creating a coreboot.rom file
72 of the matching size.
Patrick Georgi0588d192009-08-12 15:00:51 +000073
Patrick Georgi0588d192009-08-12 15:00:51 +000074config COREBOOT_ROMSIZE_KB_256
75 bool "256 KB"
76 help
77 Choose this option if you have a 256 KB ROM chip.
78
79config COREBOOT_ROMSIZE_KB_512
80 bool "512 KB"
81 help
82 Choose this option if you have a 512 KB ROM chip.
83
84config COREBOOT_ROMSIZE_KB_1024
85 bool "1024 KB (1 MB)"
86 help
87 Choose this option if you have a 1024 KB (1 MB) ROM chip.
88
89config COREBOOT_ROMSIZE_KB_2048
90 bool "2048 KB (2 MB)"
91 help
92 Choose this option if you have a 2048 KB (2 MB) ROM chip.
93
Cristi Magherusan7e92ff32009-08-17 14:33:03 +000094config COREBOOT_ROMSIZE_KB_4096
95 bool "4096 KB (4 MB)"
96 help
97 Choose this option if you have a 4096 KB (4 MB) ROM chip.
98
Angel Pons50a44542019-12-14 16:16:31 +010099config COREBOOT_ROMSIZE_KB_5120
100 bool "5120 KB (5 MB)"
101 help
102 Choose this option if you have a 5120 KB (5 MB) ROM chip.
103
Kacper Słomiński0d4f95b2019-01-17 22:36:32 +0100104config COREBOOT_ROMSIZE_KB_6144
105 bool "6144 KB (6 MB)"
106 help
107 Choose this option if you have a 6144 KB (6 MB) ROM chip.
108
Cristian Măgherușan-Stanciu46b033e2011-06-19 21:07:20 +0000109config COREBOOT_ROMSIZE_KB_8192
110 bool "8192 KB (8 MB)"
111 help
112 Choose this option if you have a 8192 KB (8 MB) ROM chip.
113
Jonathan Neuschäferd61c6702017-10-03 20:59:10 +0200114config COREBOOT_ROMSIZE_KB_10240
115 bool "10240 KB (10 MB)"
116 help
117 Choose this option if you have a 10240 KB (10 MB) ROM chip.
118
Vladimir Serbinenko01d06dc2014-01-15 15:52:31 +0100119config COREBOOT_ROMSIZE_KB_12288
120 bool "12288 KB (12 MB)"
121 help
122 Choose this option if you have a 12288 KB (12 MB) ROM chip.
123
Cristian Măgherușan-Stanciu46b033e2011-06-19 21:07:20 +0000124config COREBOOT_ROMSIZE_KB_16384
125 bool "16384 KB (16 MB)"
126 help
127 Choose this option if you have a 16384 KB (16 MB) ROM chip.
128
Lee Leahy67358712016-06-08 12:47:07 -0700129config COREBOOT_ROMSIZE_KB_32768
130 bool "32768 KB (32 MB)"
131 help
132 Choose this option if you have a 32768 KB (32 MB) ROM chip.
133
134config COREBOOT_ROMSIZE_KB_65536
135 bool "65536 KB (64 MB)"
136 help
137 Choose this option if you have a 65536 KB (64 MB) ROM chip.
138
Patrick Georgi0588d192009-08-12 15:00:51 +0000139endchoice
140
Uwe Hermann168b11b2009-10-07 16:15:40 +0000141# Map the config names to an integer (KB).
Patrick Georgi0588d192009-08-12 15:00:51 +0000142config COREBOOT_ROMSIZE_KB
143 int
Angel Pons3e576732020-03-01 13:28:36 +0100144 default 256 if COREBOOT_ROMSIZE_KB_256
145 default 512 if COREBOOT_ROMSIZE_KB_512
146 default 1024 if COREBOOT_ROMSIZE_KB_1024
147 default 2048 if COREBOOT_ROMSIZE_KB_2048
148 default 4096 if COREBOOT_ROMSIZE_KB_4096
149 default 5120 if COREBOOT_ROMSIZE_KB_5120
150 default 6144 if COREBOOT_ROMSIZE_KB_6144
151 default 8192 if COREBOOT_ROMSIZE_KB_8192
Jonathan Neuschäferd61c6702017-10-03 20:59:10 +0200152 default 10240 if COREBOOT_ROMSIZE_KB_10240
Vladimir Serbinenko01d06dc2014-01-15 15:52:31 +0100153 default 12288 if COREBOOT_ROMSIZE_KB_12288
Cristian Măgherușan-Stanciu46b033e2011-06-19 21:07:20 +0000154 default 16384 if COREBOOT_ROMSIZE_KB_16384
Lee Leahy67358712016-06-08 12:47:07 -0700155 default 32768 if COREBOOT_ROMSIZE_KB_32768
156 default 65536 if COREBOOT_ROMSIZE_KB_65536
Patrick Georgi0588d192009-08-12 15:00:51 +0000157
Uwe Hermann168b11b2009-10-07 16:15:40 +0000158# Map the config names to a hex value (bytes).
Patrick Georgi88f55b22009-09-25 18:43:02 +0000159config ROM_SIZE
160 hex
Angel Pons3e576732020-03-01 13:28:36 +0100161 default 0x00040000 if COREBOOT_ROMSIZE_KB_256
162 default 0x00080000 if COREBOOT_ROMSIZE_KB_512
163 default 0x00100000 if COREBOOT_ROMSIZE_KB_1024
164 default 0x00200000 if COREBOOT_ROMSIZE_KB_2048
165 default 0x00400000 if COREBOOT_ROMSIZE_KB_4096
166 default 0x00500000 if COREBOOT_ROMSIZE_KB_5120
167 default 0x00600000 if COREBOOT_ROMSIZE_KB_6144
168 default 0x00800000 if COREBOOT_ROMSIZE_KB_8192
169 default 0x00a00000 if COREBOOT_ROMSIZE_KB_10240
170 default 0x00c00000 if COREBOOT_ROMSIZE_KB_12288
171 default 0x01000000 if COREBOOT_ROMSIZE_KB_16384
172 default 0x02000000 if COREBOOT_ROMSIZE_KB_32768
173 default 0x04000000 if COREBOOT_ROMSIZE_KB_65536
Patrick Georgi88f55b22009-09-25 18:43:02 +0000174
Peter Stuge51eafde2010-10-13 06:23:02 +0000175config ENABLE_POWER_BUTTON
176 bool "Enable the power button" if POWER_BUTTON_IS_OPTIONAL
177 default y if POWER_BUTTON_DEFAULT_ENABLE
178 default n if POWER_BUTTON_DEFAULT_DISABLE
179 help
180 The selected mainboard can optionally have the power button tied
181 to ground with a jumper so that the button appears to be
182 constantly depressed. If this option is enabled and the jumper is
183 installed then the board will turn on, but turn off again after a
184 short timeout, usually 4 seconds.
185
186 Select Y here if you have removed the jumper and want to use an
187 actual power button. Select N if you have the jumper installed.
188
189config ENABLE_POWER_BUTTON
190 def_bool y if !POWER_BUTTON_IS_OPTIONAL && POWER_BUTTON_FORCE_ENABLE
191 def_bool n if !POWER_BUTTON_IS_OPTIONAL && POWER_BUTTON_FORCE_DISABLE
Nico Huber9faae2b2018-11-14 00:00:35 +0100192
193config HAVE_POWER_STATE_AFTER_FAILURE
194 bool
195
196if HAVE_POWER_STATE_AFTER_FAILURE
197
198config HAVE_POWER_STATE_PREVIOUS_AFTER_FAILURE
199 bool
200
201config POWER_STATE_DEFAULT_ON_AFTER_FAILURE
202 bool
203 help
204 Selected by platforms or mainboards that want a "default on"
205 behaviour.
206
207choice
208 prompt "System Power State after Failure"
209 default POWER_STATE_ON_AFTER_FAILURE \
210 if POWER_STATE_DEFAULT_ON_AFTER_FAILURE
211 default POWER_STATE_OFF_AFTER_FAILURE
212 help
213 Provides a default for the power state the system should
214 go into after G3 (power loss). On many boards this can be
215 overridden by an NVRAM option.
216
217config POWER_STATE_OFF_AFTER_FAILURE
218 bool "S5 Soft Off"
219 help
220 Choose this option if you want to put system into
221 S5 after reapplying power after failure.
222
223config POWER_STATE_ON_AFTER_FAILURE
224 bool "S0 Full On"
225 help
226 Choose this option if you want to keep system in
227 S0 after reapplying power after failure.
228
229config POWER_STATE_PREVIOUS_AFTER_FAILURE
230 bool "Keep Previous State"
231 depends on HAVE_POWER_STATE_PREVIOUS_AFTER_FAILURE
232 help
233 Choose this option if you want to keep system in the
234 same power state as before failure after reapplying
235 power.
236
237endchoice
238
239config MAINBOARD_POWER_FAILURE_STATE
240 int
241 default 2 if POWER_STATE_PREVIOUS_AFTER_FAILURE
242 default 1 if POWER_STATE_ON_AFTER_FAILURE
243 default 0
244
245endif # HAVE_POWER_STATE_AFTER_FAILURE