summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Massey <aaronmassey@google.com>2022-04-08 11:37:45 -0600
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-04-12 01:10:32 +0000
commit9f3f9b0cd55493f93c86cb8f239eb9f6a3a49303 (patch)
tree801aef3a6b9e136b1045bda166ab6e232301eaa1
parent3b0bfb3fdd2d02c5e3dabd5b15ccb734feb8b493 (diff)
downloadchrome-ec-9f3f9b0cd55493f93c86cb8f239eb9f6a3a49303.tar.gz
zephyr: Document chargestate AP cmd in battery doc
Document the chargestate ectool command in the zephyr battery doc. BRANCH=none BUG=b:216366887 TEST=gitiles gerrit view Signed-off-by: Aaron Massey <aaronmassey@google.com> Change-Id: I1bfb93ff9f04f6fbd3ddf902d52c651fbe30615b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3579621 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
-rw-r--r--docs/zephyr/zephyr_battery.md19
1 files changed, 18 insertions, 1 deletions
diff --git a/docs/zephyr/zephyr_battery.md b/docs/zephyr/zephyr_battery.md
index 76dd3dfc69..c84bcc3b8e 100644
--- a/docs/zephyr/zephyr_battery.md
+++ b/docs/zephyr/zephyr_battery.md
@@ -239,18 +239,35 @@ battery_was_removed = 0
debug output = off
```
+### AP Console Commands (ectool)
+
+#### chargestate
+
+The `chargestate` [ectool] command may be invoked to debug and manipulate
+machine charging state.
+
+Usage output of `uart: # ectool chargestate`:
+
+```
+Usage:
+ chargestate show - show current state
+ chargestate param NUM [VALUE] - get/set param NUM
+ chargestate param help - show known param NUMs
+```
+
<!-- Reference Links -->
+[CONFIG_PLATFORM_EC_BATTERY_PRESENT_CUSTOM]: https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/platform/ec/zephyr/Kconfig.battery?q=%22PLATFORM_EC_BATTERY_PRESENT_CUSTOM%22&ss=chromiumos
[DEFAULT_BATTERY_TYPE]: https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/platform/ec/zephyr/shim/src/battery.c?q=%22DEFAULT_BATTERY_TYPE%22&ss=chromiumos
[EC console command]: https://chromium.googlesource.com/chromiumos/platform/ec/+/HEAD/README.md#useful-ec-console-commands
[Example CL adding a new battery]: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3312506/
[Example CL enabling batteries on a board]: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3200068/
[Kconfig.battery]: https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/platform/ec/zephyr/Kconfig.battery
-[CONFIG_PLATFORM_EC_BATTERY_PRESENT_CUSTOM]: https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/platform/ec/zephyr/Kconfig.battery?q=%22PLATFORM_EC_BATTERY_PRESENT_CUSTOM%22&ss=chromiumos
[Zephyr I2C]: zephyr_i2c.md#Mapping-legacy-I2C-port-numbers-to-Zephyr-devicetree-nodes
[Zephyr gpios]: zephyr_gpio.md#Devicetree-Nodes
[battery bindings directory]: https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/platform/ec/zephyr/dts/bindings/battery/
[battery-smart enum]: https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/platform/ec/zephyr/dts/bindings/battery/battery-smart.yaml?q=%22enum:%22&ss=chromiumos
[cros-ec-i2c-port-base.yaml]: https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/platform/ec/zephyr/dts/bindings/i2c/cros-ec-i2c-port-base.yaml
+[ectool]: ../ap-ec-comm.md
[task]: https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/platform/ec/zephyr/shim/include/shimmed_task_id.h
[*node label*]: https://docs.zephyrproject.org/latest/build/dts/intro.html#dt-node-labels