sb/intel/common: Show "Add EC firmware" only for boards that need it

Most boards currently do not use EC firmware from SPI flash in the
IFD, this hides this option by default and shows it only for boards
that need it.

A new config variable MAINBOARD_USES_IFD_EC_REGION is introduced to
enable this option for boards that need it.

The following list of boards requiring this was provided by
Lijian Zhao:
1. intel/cannonlake_rvp
2. intel/coffeelake_rvp
3. intel/icelake_rvp
4. google/sarien
5. google/hatch

Change-Id: I52ab977319d99a23a5e982cc01479fe801e172a7
Signed-off-by: Jan Tatje <jan@jnt.io>
Reviewed-on: https://review.coreboot.org/c/30697
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Lijian Zhao <lijian.zhao@intel.com>
diff --git a/src/mainboard/google/hatch/Kconfig b/src/mainboard/google/hatch/Kconfig
index 711d2e9..214a1b6 100644
--- a/src/mainboard/google/hatch/Kconfig
+++ b/src/mainboard/google/hatch/Kconfig
@@ -15,6 +15,7 @@
 	select SOC_INTEL_CANNONLAKE_MEMCFG_INIT
 	select SOC_INTEL_COFFEELAKE
 	select SYSTEM_TYPE_LAPTOP
+	select MAINBOARD_USES_IFD_EC_REGION
 
 if BOARD_GOOGLE_BASEBOARD_HATCH
 
diff --git a/src/mainboard/google/sarien/Kconfig b/src/mainboard/google/sarien/Kconfig
index c0bd1d8..5bf4824 100644
--- a/src/mainboard/google/sarien/Kconfig
+++ b/src/mainboard/google/sarien/Kconfig
@@ -22,6 +22,7 @@
 	select SPD_READ_BY_WORD
 	select SYSTEM_TYPE_LAPTOP
 	select TPM2
+	select MAINBOARD_USES_IFD_EC_REGION
 
 if BOARD_GOOGLE_BASEBOARD_SARIEN
 
diff --git a/src/mainboard/intel/cannonlake_rvp/Kconfig b/src/mainboard/intel/cannonlake_rvp/Kconfig
index 028d493..15d56c3 100644
--- a/src/mainboard/intel/cannonlake_rvp/Kconfig
+++ b/src/mainboard/intel/cannonlake_rvp/Kconfig
@@ -11,6 +11,7 @@
 	select DRIVERS_I2C_HID
 	select DRIVERS_I2C_GENERIC
 	select SOC_INTEL_CANNONLAKE
+	select MAINBOARD_USES_IFD_EC_REGION
 
 config MAINBOARD_DIR
 	string
diff --git a/src/mainboard/intel/coffeelake_rvp/Kconfig b/src/mainboard/intel/coffeelake_rvp/Kconfig
index 7597629..9474c51 100644
--- a/src/mainboard/intel/coffeelake_rvp/Kconfig
+++ b/src/mainboard/intel/coffeelake_rvp/Kconfig
@@ -16,6 +16,7 @@
 	select SOC_INTEL_CANNONLAKE_PCH_H if BOARD_INTEL_COFFEELAKE_RVP11 || BOARD_INTEL_COFFEELAKE_RVP8
 	select SOC_INTEL_COMMON_BLOCK_HDA_VERB if BOARD_INTEL_COFFEELAKE_RVP11 || BOARD_INTEL_COFFEELAKE_RVP8 || BOARD_INTEL_WHISKEYLAKE_RVP
 	select SOC_INTEL_COMMON_BLOCK_HDA if BOARD_INTEL_WHISKEYLAKE_RVP
+	select MAINBOARD_USES_IFD_EC_REGION
 
 config MAINBOARD_DIR
 	string
diff --git a/src/mainboard/intel/icelake_rvp/Kconfig b/src/mainboard/intel/icelake_rvp/Kconfig
index 0741bf8..da9c077 100644
--- a/src/mainboard/intel/icelake_rvp/Kconfig
+++ b/src/mainboard/intel/icelake_rvp/Kconfig
@@ -13,6 +13,7 @@
 	select DRIVERS_USB_ACPI
 	select SOC_INTEL_COMMON_BLOCK_HDA_VERB
 	select SOC_INTEL_ICELAKE
+	select MAINBOARD_USES_IFD_EC_REGION
 
 config MAINBOARD_DIR
 	string
diff --git a/src/southbridge/intel/common/firmware/Kconfig b/src/southbridge/intel/common/firmware/Kconfig
index 97fb993..8891c61 100644
--- a/src/southbridge/intel/common/firmware/Kconfig
+++ b/src/southbridge/intel/common/firmware/Kconfig
@@ -120,9 +120,12 @@
 	depends on HAVE_GBE_BIN
 	default "3rdparty/blobs/mainboard/$(MAINBOARDDIR)/gbe.bin"
 
+config MAINBOARD_USES_IFD_EC_REGION
+	def_bool n
+
 config HAVE_EC_BIN
 	bool "Add EC firmware"
-	depends on HAVE_IFD_BIN
+	depends on HAVE_IFD_BIN && MAINBOARD_USES_IFD_EC_REGION
 	help
 	  The embedded controller needs a firmware file.