Jakub Czapiga has submitted this change. ( https://review.coreboot.org/c/coreboot/+/77693?usp=email )
Change subject: mb/google/rex: Require VBOOT_LID_SWITCH for Chromebook design ......................................................................
mb/google/rex: Require VBOOT_LID_SWITCH for Chromebook design
This patch ensures that platforms with lids, such as Chromebooks, only select the VBOOT_LID_SWITCH configuration option.
Only samples the LID GPIO if VBOOT_LID_SWITCH config is enabled, otherwise fake LID is open to avoid shutdown after reaching depthcharge.
Tested by building and booting Google/Rex with the VBOOT_LID_SWITCH configuration option enabled, and verifying that google/ovis does not required VBOOT_LID_SWITCH config.
Change-Id: Ic5123b822a5a7021023319cb08a3f9e5225961ba Signed-off-by: Subrata Banik subratabanik@google.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/77693 Reviewed-by: Nick Vaccaro nvaccaro@google.com Reviewed-by: Jakub Czapiga jacz@semihalf.com Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Kapil Porwal kapilporwal@google.com --- M src/mainboard/google/rex/Kconfig M src/mainboard/google/rex/chromeos.c 2 files changed, 6 insertions(+), 1 deletion(-)
Approvals: build bot (Jenkins): Verified Kapil Porwal: Looks good to me, approved Jakub Czapiga: Looks good to me, approved Nick Vaccaro: Looks good to me, approved
diff --git a/src/mainboard/google/rex/Kconfig b/src/mainboard/google/rex/Kconfig index 7d384bd..52f2413 100644 --- a/src/mainboard/google/rex/Kconfig +++ b/src/mainboard/google/rex/Kconfig @@ -160,7 +160,7 @@ select HAVE_SPD_IN_CBFS
config VBOOT - select VBOOT_LID_SWITCH + select VBOOT_LID_SWITCH if BOARD_GOOGLE_BASEBOARD_REX
config UART_FOR_CONSOLE int diff --git a/src/mainboard/google/rex/chromeos.c b/src/mainboard/google/rex/chromeos.c index 217b001..5ed041f 100644 --- a/src/mainboard/google/rex/chromeos.c +++ b/src/mainboard/google/rex/chromeos.c @@ -9,7 +9,12 @@ void fill_lb_gpios(struct lb_gpios *gpios) { struct lb_gpio chromeos_gpios[] = { +#if CONFIG(VBOOT_LID_SWITCH) {-1, ACTIVE_HIGH, get_lid_switch(), "lid"}, +#else + /* fake LID open to avoid shutdown in depthcharge */ + {-1, ACTIVE_HIGH, 1, "lid"}, +#endif {-1, ACTIVE_HIGH, 0, "power"}, {-1, ACTIVE_HIGH, gfx_get_init_done(), "oprom"}, {-1, ACTIVE_HIGH, 0, "EC in RW"},