diff options
author | Yuval Peress <peress@chromium.org> | 2021-04-06 12:58:59 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-04-07 01:42:04 +0000 |
commit | 0f2a90bb2a1fd35f5f63c0e1b8fa7630d139a2c0 (patch) | |
tree | 391d54344503e1c225b5d5de67de8c1038398998 | |
parent | 803b5f69747021f8fb8b1fd02569b726ae37372a (diff) | |
download | chrome-ec-0f2a90bb2a1fd35f5f63c0e1b8fa7630d139a2c0.tar.gz |
zephyr: kconfig: move board_version configs to separate file
Clean up the root Kconfig for Zephyr by moving sub configs to separate
file (Kconfig.board_version).
BRANCH=none
BUG=none
TEST=zmake testall
Signed-off-by: Yuval Peress <peress@chromium.org>
Change-Id: I876b0d811b72a0691c763225218ad101ec3826b0
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2808143
Reviewed-by: Simon Glass <sjg@chromium.org>
-rw-r--r-- | zephyr/Kconfig | 43 | ||||
-rw-r--r-- | zephyr/Kconfig.board_version | 45 |
2 files changed, 46 insertions, 42 deletions
diff --git a/zephyr/Kconfig b/zephyr/Kconfig index ec956ef49a..712e179811 100644 --- a/zephyr/Kconfig +++ b/zephyr/Kconfig @@ -34,6 +34,7 @@ if PLATFORM_EC rsource "shim/chip/npcx/Kconfig.npcx" rsource "Kconfig.adc" rsource "Kconfig.battery" +rsource "Kconfig.board_version" rsource "Kconfig.console" rsource "Kconfig.header" rsource "Kconfig.keyboard" @@ -145,48 +146,6 @@ config PLATFORM_EC_BOARD_VERSION the EC to handle several board versions, avoiding the problem of having to flash different images to different board versions. -if PLATFORM_EC_BOARD_VERSION - -choice "Version source" - prompt "Select the source of the version number" - help - This allow selection of the source of the board version number - information. Several options are available, but BOARD_VERSION_CBI is - preferred for new boards, so long as the hardware supports it (i.e. - has an EEPROM). - -config PLATFORM_EC_BOARD_VERSION_CBI - bool "Chromium OS Board Info (CBI)" - depends on PLATFORM_EC_CBI - help - Choose this if the board version comes from Chromium Board Info - within the EEPROM. This is the recommended approach and is used on - newer boards. The version information is written into the EEPROM as - part of the factory process. - -config PLATFORM_EC_BOARD_VERSION_GPIO - bool "Strapping GPIOs" - help - Choose this if the board version is encoded with three GPIO signals - (GPIO_BOARD_VERSION1, GPIO_BOARD_VERSION2 and GPIO_BOARD_VERSION3) - forming the 3-digit binary number. GPIO_BOARD_VERSION1 is the LSB. - This provides 8 possible combinations. - - The GPIOs should have external pull-up/pull-down resistors installed - at the factory to select the correct value. - -config PLATFORM_EC_BOARD_VERSION_CUSTOM - bool "Custom board-specific algortihm" - help - Choose this if none of the standard methods is available and you must - perform special logic to find the board version. If this is chosen, - then the system code will call board_get_version() to find out the - version, so you should implement this function in your board code. - -endchoice - -endif # PLATFORM_EC_BOARD_VERSION - config PLATFORM_EC_CBI bool "CBI EEPROM support" depends on PLATFORM_EC_I2C diff --git a/zephyr/Kconfig.board_version b/zephyr/Kconfig.board_version new file mode 100644 index 0000000000..068367c8b8 --- /dev/null +++ b/zephyr/Kconfig.board_version @@ -0,0 +1,45 @@ +# Copyright 2021 The Chromium OS Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +if PLATFORM_EC_BOARD_VERSION + +choice "Version source" + prompt "Select the source of the version number" + help + This allow selection of the source of the board version number + information. Several options are available, but BOARD_VERSION_CBI is + preferred for new boards, so long as the hardware supports it (i.e. + has an EEPROM). + +config PLATFORM_EC_BOARD_VERSION_CBI + bool "Chromium OS Board Info (CBI)" + depends on PLATFORM_EC_CBI + help + Choose this if the board version comes from Chromium Board Info + within the EEPROM. This is the recommended approach and is used on + newer boards. The version information is written into the EEPROM as + part of the factory process. + +config PLATFORM_EC_BOARD_VERSION_GPIO + bool "Strapping GPIOs" + help + Choose this if the board version is encoded with three GPIO signals + (GPIO_BOARD_VERSION1, GPIO_BOARD_VERSION2 and GPIO_BOARD_VERSION3) + forming the 3-digit binary number. GPIO_BOARD_VERSION1 is the LSB. + This provides 8 possible combinations. + + The GPIOs should have external pull-up/pull-down resistors installed + at the factory to select the correct value. + +config PLATFORM_EC_BOARD_VERSION_CUSTOM + bool "Custom board-specific algortihm" + help + Choose this if none of the standard methods is available and you must + perform special logic to find the board version. If this is chosen, + then the system code will call board_get_version() to find out the + version, so you should implement this function in your board code. + +endchoice + +endif # PLATFORM_EC_BOARD_VERSION |