From c97cb76b816fc8e02fe3de0652794e85fe38f4c6 Mon Sep 17 00:00:00 2001 From: Philip Chen Date: Thu, 1 Jul 2021 17:03:20 -0700 Subject: cbi: Introduce CONFIG_CBI_GPIO For the boards where SKU_ID/BRD_ID comes from the strapping pins on EC, this new config enables AP to ask EC for those hardware configs using the CBI host command `EC_CMD_GET_CROS_BOARD_INFO`. BRANCH=None BUG=b:186264627 TEST=make buildall -j TEST=Enabled CONFIG_CBI_GPIO for lazor and manually verified with `ectool cbi get`. Change-Id: I7ec9097bab96d2076d9d42db2d003460db000113 Signed-off-by: Philip Chen Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3002452 Reviewed-by: Keith Short Commit-Queue: Philip Chen Tested-by: Philip Chen --- zephyr/Kconfig | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) (limited to 'zephyr/Kconfig') diff --git a/zephyr/Kconfig b/zephyr/Kconfig index ef41309d28..ea437bda40 100644 --- a/zephyr/Kconfig +++ b/zephyr/Kconfig @@ -141,20 +141,35 @@ config PLATFORM_EC_BYPASS_CBI_EEPROM_WP_CHECK When defined, ectool can be used to reprogram all CBI fields, regardless of the state of the hardware write protect. +choice PLATFORM_EC_CBI_STORAGE_TYPE + prompt "Select CBI storage Type" + optional + help + CBI is a means for accessing board information, typically set + during the factory process. This allows selection of the physical + storage of CBI source. + + See here for detailed information on CBI: + + https://chromium.googlesource.com/chromiumos/docs/+/master/design_docs/cros_board_info.md + config PLATFORM_EC_CBI_EEPROM bool "CBI EEPROM support" depends on PLATFORM_EC_I2C help - Enables various Chromium OS Board Info (CBI) accessors as well as - host and console commands. CBI is a means for accessing information - about a board, typically written during the factory process. + Enables Chromium OS Board Info (CBI) from EEPROM. One must specify both I2C_PORT_EEPROM and I2C_ADDR_EEPROM_FLAGS to the CBI EEPROM's i2c port and 7-bit i2c address. - See here for information on CBI: +config PLATFORM_EC_CBI_GPIO + bool "CBI GPIO support" + help + Enables Chromium OS Board Info (CBI) from strapping pins. EC reads + the BOARD ID and SKU ID from GPIOs and then substantiate in-memory + CBI for AP to query. - https://chromium.googlesource.com/chromiumos/docs/+/master/design_docs/cros_board_info.md +endchoice config PLATFORM_EC_CHIPSET_RESET_HOOK bool "Provide a hook for when the AP resets" -- cgit v1.2.1