blob: 6aebd85e1d3e929e507bd0e1c2ba79e82c1984e8 [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
Marshall Dawson68592c32017-11-06 10:56:52 -070012 select ACPI_AMD_HARDWARE_SLEEP_VALUES
Kyösti Mälkki3139c8d2020-06-28 16:33:33 +030013 select ACPI_SOC_NVS
Felix Heldc07c7c92020-12-04 18:50:53 +010014 select ARCH_ALL_STAGES_X86_32
15 select BOOT_DEVICE_SUPPORTS_WRITES if BOOT_DEVICE_SPI_FLASH
Aaron Durbin51e4c1a2018-01-24 17:42:51 -070016 select COLLECT_TIMESTAMPS_NO_TSC
Chris Ching6fc39d42017-12-20 16:06:03 -070017 select DRIVERS_I2C_DESIGNWARE
Marc Jones9156cac2017-07-12 11:05:38 -060018 select GENERIC_GPIO_LIB
Aaron Durbin51e4c1a2018-01-24 17:42:51 -070019 select GENERIC_UDELAY
Angel Ponsb74975e2020-07-13 01:12:57 +020020 select HAVE_CF9_RESET
Felix Heldc07c7c92020-12-04 18:50:53 +010021 select HAVE_SMI_HANDLER
Marc Jones24484842017-05-04 21:17:45 -060022 select HAVE_USBDEBUG_OPTIONS
Felix Heldc07c7c92020-12-04 18:50:53 +010023 select IOAPIC
Marshall Dawsona7bfbbe2017-09-13 17:24:53 -060024 select PARALLEL_MP
Marc Jones33eef132017-10-26 16:50:42 -060025 select PARALLEL_MP_AP_WORK
Marc Jones17e85ad2017-12-20 16:21:25 -070026 select RTC
Felix Heldc07c7c92020-12-04 18:50:53 +010027 select SOC_AMD_PI
28 select SOC_AMD_COMMON
29 select SOC_AMD_COMMON_BLOCK_ACPI
30 select SOC_AMD_COMMON_BLOCK_ACPIMMIO
31 select SOC_AMD_COMMON_BLOCK_AOAC
32 select SOC_AMD_COMMON_BLOCK_BANKED_GPIOS
33 select SOC_AMD_COMMON_BLOCK_CAR
34 select SOC_AMD_COMMON_BLOCK_HDA
35 select SOC_AMD_COMMON_BLOCK_IOMMU
36 select SOC_AMD_COMMON_BLOCK_LPC
37 select SOC_AMD_COMMON_BLOCK_PCI
38 select SOC_AMD_COMMON_BLOCK_PI
39 select SOC_AMD_COMMON_BLOCK_PSP_GEN1
40 select SOC_AMD_COMMON_BLOCK_S3
41 select SOC_AMD_COMMON_BLOCK_SATA
42 select SOC_AMD_COMMON_BLOCK_SMBUS
43 select SOC_AMD_COMMON_BLOCK_SMI
44 select SOC_AMD_COMMON_BLOCK_SPI
Felix Held91ef9252021-01-12 23:44:05 +010045 select SOC_AMD_COMMON_BLOCK_UART
Felix Heldc07c7c92020-12-04 18:50:53 +010046 select SSE2
47 select TSC_SYNC_LFENCE
48 select X86_AMD_FIXED_MTRRS
Marc Jones24484842017-05-04 21:17:45 -060049
Marshall Dawson12294d02019-11-25 07:21:18 -070050config AMD_APU_STONEYRIDGE
51 bool
52 help
53 AMD Stoney Ridge APU
54
Marshall Dawsone1988f52019-11-25 11:15:35 -070055config AMD_APU_PRAIRIEFALCON
56 bool
57 help
58 AMD Embedded Prairie Falcon APU
59
Marshall Dawson12294d02019-11-25 07:21:18 -070060config AMD_APU_MERLINFALCON
61 bool
62 help
Marshall Dawsone1988f52019-11-25 11:15:35 -070063 AMD Embedded Merlin Falcon APU
Marshall Dawson12294d02019-11-25 07:21:18 -070064
Marshall Dawson3ac0ab52019-11-24 19:03:56 -070065config AMD_APU_PKG_FP4
66 bool
67 help
68 AMD FP4 package
69
70config AMD_APU_PKG_FT4
71 bool
72 help
73 AMD FT4 package
74
75config AMD_SOC_PACKAGE
76 string
77 default "FP4" if AMD_APU_PKG_FP4
78 default "FT4" if AMD_APU_PKG_FT4
79
Marshall Dawsone7557de2017-06-09 16:35:14 -060080config VBOOT
Marshall Dawsone7557de2017-06-09 16:35:14 -060081 select VBOOT_SEPARATE_VERSTAGE
82 select VBOOT_STARTS_IN_BOOTBLOCK
Marc Jones4c887ea2018-04-25 16:43:18 -060083 select VBOOT_VBNV_CMOS
84 select VBOOT_VBNV_CMOS_BACKUP_TO_FLASH
Marshall Dawsone7557de2017-06-09 16:35:14 -060085
Marc Jones21cde8b2017-05-07 16:47:36 -060086# TODO: Sync these with definitions in PI vendorcode.
87# DCACHE_RAM_BASE must equal BSP_STACK_BASE_ADDR.
88# DCACHE_RAM_SIZE must equal BSP_STACK_SIZE.
89
90config DCACHE_RAM_BASE
91 hex
92 default 0x30000
93
94config DCACHE_RAM_SIZE
95 hex
96 default 0x10000
97
Marshall Dawson9df969a2017-07-25 18:46:46 -060098config DCACHE_BSP_STACK_SIZE
Marshall Dawson9df969a2017-07-25 18:46:46 -060099 hex
100 default 0x4000
101 help
102 The amount of anticipated stack usage in CAR by bootblock and
103 other stages.
104
Marshall Dawson7c3f1e72017-08-24 09:59:10 -0600105config PRERAM_CBMEM_CONSOLE_SIZE
106 hex
Marshall Dawson1df6bc62017-12-19 20:41:29 -0700107 default 0x1600
Marshall Dawson7c3f1e72017-08-24 09:59:10 -0600108 help
109 Increase this value if preram cbmem console is getting truncated
110
Marc Jones21cde8b2017-05-07 16:47:36 -0600111config CPU_ADDR_BITS
112 int
113 default 48
114
Marc Jones1587dc82017-05-15 18:55:11 -0600115config BOTTOMIO_POSITION
116 hex "Bottom of 32-bit IO space"
117 default 0xD0000000
118 help
119 If PCI peripherals with big BARs are connected to the system
120 the bottom of the IO must be decreased to allocate such
121 devices.
122
123 Declare the beginning of the 128MB-aligned MMIO region. This
124 option is useful when PCI peripherals requesting large address
125 ranges are present.
126
Marc Jones1587dc82017-05-15 18:55:11 -0600127config MMCONF_BASE_ADDRESS
128 hex
129 default 0xF8000000
130
131config MMCONF_BUS_NUMBER
132 int
133 default 64
134
135config VGA_BIOS_ID
136 string
Marshall Dawson12294d02019-11-25 07:21:18 -0700137 default "1002,9874" if AMD_APU_MERLINFALCON
Marc Jones1587dc82017-05-15 18:55:11 -0600138 default "1002,98e4"
139 help
140 The default VGA BIOS PCI vendor/device ID should be set to the
141 result of the map_oprom_vendev() function in northbridge.c.
142
143config VGA_BIOS_FILE
144 string
Marshall Dawson7987c1c2019-11-25 08:29:28 -0700145 default "3rdparty/amd_blobs/stoneyridge/CarrizoGenericVbios.bin" if AMD_APU_MERLINFALCON
Marshall Dawsone1988f52019-11-25 11:15:35 -0700146 default "3rdparty/amd_blobs/stoneyridge/StoneyGenericVbios.bin" if AMD_APU_PRAIRIEFALCON
147 default "3rdparty/amd_blobs/stoneyridge/StoneyGenericVbios.bin" if AMD_APU_STONEYRIDGE
Marc Jones1587dc82017-05-15 18:55:11 -0600148
Marshall Dawson668dea02017-11-29 09:57:15 -0700149config S3_VGA_ROM_RUN
150 bool
151 default n
152
Marc Jones1587dc82017-05-15 18:55:11 -0600153config HEAP_SIZE
154 hex
155 default 0xc0000
156
Marc Jones24484842017-05-04 21:17:45 -0600157config EHCI_BAR
158 hex
159 default 0xfef00000
160
161config STONEYRIDGE_XHCI_ENABLE
162 bool "Enable Stoney Ridge XHCI Controller"
163 default y
164 help
165 The XHCI controller must be enabled and the XHCI firmware
166 must be added in order to have USB 3.0 support configured
167 by coreboot. The OS will be responsible for enabling the XHCI
Jonathan Neuschäfer45e6c822018-12-11 17:53:07 +0100168 controller if the XHCI firmware is available but the
Marc Jones24484842017-05-04 21:17:45 -0600169 XHCI controller is not enabled by coreboot.
170
171config STONEYRIDGE_XHCI_FWM
172 bool "Add xhci firmware"
173 default y
174 help
175 Add Stoney Ridge XHCI Firmware to support the onboard USB 3.0
176
Marc Jones24484842017-05-04 21:17:45 -0600177config STONEYRIDGE_GEC_FWM
178 bool
179 default n
180 help
181 Add Stoney Ridge GEC Firmware to support the onboard gigabit Ethernet MAC.
182 Must be connected to a Broadcom B50610 or B50610M PHY on the motherboard.
183
184config STONEYRIDGE_XHCI_FWM_FILE
185 string "XHCI firmware path and filename"
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
Zheng Baoc5e28ab2020-10-28 11:38:09 +0800193config AMDFW_CONFIG_FILE
194 string
195 string "AMD PSP Firmware config file"
Zheng Baoc5e28ab2020-10-28 11:38:09 +0800196 default "src/soc/amd/stoneyridge/fw_cz.cfg" if AMD_APU_MERLINFALCON
197 default "src/soc/amd/stoneyridge/fw_st.cfg" if AMD_APU_PRAIRIEFALCON
198 default "src/soc/amd/stoneyridge/fw_st.cfg" 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
Arthur Heymansb5e72b62018-01-02 23:41:24 +0100262config CONSOLE_UART_BASE_ADDRESS
263 depends on CONSOLE_SERIAL
264 hex
265 default 0xfedc6000
266
Marshall Dawsonc6ef9db2017-05-14 14:16:56 -0600267config SMM_TSEG_SIZE
268 hex
Marshall Dawson0801b332017-08-25 15:29:45 -0600269 default 0x800000 if SMM_TSEG && HAVE_SMI_HANDLER
Marshall Dawsonc6ef9db2017-05-14 14:16:56 -0600270 default 0x0
271
Marshall Dawsonb6172112017-09-13 17:47:31 -0600272config SMM_RESERVED_SIZE
273 hex
Marshall Dawsonfceac7e2018-05-18 14:40:53 -0600274 default 0x150000
Marshall Dawsonb6172112017-09-13 17:47:31 -0600275
Raul E Rangel846b4942018-06-12 10:43:09 -0600276config SMM_MODULE_STACK_SIZE
277 hex
278 default 0x800
279
Marc Jonese013df92017-08-23 16:28:02 -0600280config ACPI_CPU_STRING
281 string
Matt DeVillierc08d4c52020-06-20 23:45:30 -0500282 default "\\_SB.P%03d"
Marc Jonese013df92017-08-23 16:28:02 -0600283
Marshall Dawson9a32c412018-09-04 13:29:12 -0600284config ACPI_BERT
285 bool "Build ACPI BERT Table"
286 default y
287 depends on HAVE_ACPI_TABLES
288 help
289 Report Machine Check errors identified in POST to the OS in an
290 ACPI Boot Error Record Table. This option reserves an 8MB region
291 for building the error structures.
292
Marshall Dawson25eb2bc2019-03-14 12:42:46 -0600293config USE_PSPSECUREOS
Martin Rothb617e322017-09-07 13:23:55 -0600294 bool "Include PSP SecureOS blobs in AMD firmware"
295 default y
296 help
297 Include the PspSecureOs, PspTrustlet and TrustletKey binaries
298 in the amdfw section.
299
300 If unsure, answer 'y'
301
Richard Spiegel1bc578a2019-06-18 18:19:47 -0700302config SOC_AMD_PSP_SELECTABLE_SMU_FW
303 bool
Marshall Dawson12294d02019-11-25 07:21:18 -0700304 default y if AMD_APU_STONEYRIDGE
Richard Spiegel1bc578a2019-06-18 18:19:47 -0700305 help
306 Some ST implementations allow storing SMU firmware into cbfs and
307 calling the PSP to load the blobs at the proper time.
308
309 Merlin Falcon does not support it. If you are using 00670F00 SOC,
310 ask your AMD representative if it supports it or not.
311
Marshall Dawson5f0520a2017-10-30 16:11:45 -0600312config SOC_AMD_SMU_FANLESS
313 bool
314 depends on SOC_AMD_PSP_SELECTABLE_SMU_FW
315 default n if SOC_AMD_SMU_NOTFANLESS
316 default y
317
318config SOC_AMD_SMU_FANNED
319 bool
320 depends on SOC_AMD_PSP_SELECTABLE_SMU_FW
321 default n
322 select SOC_AMD_SMU_NOTFANLESS
323
324config SOC_AMD_SMU_NOTFANLESS # helper symbol - do not use
325 bool
326 depends on SOC_AMD_PSP_SELECTABLE_SMU_FW
327
Martin Roth30f9b952017-10-03 15:54:45 -0600328config AMDFW_OUTSIDE_CBFS
329 bool "The AMD firmware is outside CBFS"
330 default n
331 help
332 The AMDFW (PSP) is typically locatable in cbfs. Select this
333 option to manually attach the generated amdfw.rom outside of
334 cbfs. The location is selected by the FWM position.
335
Martin Roth6d8ef242017-09-08 14:39:35 -0600336config AMD_FWM_POSITION_INDEX
337 int "Firmware Directory Table location (0 to 5)"
338 range 0 5
339 default 0 if BOARD_ROMSIZE_KB_512
340 default 1 if BOARD_ROMSIZE_KB_1024
341 default 2 if BOARD_ROMSIZE_KB_2048
342 default 3 if BOARD_ROMSIZE_KB_4096
343 default 4 if BOARD_ROMSIZE_KB_8192
344 default 5 if BOARD_ROMSIZE_KB_16384
345 help
346 Typically this is calculated by the ROM size, but there may
347 be situations where you want to put the firmware directory
348 table in a different location.
349 0: 512 KB - 0xFFFA0000
350 1: 1 MB - 0xFFF20000
351 2: 2 MB - 0xFFE20000
352 3: 4 MB - 0xFFC20000
353 4: 8 MB - 0xFF820000
354 5: 16 MB - 0xFF020000
355
356comment "AMD Firmware Directory Table set to location for 512KB ROM"
357 depends on AMD_FWM_POSITION_INDEX = 0
358comment "AMD Firmware Directory Table set to location for 1MB ROM"
359 depends on AMD_FWM_POSITION_INDEX = 1
360comment "AMD Firmware Directory Table set to location for 2MB ROM"
361 depends on AMD_FWM_POSITION_INDEX = 2
362comment "AMD Firmware Directory Table set to location for 4MB ROM"
363 depends on AMD_FWM_POSITION_INDEX = 3
364comment "AMD Firmware Directory Table set to location for 8MB ROM"
365 depends on AMD_FWM_POSITION_INDEX = 4
366comment "AMD Firmware Directory Table set to location for 16MB ROM"
367 depends on AMD_FWM_POSITION_INDEX = 5
368
Marc Jones17431ab2017-11-16 15:26:00 -0700369config DIMM_SPD_SIZE
370 int
371 default 512 # DDR4
372
Marc Jones578a79d2017-12-06 16:27:04 -0700373config RO_REGION_ONLY
374 string
375 depends on CHROMEOS
376 default "apu/amdfw"
377
Chris Ching6fc39d42017-12-20 16:06:03 -0700378config DRIVERS_I2C_DESIGNWARE_CLOCK_MHZ
379 int
380 default 133
381
Richard Spiegel6a389142018-03-05 14:28:10 -0700382config MAINBOARD_POWER_RESTORE
383 def_bool n
384 help
385 This option determines what state to go to once power is restored
386 after having been lost in S0. Select this option to automatically
387 return to S0. Otherwise the system will remain in S5 once power
388 is restored.
389
Marshall Dawson68519222019-11-25 11:36:15 -0700390endif # SOC_AMD_STONEYRIDGE