From 30ee0d881b5c5568fb8e1cf0ad2144b9e84d6a06 Mon Sep 17 00:00:00 2001 From: Furquan Shaikh Date: Tue, 7 Jul 2020 12:50:55 -0700 Subject: mb/google/zork: Add helpers for v3 schematics and wifi power enable This change adds following two helper functions: 1. variant_uses_v3_schematics() - Check whether the variant is using v3 version of schematics. 2. variant_has_active_low_wifi_power() - Check whether the variant is using active low power enable for WiFi. In addition to this, Kconfig options are reorganized to add two new configs - VARIANT_SUPPORTS_PRE_V3_SCHEMATICS and VARIANT_SUPPORTS_WIFI_POWER_ACTIVE_HIGH. This allows the helper functions to return `true` early without checking for board version. Eventually, when a variant decides to drop support for pre-v3 schematics, it can be dropped from selecting VARIANT_SUPPORTS_PRE_V3_SCHEMATICS. Similarly, when the variant decides to drop support for active high power enable for WiFi, it can be dropped from selecting VARIANT_SUPPORTS_WIFI_POWER_ACTIVE_HIGH. Change-Id: I62851299e8dd7929a8e1e9a287389abd71c7706c Signed-off-by: Furquan Shaikh Reviewed-on: https://review.coreboot.org/c/coreboot/+/43224 Reviewed-by: Aaron Durbin Tested-by: build bot (Jenkins) --- src/mainboard/google/zork/Kconfig | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) (limited to 'src/mainboard/google/zork/Kconfig') diff --git a/src/mainboard/google/zork/Kconfig b/src/mainboard/google/zork/Kconfig index a6c866df48..057090bda5 100644 --- a/src/mainboard/google/zork/Kconfig +++ b/src/mainboard/google/zork/Kconfig @@ -149,8 +149,24 @@ config VARIANT_BOARD_VER_FW_CONFIG_VALID help Which board version did FW_CONFIG become valid in CBI. +config VARIANT_SUPPORTS_PRE_V3_SCHEMATICS + bool + default y if BOARD_GOOGLE_TREMBYLE + default y if BOARD_GOOGLE_EZKINIL + default y if BOARD_GOOGLE_MORPHIUS + default y if BOARD_GOOGLE_BERKNIP + default y if BOARD_GOOGLE_DALBOZ + default y if BOARD_GOOGLE_VILBOZ + default n + help + Whether this variant supports pre-v3 version of schematics. + Eventually, when a variant moves to a point where it no + longer has to support pre-v3 schematics, `default y` entry + for it can be dropped. + config VARIANT_MIN_BOARD_ID_V3_SCHEMATICS int + depends on VARIANT_SUPPORTS_PRE_V3_SCHEMATICS default 4 if BOARD_GOOGLE_TREMBYLE default 3 if BOARD_GOOGLE_EZKINIL default 3 if BOARD_GOOGLE_MORPHIUS @@ -158,12 +174,35 @@ config VARIANT_MIN_BOARD_ID_V3_SCHEMATICS default 3 if BOARD_GOOGLE_DALBOZ default 1 if BOARD_GOOGLE_VILBOZ default 256 + help + Minimum board version where the variant starts supporting + v3 version of reference schematics. + +config VARIANT_SUPPORTS_WIFI_POWER_ACTIVE_HIGH + bool + default y if VARIANT_SUPPORTS_PRE_V3_SCHEMATICS + default y if BOARD_GOOGLE_BERKNIP + default y if BOARD_GOOGLE_VILBOZ + default n + help + Whether this variant supports active high power enable for + WiFi. For pre-v3 schematics, this is always true. There are + some variants which used v3 schematics, but did not pick up + the change for active low WiFi power enable. Those variants + will have to set this config to true. Eventually, when a + variant needs to only support v3 schematics with active low + power enable for WiFi, `default y` entry for it can be + dropped. config VARIANT_MIN_BOARD_ID_WIFI_POWER_ACTIVE_LOW int + depends on VARIANT_SUPPORTS_WIFI_POWER_ACTIVE_HIGH default 3 if BOARD_GOOGLE_BERKNIP default 2 if BOARD_GOOGLE_VILBOZ default VARIANT_MIN_BOARD_ID_V3_SCHEMATICS + help + Minimum board version where the variant starts supporting + active low power enable for WiFi. config VBOOT_STARTS_BEFORE_BOOTBLOCK bool "PSP verstage" -- cgit v1.2.3