summaryrefslogtreecommitdiff
path: root/include/config.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/config.h')
-rw-r--r--include/config.h30
1 files changed, 27 insertions, 3 deletions
diff --git a/include/config.h b/include/config.h
index fd24547884..c32c68faf3 100644
--- a/include/config.h
+++ b/include/config.h
@@ -412,10 +412,21 @@
*/
#undef CONFIG_BOARD_PRE_INIT
-/* EC has GPIOs attached to board version stuffing resistors */
+/*
+ * EC has the notion of board version either through resistors or EEPROM.
+ * The common CONFIG_BOARD_VERSION is defined automatically when one of the
+ * specific options is used.
+ */
#undef CONFIG_BOARD_VERSION
-/* The decoding of the GPIOs defining board version is defined in board code */
-#undef CONFIG_BOARD_SPECIFIC_VERSION
+/* The board version comes from Cros Board Info within EEPROM. */
+#undef CONFIG_BOARD_VERSION_CBI
+/* The board version function is defined in board code. */
+#undef CONFIG_BOARD_VERSION_CUSTOM
+/*
+ * The board version is encoded with 3 GPIO signals where GPIO_BOARD_VERSION1
+ * is the LSB.
+ */
+#undef CONFIG_BOARD_VERSION_GPIO
/* EC responses to a board defined I2C slave address */
#undef CONFIG_BOARD_I2C_SLAVE_ADDR
@@ -3324,6 +3335,19 @@
#define CONFIG_CRC8
#endif /* defined(CONFIG_EXPERIMENTAL_CONSOLE) */
+
+/******************************************************************************/
+/*
+ * Automatically define common CONFIG_BOARD_VERSION if any specific option is
+ * used.
+ */
+
+#if defined(CONFIG_BOARD_VERSION_CBI) || \
+ defined(CONFIG_BOARD_VERSION_CUSTOM) || \
+ defined(CONFIG_BOARD_VERSION_GPIO)
+#define CONFIG_BOARD_VERSION
+#endif
+
/******************************************************************************/
/*
* Throttle AP must have temperature sensor enabled to get the readings for