summaryrefslogtreecommitdiff
path: root/zephyr/Kconfig.board_version
diff options
context:
space:
mode:
authorYuval Peress <peress@chromium.org>2021-04-06 12:58:59 -0600
committerCommit Bot <commit-bot@chromium.org>2021-04-07 01:42:04 +0000
commit0f2a90bb2a1fd35f5f63c0e1b8fa7630d139a2c0 (patch)
tree391d54344503e1c225b5d5de67de8c1038398998 /zephyr/Kconfig.board_version
parent803b5f69747021f8fb8b1fd02569b726ae37372a (diff)
downloadchrome-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>
Diffstat (limited to 'zephyr/Kconfig.board_version')
-rw-r--r--zephyr/Kconfig.board_version45
1 files changed, 45 insertions, 0 deletions
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