summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward O'Callaghan <quasisec@google.com>2020-04-07 12:52:55 +1000
committerEdward O'Callaghan <quasisec@chromium.org>2020-04-09 13:43:33 +0000
commit200f02a518600659f0517febc180b27f06533115 (patch)
treec6ac95c629612898b61edf7d6e532c0f899b3d59
parentef6eceea562c8f2f5c2c430ae4fb45bd58252acb (diff)
downloadcoreboot-200f02a518600659f0517febc180b27f06533115.tar.xz
mb/google/hatch: Allow variants to not necessarily be laptops
In some cases Hatch variants are not laptop form-factors such as Puff. Ensure that the base configuration does not assume the form factor and allow variants to elect their intended use-case. Note that the issue is that early ec sync needs to be disabled for EFS2 to function correctly, see commit 6daa8c3ba5f from the FIXME line. The relationship is that desktops do not have a battery. BUG=b:152951181 BRANCH=none TEST=none Change-Id: I15dc9efa51e9d61297868df287879dfb62909e33 Signed-off-by: Edward O'Callaghan <quasisec@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/40252 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Shelley Chen <shchen@google.com> Reviewed-by: Daniel Kurtz <djkurtz@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
-rw-r--r--src/mainboard/google/hatch/Kconfig16
-rw-r--r--src/mainboard/google/hatch/Kconfig.name13
2 files changed, 25 insertions, 4 deletions
diff --git a/src/mainboard/google/hatch/Kconfig b/src/mainboard/google/hatch/Kconfig
index 04790e0e0a..ff3f6a46ec 100644
--- a/src/mainboard/google/hatch/Kconfig
+++ b/src/mainboard/google/hatch/Kconfig
@@ -22,10 +22,13 @@ config BOARD_GOOGLE_BASEBOARD_HATCH
select MAINBOARD_HAS_TPM2
select MB_HAS_ACTIVE_HIGH_SD_PWR_ENABLE
select SOC_INTEL_COMETLAKE
- select SYSTEM_TYPE_LAPTOP
select RT8168_GET_MAC_FROM_VPD
select RT8168_SET_LED_MODE
+config BOARD_GOOGLE_BASEBOARD_HATCH_LAPTOP
+ select SYSTEM_TYPE_LAPTOP
+ def_bool n
+
if BOARD_GOOGLE_BASEBOARD_HATCH
config CHROMEOS
@@ -134,8 +137,13 @@ config VARIANT_DIR
config VBOOT
select HAS_RECOVERY_MRC_CACHE
select MRC_CLEAR_NORMAL_CACHE_ON_RECOVERY_RETRAIN
- # FIXME: allow kconfig to select on a subset of boards only
- select VBOOT_EARLY_EC_SYNC if !BOARD_GOOGLE_PUFF
- select VBOOT_LID_SWITCH
endif # BOARD_GOOGLE_BASEBOARD_HATCH
+
+if BOARD_GOOGLE_BASEBOARD_HATCH_LAPTOP
+
+config VBOOT
+ select VBOOT_EARLY_EC_SYNC
+ select VBOOT_LID_SWITCH
+
+endif # BOARD_GOOGLE_BASEBOARD_HATCH_LAPTOP
diff --git a/src/mainboard/google/hatch/Kconfig.name b/src/mainboard/google/hatch/Kconfig.name
index 454561b105..ac64a9ea9c 100644
--- a/src/mainboard/google/hatch/Kconfig.name
+++ b/src/mainboard/google/hatch/Kconfig.name
@@ -3,38 +3,45 @@ comment "Hatch"
config BOARD_GOOGLE_AKEMI
bool "-> Akemi"
select BOARD_GOOGLE_BASEBOARD_HATCH
+ select BOARD_GOOGLE_BASEBOARD_HATCH_LAPTOP
select BOARD_ROMSIZE_KB_16384
config BOARD_GOOGLE_DRATINI
bool "-> Dratini"
select BOARD_GOOGLE_BASEBOARD_HATCH
+ select BOARD_GOOGLE_BASEBOARD_HATCH_LAPTOP
select BOARD_ROMSIZE_KB_16384
config BOARD_GOOGLE_HATCH
bool "-> Hatch"
select BOARD_GOOGLE_BASEBOARD_HATCH
+ select BOARD_GOOGLE_BASEBOARD_HATCH_LAPTOP
select BOARD_ROMSIZE_KB_32768
config BOARD_GOOGLE_JINLON
bool "-> Jinlon"
select BOARD_GOOGLE_BASEBOARD_HATCH
+ select BOARD_GOOGLE_BASEBOARD_HATCH_LAPTOP
select BOARD_ROMSIZE_KB_16384
select DRIVERS_GFX_GENERIC
config BOARD_GOOGLE_KOHAKU
bool "-> Kohaku"
select BOARD_GOOGLE_BASEBOARD_HATCH
+ select BOARD_GOOGLE_BASEBOARD_HATCH_LAPTOP
select BOARD_ROMSIZE_KB_16384
config BOARD_GOOGLE_KINDRED
bool "-> Kindred"
select BOARD_GOOGLE_BASEBOARD_HATCH
+ select BOARD_GOOGLE_BASEBOARD_HATCH_LAPTOP
select BOARD_ROMSIZE_KB_16384
select SOC_INTEL_COMMON_MMC_OVERRIDE
config BOARD_GOOGLE_HELIOS
bool "-> Helios"
select BOARD_GOOGLE_BASEBOARD_HATCH
+ select BOARD_GOOGLE_BASEBOARD_HATCH_LAPTOP
select BOARD_ROMSIZE_KB_16384
select CHROMEOS_DSM_CALIB
select DRIVERS_I2C_RT1011
@@ -42,11 +49,13 @@ config BOARD_GOOGLE_HELIOS
config BOARD_GOOGLE_MUSHU
bool "-> Mushu"
select BOARD_GOOGLE_BASEBOARD_HATCH
+ select BOARD_GOOGLE_BASEBOARD_HATCH_LAPTOP
select BOARD_ROMSIZE_KB_16384
config BOARD_GOOGLE_PALKIA
bool "-> Palkia"
select BOARD_GOOGLE_BASEBOARD_HATCH
+ select BOARD_GOOGLE_BASEBOARD_HATCH_LAPTOP
select BOARD_ROMSIZE_KB_16384
select CHROMEOS_DSM_CALIB
select DRIVERS_I2C_RT1011
@@ -54,6 +63,7 @@ config BOARD_GOOGLE_PALKIA
config BOARD_GOOGLE_NIGHTFURY
bool "-> Nightfury"
select BOARD_GOOGLE_BASEBOARD_HATCH
+ select BOARD_GOOGLE_BASEBOARD_HATCH_LAPTOP
select BOARD_ROMSIZE_KB_16384
config BOARD_GOOGLE_PUFF
@@ -67,6 +77,7 @@ config BOARD_GOOGLE_PUFF
config BOARD_GOOGLE_HELIOS_DISKSWAP
bool "-> Helios_Diskswap"
select BOARD_GOOGLE_BASEBOARD_HATCH
+ select BOARD_GOOGLE_BASEBOARD_HATCH_LAPTOP
select BOARD_ROMSIZE_KB_16384
select CHROMEOS_DSM_CALIB
select DRIVERS_I2C_RT1011
@@ -74,9 +85,11 @@ config BOARD_GOOGLE_HELIOS_DISKSWAP
config BOARD_GOOGLE_STRYKE
bool "-> Stryke"
select BOARD_GOOGLE_BASEBOARD_HATCH
+ select BOARD_GOOGLE_BASEBOARD_HATCH_LAPTOP
select BOARD_ROMSIZE_KB_16384
config BOARD_GOOGLE_SUSHI
bool "-> Sushi"
select BOARD_GOOGLE_BASEBOARD_HATCH
+ select BOARD_GOOGLE_BASEBOARD_HATCH_LAPTOP
select BOARD_ROMSIZE_KB_16384