blob: 2ef90eb5f4b2c9e55aa7f6899826a9a93e04ebd0 [file] [log] [blame]
Felix Held4a8cd722020-04-18 22:26:39 +02001# SPDX-License-Identifier: GPL-2.0-only
Marc Jones24484842017-05-04 21:17:45 -06002
Marshall Dawson68519222019-11-25 11:36:15 -07003config SOC_AMD_STONEYRIDGE
4 bool
5 help
6 AMD support for SOCs in Family 15h Models 60h-6Fh and Models 70h-7Fh.
7
8if SOC_AMD_STONEYRIDGE
9
Marc Jones21cde8b2017-05-07 16:47:36 -060010config CPU_SPECIFIC_OPTIONS
11 def_bool y
Angel Ponsa32df262020-09-25 10:20:11 +020012 select ARCH_ALL_STAGES_X86_32
Marshall Dawson82145a12017-10-20 12:36:35 -060013 select X86_AMD_FIXED_MTRRS
Marshall Dawson68592c32017-11-06 10:56:52 -070014 select ACPI_AMD_HARDWARE_SLEEP_VALUES
Aaron Durbin51e4c1a2018-01-24 17:42:51 -070015 select COLLECT_TIMESTAMPS_NO_TSC
Chris Ching6fc39d42017-12-20 16:06:03 -070016 select DRIVERS_I2C_DESIGNWARE
Marc Jones9156cac2017-07-12 11:05:38 -060017 select GENERIC_GPIO_LIB
Aaron Durbin51e4c1a2018-01-24 17:42:51 -070018 select GENERIC_UDELAY
Marc Jones24484842017-05-04 21:17:45 -060019 select IOAPIC
Angel Ponsb74975e2020-07-13 01:12:57 +020020 select HAVE_CF9_RESET
Marc Jones24484842017-05-04 21:17:45 -060021 select HAVE_USBDEBUG_OPTIONS
Richard Spiegelbf171242019-08-21 10:09:51 -070022 select SOC_AMD_COMMON_BLOCK_SPI
Marc Jones21cde8b2017-05-07 16:47:36 -060023 select TSC_SYNC_LFENCE
Marc Jones1587dc82017-05-15 18:55:11 -060024 select SOC_AMD_PI
Marshall Dawson68243a52017-06-15 16:59:20 -060025 select SOC_AMD_COMMON
26 select SOC_AMD_COMMON_BLOCK
Marshall Dawsonec63a712019-05-03 12:55:16 -060027 select SOC_AMD_COMMON_BLOCK_IOMMU
Marshall Dawson69486ca2019-05-02 12:03:45 -060028 select SOC_AMD_COMMON_BLOCK_ACPIMMIO
Marshall Dawson251d3052019-05-02 17:27:57 -060029 select SOC_AMD_COMMON_BLOCK_BANKED_GPIOS
Marshall Dawson3ce03602019-05-03 10:20:44 -060030 select SOC_AMD_COMMON_BLOCK_ACPI
Marshall Dawson6ab5ed32019-05-29 09:24:18 -060031 select SOC_AMD_COMMON_BLOCK_LPC
Richard Spiegel2bbc3dc2017-12-06 16:14:58 -070032 select SOC_AMD_COMMON_BLOCK_PCI
Marshall Dawson43c26cb2019-05-03 12:42:29 -060033 select SOC_AMD_COMMON_BLOCK_HDA
Marshall Dawsonaa67def2019-05-03 16:10:34 -060034 select SOC_AMD_COMMON_BLOCK_SATA
Richard Spiegel19f67a32017-12-08 18:16:02 -070035 select SOC_AMD_COMMON_BLOCK_PI
Marshall Dawsond6b72362020-03-05 11:44:24 -070036 select SOC_AMD_COMMON_BLOCK_PSP_GEN1
Marshall Dawson9df969a2017-07-25 18:46:46 -060037 select SOC_AMD_COMMON_BLOCK_CAR
Kyösti Mälkkia8eb4772018-06-28 17:23:27 +030038 select SOC_AMD_COMMON_BLOCK_S3
Aaron Durbin3d2e18a2020-01-28 11:20:05 -070039 select SOC_AMD_COMMON_BLOCK_SMBUS
John E. Kabat Jraf327702017-11-29 18:49:37 -070040 select BOOT_DEVICE_SUPPORTS_WRITES if BOOT_DEVICE_SPI_FLASH
Marshall Dawsona7bfbbe2017-09-13 17:24:53 -060041 select PARALLEL_MP
Marc Jones33eef132017-10-26 16:50:42 -060042 select PARALLEL_MP_AP_WORK
Marshall Dawsonb6172112017-09-13 17:47:31 -060043 select HAVE_SMI_HANDLER
Martin Roth37b8bde2017-09-26 09:41:10 -060044 select SSE2
Marc Jones17e85ad2017-12-20 16:21:25 -070045 select RTC
Kyösti Mälkkic3c55212020-06-17 10:34:26 +030046 select ACPI_NO_SMI_GNVS
Marc Jones24484842017-05-04 21:17:45 -060047
Marshall Dawson12294d02019-11-25 07:21:18 -070048config AMD_APU_STONEYRIDGE
49 bool
50 help
51 AMD Stoney Ridge APU
52
Marshall Dawsone1988f52019-11-25 11:15:35 -070053config AMD_APU_PRAIRIEFALCON
54 bool
55 help
56 AMD Embedded Prairie Falcon APU
57
Marshall Dawson12294d02019-11-25 07:21:18 -070058config AMD_APU_MERLINFALCON
59 bool
60 help
Marshall Dawsone1988f52019-11-25 11:15:35 -070061 AMD Embedded Merlin Falcon APU
Marshall Dawson12294d02019-11-25 07:21:18 -070062
Marshall Dawson3ac0ab52019-11-24 19:03:56 -070063config AMD_APU_PKG_FP4
64 bool
65 help
66 AMD FP4 package
67
68config AMD_APU_PKG_FT4
69 bool
70 help
71 AMD FT4 package
72
73config AMD_SOC_PACKAGE
74 string
75 default "FP4" if AMD_APU_PKG_FP4
76 default "FT4" if AMD_APU_PKG_FT4
77
Marshall Dawsone7557de2017-06-09 16:35:14 -060078config VBOOT
Marshall Dawsone7557de2017-06-09 16:35:14 -060079 select VBOOT_SEPARATE_VERSTAGE
80 select VBOOT_STARTS_IN_BOOTBLOCK
Marc Jones4c887ea2018-04-25 16:43:18 -060081 select VBOOT_VBNV_CMOS
82 select VBOOT_VBNV_CMOS_BACKUP_TO_FLASH
Marshall Dawsone7557de2017-06-09 16:35:14 -060083
Marc Jones21cde8b2017-05-07 16:47:36 -060084# TODO: Sync these with definitions in PI vendorcode.
85# DCACHE_RAM_BASE must equal BSP_STACK_BASE_ADDR.
86# DCACHE_RAM_SIZE must equal BSP_STACK_SIZE.
87
88config DCACHE_RAM_BASE
89 hex
90 default 0x30000
91
92config DCACHE_RAM_SIZE
93 hex
94 default 0x10000
95
Marshall Dawson9df969a2017-07-25 18:46:46 -060096config DCACHE_BSP_STACK_SIZE
Marshall Dawson9df969a2017-07-25 18:46:46 -060097 hex
98 default 0x4000
99 help
100 The amount of anticipated stack usage in CAR by bootblock and
101 other stages.
102
Marshall Dawson7c3f1e72017-08-24 09:59:10 -0600103config PRERAM_CBMEM_CONSOLE_SIZE
104 hex
Marshall Dawson1df6bc62017-12-19 20:41:29 -0700105 default 0x1600
Marshall Dawson7c3f1e72017-08-24 09:59:10 -0600106 help
107 Increase this value if preram cbmem console is getting truncated
108
Marc Jones21cde8b2017-05-07 16:47:36 -0600109config CPU_ADDR_BITS
110 int
111 default 48
112
Marc Jones1587dc82017-05-15 18:55:11 -0600113config BOTTOMIO_POSITION
114 hex "Bottom of 32-bit IO space"
115 default 0xD0000000
116 help
117 If PCI peripherals with big BARs are connected to the system
118 the bottom of the IO must be decreased to allocate such
119 devices.
120
121 Declare the beginning of the 128MB-aligned MMIO region. This
122 option is useful when PCI peripherals requesting large address
123 ranges are present.
124
Marc Jones1587dc82017-05-15 18:55:11 -0600125config MMCONF_BASE_ADDRESS
126 hex
127 default 0xF8000000
128
129config MMCONF_BUS_NUMBER
130 int
131 default 64
132
133config VGA_BIOS_ID
134 string
Marshall Dawson12294d02019-11-25 07:21:18 -0700135 default "1002,9874" if AMD_APU_MERLINFALCON
Marc Jones1587dc82017-05-15 18:55:11 -0600136 default "1002,98e4"
137 help
138 The default VGA BIOS PCI vendor/device ID should be set to the
139 result of the map_oprom_vendev() function in northbridge.c.
140
141config VGA_BIOS_FILE
142 string
Marshall Dawson91e7fe72019-11-24 17:19:19 -0700143 default "" if !USE_AMD_BLOBS
Marshall Dawson7987c1c2019-11-25 08:29:28 -0700144 default "3rdparty/amd_blobs/stoneyridge/CarrizoGenericVbios.bin" if AMD_APU_MERLINFALCON
Marshall Dawsone1988f52019-11-25 11:15:35 -0700145 default "3rdparty/amd_blobs/stoneyridge/StoneyGenericVbios.bin" if AMD_APU_PRAIRIEFALCON
146 default "3rdparty/amd_blobs/stoneyridge/StoneyGenericVbios.bin" if AMD_APU_STONEYRIDGE
Marc Jones1587dc82017-05-15 18:55:11 -0600147
Marshall Dawson668dea02017-11-29 09:57:15 -0700148config S3_VGA_ROM_RUN
149 bool
150 default n
151
Marc Jones1587dc82017-05-15 18:55:11 -0600152config HEAP_SIZE
153 hex
154 default 0xc0000
155
Marc Jones24484842017-05-04 21:17:45 -0600156config EHCI_BAR
157 hex
158 default 0xfef00000
159
160config STONEYRIDGE_XHCI_ENABLE
161 bool "Enable Stoney Ridge XHCI Controller"
162 default y
163 help
164 The XHCI controller must be enabled and the XHCI firmware
165 must be added in order to have USB 3.0 support configured
166 by coreboot. The OS will be responsible for enabling the XHCI
Jonathan Neuschäfer45e6c822018-12-11 17:53:07 +0100167 controller if the XHCI firmware is available but the
Marc Jones24484842017-05-04 21:17:45 -0600168 XHCI controller is not enabled by coreboot.
169
170config STONEYRIDGE_XHCI_FWM
171 bool "Add xhci firmware"
172 default y
173 help
174 Add Stoney Ridge XHCI Firmware to support the onboard USB 3.0
175
Marc Jones24484842017-05-04 21:17:45 -0600176config STONEYRIDGE_GEC_FWM
177 bool
178 default n
179 help
180 Add Stoney Ridge GEC Firmware to support the onboard gigabit Ethernet MAC.
181 Must be connected to a Broadcom B50610 or B50610M PHY on the motherboard.
182
183config STONEYRIDGE_XHCI_FWM_FILE
184 string "XHCI firmware path and filename"
Marshall Dawson91e7fe72019-11-24 17:19:19 -0700185 default "" if !USE_AMD_BLOBS
Marshall Dawson7987c1c2019-11-25 08:29:28 -0700186 default "3rdparty/amd_blobs/stoneyridge/xhci.bin"
Marc Jones24484842017-05-04 21:17:45 -0600187 depends on STONEYRIDGE_XHCI_FWM
188
Marc Jones24484842017-05-04 21:17:45 -0600189config STONEYRIDGE_GEC_FWM_FILE
190 string "GEC firmware path and filename"
191 depends on STONEYRIDGE_GEC_FWM
192
193config AMD_PUBKEY_FILE
194 string "AMD public Key"
Marshall Dawson91e7fe72019-11-24 17:19:19 -0700195 default "" if !USE_AMD_BLOBS
Marshall Dawson7987c1c2019-11-25 08:29:28 -0700196 default "3rdparty/amd_blobs/stoneyridge/PSP/CZ/AmdPubKeyCZ.bin" if AMD_APU_MERLINFALCON
Marshall Dawsone1988f52019-11-25 11:15:35 -0700197 default "3rdparty/amd_blobs/stoneyridge/PSP/ST/AmdPubKeyST.bin" if AMD_APU_PRAIRIEFALCON
198 default "3rdparty/amd_blobs/stoneyridge/PSP/ST/AmdPubKeyST.bin" if AMD_APU_STONEYRIDGE
Marc Jones24484842017-05-04 21:17:45 -0600199
200config STONEYRIDGE_SATA_MODE
201 int "SATA Mode"
202 default 0
203 range 0 6
204 help
205 Select the mode in which SATA should be driven.
206 The default is NATIVE.
207 0: NATIVE mode does not require a ROM.
208 2: AHCI may work with or without AHCI ROM. It depends on the payload support.
209 For example, seabios does not require the AHCI ROM.
210 3: LEGACY IDE
211 4: IDE to AHCI
212 5: AHCI7804: ROM Required, and AMD driver required in the OS.
213 6: IDE to AHCI7804: ROM Required, and AMD driver required in the OS.
214
215comment "NATIVE"
216 depends on STONEYRIDGE_SATA_MODE = 0
217
218comment "AHCI"
219 depends on STONEYRIDGE_SATA_MODE = 2
220
221comment "LEGACY IDE"
222 depends on STONEYRIDGE_SATA_MODE = 3
223
224comment "IDE to AHCI"
225 depends on STONEYRIDGE_SATA_MODE = 4
226
227comment "AHCI7804"
228 depends on STONEYRIDGE_SATA_MODE = 5
229
230comment "IDE to AHCI7804"
231 depends on STONEYRIDGE_SATA_MODE = 6
232
233if STONEYRIDGE_SATA_MODE = 2 || STONEYRIDGE_SATA_MODE = 5
234
235config AHCI_ROM_ID
236 string "AHCI device PCI IDs"
237 default "1022,7801" if STONEYRIDGE_SATA_MODE = 2
238 default "1022,7804" if STONEYRIDGE_SATA_MODE = 5
239
240endif # STONEYRIDGE_SATA_MODE = 2 || STONEYRIDGE_SATA_MODE = 5
241
242config STONEYRIDGE_LEGACY_FREE
243 bool "System is legacy free"
244 help
245 Select y if there is no keyboard controller in the system.
246 This sets variables in AGESA and ACPI.
247
Marc Jones24484842017-05-04 21:17:45 -0600248config SERIRQ_CONTINUOUS_MODE
249 bool
250 default n
251 help
252 Set this option to y for serial IRQ in continuous mode.
253 Otherwise it is in quiet mode.
254
255config STONEYRIDGE_ACPI_IO_BASE
256 hex
257 default 0x400
258 help
259 Base address for the ACPI registers.
260 This value must match the hardcoded value of AGESA.
261
262config STONEYRIDGE_UART
263 bool "UART controller on Stoney Ridge"
264 default n
265 select DRIVERS_UART_8250MEM
266 select DRIVERS_UART_8250MEM_32
267 select NO_UART_ON_SUPERIO
268 select UART_OVERRIDE_REFCLK
269 help
270 There are two UART controllers in Stoney Ridge.
271 The UART registers are memory-mapped. UART
272 controller 0 registers range from FEDC_6000h
273 to FEDC_6FFFh. UART controller 1 registers
274 range from FEDC_8000h to FEDC_8FFFh.
275
Arthur Heymansb5e72b62018-01-02 23:41:24 +0100276config CONSOLE_UART_BASE_ADDRESS
277 depends on CONSOLE_SERIAL
278 hex
279 default 0xfedc6000
280
Marshall Dawsonc6ef9db2017-05-14 14:16:56 -0600281config SMM_TSEG_SIZE
282 hex
Marshall Dawson0801b332017-08-25 15:29:45 -0600283 default 0x800000 if SMM_TSEG && HAVE_SMI_HANDLER
Marshall Dawsonc6ef9db2017-05-14 14:16:56 -0600284 default 0x0
285
Marshall Dawsonb6172112017-09-13 17:47:31 -0600286config SMM_RESERVED_SIZE
287 hex
Marshall Dawsonfceac7e2018-05-18 14:40:53 -0600288 default 0x150000
Marshall Dawsonb6172112017-09-13 17:47:31 -0600289
Raul E Rangel846b4942018-06-12 10:43:09 -0600290config SMM_MODULE_STACK_SIZE
291 hex
292 default 0x800
293
Marc Jonese013df92017-08-23 16:28:02 -0600294config ACPI_CPU_STRING
295 string
Matt DeVillierc08d4c52020-06-20 23:45:30 -0500296 default "\\_SB.P%03d"
Marc Jonese013df92017-08-23 16:28:02 -0600297
Marshall Dawson9a32c412018-09-04 13:29:12 -0600298config ACPI_BERT
299 bool "Build ACPI BERT Table"
300 default y
301 depends on HAVE_ACPI_TABLES
302 help
303 Report Machine Check errors identified in POST to the OS in an
304 ACPI Boot Error Record Table. This option reserves an 8MB region
305 for building the error structures.
306
Marshall Dawson25eb2bc2019-03-14 12:42:46 -0600307config USE_PSPSECUREOS
Martin Rothb617e322017-09-07 13:23:55 -0600308 bool "Include PSP SecureOS blobs in AMD firmware"
309 default y
310 help
311 Include the PspSecureOs, PspTrustlet and TrustletKey binaries
312 in the amdfw section.
313
314 If unsure, answer 'y'
315
Richard Spiegel1bc578a2019-06-18 18:19:47 -0700316config SOC_AMD_PSP_SELECTABLE_SMU_FW
317 bool
Marshall Dawson12294d02019-11-25 07:21:18 -0700318 default y if AMD_APU_STONEYRIDGE
Richard Spiegel1bc578a2019-06-18 18:19:47 -0700319 help
320 Some ST implementations allow storing SMU firmware into cbfs and
321 calling the PSP to load the blobs at the proper time.
322
323 Merlin Falcon does not support it. If you are using 00670F00 SOC,
324 ask your AMD representative if it supports it or not.
325
Marshall Dawson5f0520a2017-10-30 16:11:45 -0600326config SOC_AMD_SMU_FANLESS
327 bool
328 depends on SOC_AMD_PSP_SELECTABLE_SMU_FW
329 default n if SOC_AMD_SMU_NOTFANLESS
330 default y
331
332config SOC_AMD_SMU_FANNED
333 bool
334 depends on SOC_AMD_PSP_SELECTABLE_SMU_FW
335 default n
336 select SOC_AMD_SMU_NOTFANLESS
337
338config SOC_AMD_SMU_NOTFANLESS # helper symbol - do not use
339 bool
340 depends on SOC_AMD_PSP_SELECTABLE_SMU_FW
341
Martin Roth30f9b952017-10-03 15:54:45 -0600342config AMDFW_OUTSIDE_CBFS
343 bool "The AMD firmware is outside CBFS"
344 default n
345 help
346 The AMDFW (PSP) is typically locatable in cbfs. Select this
347 option to manually attach the generated amdfw.rom outside of
348 cbfs. The location is selected by the FWM position.
349
Martin Roth6d8ef242017-09-08 14:39:35 -0600350config AMD_FWM_POSITION_INDEX
351 int "Firmware Directory Table location (0 to 5)"
352 range 0 5
353 default 0 if BOARD_ROMSIZE_KB_512
354 default 1 if BOARD_ROMSIZE_KB_1024
355 default 2 if BOARD_ROMSIZE_KB_2048
356 default 3 if BOARD_ROMSIZE_KB_4096
357 default 4 if BOARD_ROMSIZE_KB_8192
358 default 5 if BOARD_ROMSIZE_KB_16384
359 help
360 Typically this is calculated by the ROM size, but there may
361 be situations where you want to put the firmware directory
362 table in a different location.
363 0: 512 KB - 0xFFFA0000
364 1: 1 MB - 0xFFF20000
365 2: 2 MB - 0xFFE20000
366 3: 4 MB - 0xFFC20000
367 4: 8 MB - 0xFF820000
368 5: 16 MB - 0xFF020000
369
370comment "AMD Firmware Directory Table set to location for 512KB ROM"
371 depends on AMD_FWM_POSITION_INDEX = 0
372comment "AMD Firmware Directory Table set to location for 1MB ROM"
373 depends on AMD_FWM_POSITION_INDEX = 1
374comment "AMD Firmware Directory Table set to location for 2MB ROM"
375 depends on AMD_FWM_POSITION_INDEX = 2
376comment "AMD Firmware Directory Table set to location for 4MB ROM"
377 depends on AMD_FWM_POSITION_INDEX = 3
378comment "AMD Firmware Directory Table set to location for 8MB ROM"
379 depends on AMD_FWM_POSITION_INDEX = 4
380comment "AMD Firmware Directory Table set to location for 16MB ROM"
381 depends on AMD_FWM_POSITION_INDEX = 5
382
Marc Jones17431ab2017-11-16 15:26:00 -0700383config DIMM_SPD_SIZE
384 int
385 default 512 # DDR4
386
Marc Jones578a79d2017-12-06 16:27:04 -0700387config RO_REGION_ONLY
388 string
389 depends on CHROMEOS
390 default "apu/amdfw"
391
Chris Ching6fc39d42017-12-20 16:06:03 -0700392config DRIVERS_I2C_DESIGNWARE_CLOCK_MHZ
393 int
394 default 133
395
Richard Spiegel6a389142018-03-05 14:28:10 -0700396config MAINBOARD_POWER_RESTORE
397 def_bool n
398 help
399 This option determines what state to go to once power is restored
400 after having been lost in S0. Select this option to automatically
401 return to S0. Otherwise the system will remain in S5 once power
402 is restored.
403
Marshall Dawson68519222019-11-25 11:36:15 -0700404endif # SOC_AMD_STONEYRIDGE