summaryrefslogtreecommitdiff
path: root/zephyr/projects/npcx_evb/npcx9
diff options
context:
space:
mode:
authorWealian Liao <whliao@nuvoton.corp-partner.google.com>2021-07-07 17:39:36 +0800
committerCommit Bot <commit-bot@chromium.org>2021-07-28 18:37:29 +0000
commit4cbf0f3a6cadcb47466f4c05542190d0561fc5d9 (patch)
tree93384d85bbfbf10a2643db0fb25d56877732906f /zephyr/projects/npcx_evb/npcx9
parentfcb842366ca1cdf309f357d3482678580116ea1d (diff)
downloadchrome-ec-4cbf0f3a6cadcb47466f4c05542190d0561fc5d9.tar.gz
zephyr: npcx_evb: Enable board version gpio
This CL enables board version gpio for npcx7/9_evb BUG=none BRANCH=none TEST=Get the same board version with Cros by 'version' console command Signed-off-by: Wealian Liao <whliao@nuvoton.corp-partner.google.com> Change-Id: Ia1d5a0c4bd7d9b182fbb6841fb16b428192fac23 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3058712 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'zephyr/projects/npcx_evb/npcx9')
-rw-r--r--zephyr/projects/npcx_evb/npcx9/gpio.dts3
-rw-r--r--zephyr/projects/npcx_evb/npcx9/prj.conf3
2 files changed, 6 insertions, 0 deletions
diff --git a/zephyr/projects/npcx_evb/npcx9/gpio.dts b/zephyr/projects/npcx_evb/npcx9/gpio.dts
index 02f257544a..1f41a4dcbe 100644
--- a/zephyr/projects/npcx_evb/npcx9/gpio.dts
+++ b/zephyr/projects/npcx_evb/npcx9/gpio.dts
@@ -87,14 +87,17 @@
};
board_version1 {
gpios = <&gpio6 4 GPIO_INPUT>;
+ enum-name = "GPIO_BOARD_VERSION1";
label = "BOARD_VERSION1";
};
board_version2 {
gpios = <&gpio6 5 GPIO_INPUT>;
+ enum-name = "GPIO_BOARD_VERSION2";
label = "BOARD_VERSION2";
};
board_version3 {
gpios = <&gpio6 6 GPIO_INPUT>;
+ enum-name = "GPIO_BOARD_VERSION3";
label = "BOARD_VERSION3";
};
};
diff --git a/zephyr/projects/npcx_evb/npcx9/prj.conf b/zephyr/projects/npcx_evb/npcx9/prj.conf
index 04917a78d4..6039ac597b 100644
--- a/zephyr/projects/npcx_evb/npcx9/prj.conf
+++ b/zephyr/projects/npcx_evb/npcx9/prj.conf
@@ -20,6 +20,9 @@ CONFIG_PLATFORM_EC_VSTORE=n
# This can be removed when A2 chip is available.
CONFIG_PLATFORM_EC_WORKAROUND_FLASH_DOWNLOAD_API=y
+# Board version is selected over GPIO board ID pins.
+CONFIG_PLATFORM_EC_BOARD_VERSION_GPIO=y
+
# Zephyr feature
CONFIG_ASSERT=y
CONFIG_SHELL_MINIMAL=n