summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKnox Chiou <knoxchiou@google.com>2023-03-30 19:32:18 +0800
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2023-04-11 03:57:40 +0000
commit9a77bb3d4aa0135669a1746552b03042bcc3b065 (patch)
tree902fe5ead6b63df029c73d2e7caab238d7d17b87
parent89379a0a5e12275eed79b7106b5746afdff4e67e (diff)
downloadchrome-ec-9a77bb3d4aa0135669a1746552b03042bcc3b065.tar.gz
zephyr: Support PLATFORM_EC_CMD_POWERINDEBUG flag
Support PLATFORM_EC_CMD_POWERINDEBUG flag for `powerindebug` on zephyr. BUG=b:272185086 BRANCH=none TEST=zmake build geralt TEST=disable flag and check powerindebug Signed-off-by: Knox Chiou <knoxchiou@google.com> Change-Id: I89af4161b6bcc351e750d2716e0cc594cfe74814 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4383291 Tested-by: Knox Chiou <knoxchiou@chromium.org> Commit-Queue: Knox Chiou <knoxchiou@chromium.org> Reviewed-by: Zhuohao Lee <zhuohao@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Code-Coverage: Knox Chiou <knoxchiou@chromium.org>
-rw-r--r--util/config_allowed.txt1
-rw-r--r--zephyr/Kconfig8
-rw-r--r--zephyr/shim/include/config_chip.h5
-rw-r--r--zephyr/test/drivers/default/prj.conf1
4 files changed, 14 insertions, 1 deletions
diff --git a/util/config_allowed.txt b/util/config_allowed.txt
index af4f40e232..130e6e9421 100644
--- a/util/config_allowed.txt
+++ b/util/config_allowed.txt
@@ -269,7 +269,6 @@ CONFIG_CMD_PD_SRCCAPS_REDUCED_SIZE
CONFIG_CMD_PD_TIMER
CONFIG_CMD_PECI
CONFIG_CMD_PLL
-CONFIG_CMD_POWERINDEBUG
CONFIG_CMD_POWERLED
CONFIG_CMD_POWER_AP
CONFIG_CMD_PPC_DUMP
diff --git a/zephyr/Kconfig b/zephyr/Kconfig
index abb4a11c92..2f018a92c7 100644
--- a/zephyr/Kconfig
+++ b/zephyr/Kconfig
@@ -223,6 +223,14 @@ config PLATFORM_EC_CMD_GPIO_EXTENDED
NOTE: This flag should be removed on a shipping device.
+config PLATFORM_EC_CMD_POWERINDEBUG
+ bool "Console command: powerindebug"
+ default y
+ help
+ Enable the `powerindebug` console command. This command is used to
+ get and set power signal. This flag should be disabled on a shipping
+ device.
+
config PLATFORM_EC_CONSOLE_CMD_HCDEBUG
bool "Console command: hcdebug"
default y
diff --git a/zephyr/shim/include/config_chip.h b/zephyr/shim/include/config_chip.h
index 5375b0aa81..e044b8dc66 100644
--- a/zephyr/shim/include/config_chip.h
+++ b/zephyr/shim/include/config_chip.h
@@ -2032,6 +2032,11 @@ extern char mock_jump_data[CONFIG_PLATFORM_EC_PRESERVED_END_OF_RAM_SIZE];
#define CONFIG_CMD_HCDEBUG
#endif
+#undef CONFIG_CMD_POWERINDEBUG
+#ifdef CONFIG_PLATFORM_EC_CMD_POWERINDEBUG
+#define CONFIG_CMD_POWERINDEBUG
+#endif
+
#undef CONFIG_CMD_USB_PD_PE
#ifdef CONFIG_PLATFORM_EC_CONSOLE_CMD_USB_PD_PE
#define CONFIG_CMD_USB_PD_PE
diff --git a/zephyr/test/drivers/default/prj.conf b/zephyr/test/drivers/default/prj.conf
index fbc7c4336b..d125545fdb 100644
--- a/zephyr/test/drivers/default/prj.conf
+++ b/zephyr/test/drivers/default/prj.conf
@@ -3,6 +3,7 @@
# found in the LICENSE file.
CONFIG_PLATFORM_EC_CMD_BUTTON=y
+CONFIG_PLATFORM_EC_CMD_POWERINDEBUG=y
CONFIG_PLATFORM_EC_CONSOLE_CMD_RTC=y
CONFIG_PLATFORM_EC_CONSOLE_CMD_RTC_ALARM=y
CONFIG_PLATFORM_EC_RTC=y