Patrick Georgi | c49d7a3 | 2020-05-08 22:50:46 +0200 | [diff] [blame] | 1 | ## SPDX-License-Identifier: GPL-2.0-only |
Stefan Reinauer | 1c56d9b | 2012-05-10 11:27:32 -0700 | [diff] [blame] | 2 | |
Aaron Durbin | 3326f15 | 2016-08-12 15:50:16 -0500 | [diff] [blame] | 3 | config COMMON_CBFS_SPI_WRAPPER |
| 4 | bool |
| 5 | default n |
| 6 | depends on !ARCH_X86 |
| 7 | depends on BOOT_DEVICE_SPI_FLASH |
Aaron Durbin | e8e118d | 2016-08-12 15:00:10 -0500 | [diff] [blame] | 8 | select BOOT_DEVICE_SUPPORTS_WRITES |
Aaron Durbin | 3326f15 | 2016-08-12 15:50:16 -0500 | [diff] [blame] | 9 | help |
| 10 | Use common wrapper to interface CBFS to SPI bootrom. |
| 11 | |
Stefan Reinauer | 1c56d9b | 2012-05-10 11:27:32 -0700 | [diff] [blame] | 12 | config SPI_FLASH |
| 13 | bool |
Aaron Durbin | e8e118d | 2016-08-12 15:00:10 -0500 | [diff] [blame] | 14 | default y if BOOT_DEVICE_SPI_FLASH && BOOT_DEVICE_SUPPORTS_WRITES |
Stefan Reinauer | 1c56d9b | 2012-05-10 11:27:32 -0700 | [diff] [blame] | 15 | default n |
| 16 | help |
| 17 | Select this option if your chipset driver needs to store certain |
| 18 | data in the SPI flash. |
| 19 | |
Xiang Wang | b134945 | 2019-08-27 15:57:23 +0800 | [diff] [blame] | 20 | config SPI_SDCARD |
| 21 | bool |
| 22 | default n |
| 23 | help |
| 24 | Select this option if your chipset driver needs to store certain |
| 25 | data in the SPI sdcard. |
| 26 | |
Kyösti Mälkki | 88e518f | 2014-04-29 07:11:39 +0300 | [diff] [blame] | 27 | if SPI_FLASH |
| 28 | |
Aaron Durbin | 08e842c | 2016-08-11 14:40:09 -0500 | [diff] [blame] | 29 | # Keep at 0 because lots of boards assume this default. |
| 30 | config BOOT_DEVICE_SPI_FLASH_BUS |
| 31 | int |
| 32 | default 0 |
| 33 | help |
| 34 | Which SPI bus the boot device is connected to. |
| 35 | |
Aaron Durbin | 6f11559 | 2016-08-11 18:24:54 -0500 | [diff] [blame] | 36 | config BOOT_DEVICE_SPI_FLASH_RW_NOMMAP |
| 37 | bool |
| 38 | default y if !COMMON_CBFS_SPI_WRAPPER |
| 39 | default n |
| 40 | depends on BOOT_DEVICE_SPI_FLASH |
| 41 | help |
| 42 | Provide common implementation of the RW boot device that |
| 43 | doesn't provide mmap() operations. |
| 44 | |
Shelley Chen | 6c2568f | 2020-09-25 09:30:44 -0700 | [diff] [blame] | 45 | config BOOT_DEVICE_SPI_FLASH_NO_EARLY_WRITES |
| 46 | bool |
| 47 | default n |
| 48 | depends on BOOT_DEVICE_SPI_FLASH_RW_NOMMAP |
| 49 | help |
| 50 | For platforms who do not allow writes to SPI flash in early |
| 51 | stages like romstage. Not selecting this config will result |
| 52 | in the auto-selection of |
| 53 | BOOT_DEVICE_SPI_FLASH_RW_NOMMAP_EARLY if |
| 54 | BOOT_DEVICE_SPI_FLASH_RW_NOMMAP is selected by the platform. |
| 55 | |
Aaron Durbin | 6f11559 | 2016-08-11 18:24:54 -0500 | [diff] [blame] | 56 | config BOOT_DEVICE_SPI_FLASH_RW_NOMMAP_EARLY |
| 57 | bool |
Shelley Chen | 6c2568f | 2020-09-25 09:30:44 -0700 | [diff] [blame] | 58 | default y if BOOT_DEVICE_SPI_FLASH_RW_NOMMAP && !BOOT_DEVICE_SPI_FLASH_NO_EARLY_WRITES |
Aaron Durbin | 6f11559 | 2016-08-11 18:24:54 -0500 | [diff] [blame] | 59 | default n |
| 60 | depends on BOOT_DEVICE_SPI_FLASH_RW_NOMMAP |
| 61 | help |
| 62 | Include the common implementation in all stages, including the |
| 63 | early ones. |
| 64 | |
Aaron Durbin | 3e7f006 | 2020-01-11 10:26:25 -0700 | [diff] [blame] | 65 | config SPI_FLASH_DONT_INCLUDE_ALL_DRIVERS |
| 66 | bool |
| 67 | default y if COMMON_CBFS_SPI_WRAPPER |
| 68 | default n |
| 69 | |
Aaron Durbin | a91901c | 2016-08-11 09:42:27 -0500 | [diff] [blame] | 70 | config SPI_FLASH_INCLUDE_ALL_DRIVERS |
| 71 | bool |
Aaron Durbin | 3e7f006 | 2020-01-11 10:26:25 -0700 | [diff] [blame] | 72 | default n if SPI_FLASH_DONT_INCLUDE_ALL_DRIVERS |
Aaron Durbin | a91901c | 2016-08-11 09:42:27 -0500 | [diff] [blame] | 73 | default y |
| 74 | |
Duncan Laurie | 181bbdd | 2012-06-23 16:53:57 -0700 | [diff] [blame] | 75 | config SPI_FLASH_SMM |
Nico Huber | 9e53db4 | 2018-06-05 22:34:08 +0200 | [diff] [blame] | 76 | bool |
Kyösti Mälkki | 88e518f | 2014-04-29 07:11:39 +0300 | [diff] [blame] | 77 | depends on HAVE_SMI_HANDLER |
Duncan Laurie | 181bbdd | 2012-06-23 16:53:57 -0700 | [diff] [blame] | 78 | help |
| 79 | Select this option if you want SPI flash support in SMM. |
| 80 | |
Kyösti Mälkki | ab60510 | 2014-06-30 07:49:55 +0300 | [diff] [blame] | 81 | config SPI_FLASH_NO_FAST_READ |
| 82 | bool "Disable Fast Read command" |
| 83 | default n |
| 84 | help |
| 85 | Select this option if your setup requires to avoid "fast read"s |
| 86 | from the SPI flash parts. |
| 87 | |
| 88 | config SPI_FLASH_ADESTO |
| 89 | bool |
Aaron Durbin | a91901c | 2016-08-11 09:42:27 -0500 | [diff] [blame] | 90 | default y if SPI_FLASH_INCLUDE_ALL_DRIVERS |
Kyösti Mälkki | ab60510 | 2014-06-30 07:49:55 +0300 | [diff] [blame] | 91 | help |
| 92 | Select this option if your chipset driver needs to store certain |
| 93 | data in the SPI flash and your SPI flash is made by Adesto Technologies. |
| 94 | |
Idwer Vollering | 73a1018 | 2014-02-16 00:32:13 +0000 | [diff] [blame] | 95 | config SPI_FLASH_AMIC |
| 96 | bool |
Aaron Durbin | a91901c | 2016-08-11 09:42:27 -0500 | [diff] [blame] | 97 | default y if SPI_FLASH_INCLUDE_ALL_DRIVERS |
Idwer Vollering | 73a1018 | 2014-02-16 00:32:13 +0000 | [diff] [blame] | 98 | help |
| 99 | Select this option if your chipset driver needs to store certain |
| 100 | data in the SPI flash and your SPI flash is made by AMIC. |
| 101 | |
Kyösti Mälkki | 96d9276 | 2014-11-11 15:04:38 +0200 | [diff] [blame] | 102 | config SPI_FLASH_ATMEL |
| 103 | bool |
Aaron Durbin | a91901c | 2016-08-11 09:42:27 -0500 | [diff] [blame] | 104 | default y if SPI_FLASH_INCLUDE_ALL_DRIVERS |
Kyösti Mälkki | 96d9276 | 2014-11-11 15:04:38 +0200 | [diff] [blame] | 105 | help |
| 106 | Select this option if your chipset driver needs to store certain |
| 107 | data in the SPI flash and your SPI flash is made by Atmel. |
| 108 | |
Stefan Reinauer | 1c56d9b | 2012-05-10 11:27:32 -0700 | [diff] [blame] | 109 | config SPI_FLASH_EON |
| 110 | bool |
Aaron Durbin | a91901c | 2016-08-11 09:42:27 -0500 | [diff] [blame] | 111 | default y if SPI_FLASH_INCLUDE_ALL_DRIVERS |
Stefan Reinauer | 1c56d9b | 2012-05-10 11:27:32 -0700 | [diff] [blame] | 112 | help |
| 113 | Select this option if your chipset driver needs to store certain |
| 114 | data in the SPI flash and your SPI flash is made by EON. |
| 115 | |
Kyösti Mälkki | ab60510 | 2014-06-30 07:49:55 +0300 | [diff] [blame] | 116 | config SPI_FLASH_GIGADEVICE |
| 117 | bool |
Aaron Durbin | a91901c | 2016-08-11 09:42:27 -0500 | [diff] [blame] | 118 | default y if SPI_FLASH_INCLUDE_ALL_DRIVERS |
Kyösti Mälkki | ab60510 | 2014-06-30 07:49:55 +0300 | [diff] [blame] | 119 | help |
| 120 | Select this option if your chipset driver needs to store certain |
| 121 | data in the SPI flash and your SPI flash is made by Gigadevice. |
| 122 | |
Stefan Reinauer | 1c56d9b | 2012-05-10 11:27:32 -0700 | [diff] [blame] | 123 | config SPI_FLASH_MACRONIX |
| 124 | bool |
Aaron Durbin | a91901c | 2016-08-11 09:42:27 -0500 | [diff] [blame] | 125 | default y if SPI_FLASH_INCLUDE_ALL_DRIVERS |
Stefan Reinauer | 1c56d9b | 2012-05-10 11:27:32 -0700 | [diff] [blame] | 126 | help |
| 127 | Select this option if your chipset driver needs to store certain |
| 128 | data in the SPI flash and your SPI flash is made by Macronix. |
| 129 | |
| 130 | config SPI_FLASH_SPANSION |
| 131 | bool |
Aaron Durbin | a91901c | 2016-08-11 09:42:27 -0500 | [diff] [blame] | 132 | default y if SPI_FLASH_INCLUDE_ALL_DRIVERS |
Stefan Reinauer | 1c56d9b | 2012-05-10 11:27:32 -0700 | [diff] [blame] | 133 | help |
| 134 | Select this option if your chipset driver needs to store certain |
| 135 | data in the SPI flash and your SPI flash is made by Spansion. |
| 136 | |
| 137 | config SPI_FLASH_SST |
| 138 | bool |
Aaron Durbin | a91901c | 2016-08-11 09:42:27 -0500 | [diff] [blame] | 139 | default y if SPI_FLASH_INCLUDE_ALL_DRIVERS |
Stefan Reinauer | 1c56d9b | 2012-05-10 11:27:32 -0700 | [diff] [blame] | 140 | help |
| 141 | Select this option if your chipset driver needs to store certain |
| 142 | data in the SPI flash and your SPI flash is made by SST. |
| 143 | |
| 144 | config SPI_FLASH_STMICRO |
| 145 | bool |
Aaron Durbin | a91901c | 2016-08-11 09:42:27 -0500 | [diff] [blame] | 146 | default y if SPI_FLASH_INCLUDE_ALL_DRIVERS |
Stefan Reinauer | 1c56d9b | 2012-05-10 11:27:32 -0700 | [diff] [blame] | 147 | help |
| 148 | Select this option if your chipset driver needs to store certain |
| 149 | data in the SPI flash and your SPI flash is made by ST MICRO. |
| 150 | |
| 151 | config SPI_FLASH_WINBOND |
| 152 | bool |
Aaron Durbin | a91901c | 2016-08-11 09:42:27 -0500 | [diff] [blame] | 153 | default y if SPI_FLASH_INCLUDE_ALL_DRIVERS |
Stefan Reinauer | 1c56d9b | 2012-05-10 11:27:32 -0700 | [diff] [blame] | 154 | help |
| 155 | Select this option if your chipset driver needs to store certain |
| 156 | data in the SPI flash and your SPI flash is made by Winbond. |
| 157 | |
Maximilian Brune | 7bcf4ae | 2023-08-28 13:57:20 +0200 | [diff] [blame] | 158 | config SPI_FLASH_ISSI |
| 159 | bool |
| 160 | default y if SPI_FLASH_INCLUDE_ALL_DRIVERS |
| 161 | help |
| 162 | Select this option if your chipset driver needs to store certain |
| 163 | data in the SPI flash and your SPI flash is made by ISSI. |
| 164 | |
Furquan Shaikh | c28984d | 2016-11-20 21:04:00 -0800 | [diff] [blame] | 165 | config SPI_FLASH_HAS_VOLATILE_GROUP |
| 166 | bool |
| 167 | default n |
| 168 | help |
| 169 | Allows chipset to group write/erase operations under a single volatile |
| 170 | group. |
| 171 | |
T Michael Turney | d43e688 | 2022-01-20 11:55:40 -0800 | [diff] [blame] | 172 | config SPI_FLASH_EXIT_4_BYTE_ADDR_MODE |
| 173 | bool |
| 174 | default n |
| 175 | help |
| 176 | This will send an Exit 4-Byte Address Mode (E9h) command before the first |
| 177 | access to the SPI flash. On some platforms with SPI flashes larger than 32MB, |
| 178 | the SPI flash may power up in 4-byte addressing mode and this command needs |
| 179 | to be sent before coreboot's 3-byte address commands can be interpreted correctly. |
| 180 | On flashes that don't support 4-byte addressing mode or where it is already |
| 181 | disabled, this command should be a no-op. |
| 182 | |
Fred Reitberger | 52be7f6 | 2023-03-21 15:37:06 -0400 | [diff] [blame] | 183 | config SPI_FLASH_FORCE_4_BYTE_ADDR_MODE |
| 184 | bool |
| 185 | default n |
| 186 | help |
| 187 | This will force coreboot to send addresses as 4-bytes instead of 3-bytes. |
| 188 | On some platforms with SPI flashes larger than 16MB, the SPI flash may need |
| 189 | to remain in 4-byte addressing mode. |
| 190 | |
Kyösti Mälkki | 88e518f | 2014-04-29 07:11:39 +0300 | [diff] [blame] | 191 | endif # SPI_FLASH |
Martin Roth | 3a54318 | 2015-09-28 15:27:24 -0600 | [diff] [blame] | 192 | |
Angel Pons | 12d48cd | 2020-10-03 12:22:04 +0200 | [diff] [blame] | 193 | config HAVE_EM100PRO_SPI_CONSOLE_SUPPORT |
Martin Roth | 3a54318 | 2015-09-28 15:27:24 -0600 | [diff] [blame] | 194 | def_bool n |