diff options
author | Sam Hurst <shurst@google.com> | 2022-02-09 12:07:18 -0800 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-04-13 01:41:46 +0000 |
commit | 229bb8111cd47592ac2cc012683f4f7169705d6a (patch) | |
tree | 7138d72cf39ac81f26b35d0bb8de4c00ebab70ed | |
parent | a22fc92aedc9acc2c531eb0b6ee929e66391d755 (diff) | |
download | chrome-ec-229bb8111cd47592ac2cc012683f4f7169705d6a.tar.gz |
zephyr: docs: add AP Power documentation
Document the AP Power Kconfig.ap_power options
BUG=b:208437225
TEST=Browse doc in gerrit
BRANCH=main
Signed-off-by: Sam Hurst <shurst@google.com>
Change-Id: I5332a20c9125bd78cb14d4245479f6fd6ad41c81
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3451007
Reviewed-by: Keith Short <keithshort@chromium.org>
-rw-r--r-- | docs/zephyr/zephyr_ap_power.md | 58 | ||||
-rw-r--r-- | docs/zephyr/zephyr_new_board_checklist.md | 1 |
2 files changed, 59 insertions, 0 deletions
diff --git a/docs/zephyr/zephyr_ap_power.md b/docs/zephyr/zephyr_ap_power.md new file mode 100644 index 0000000000..0b95e375d6 --- /dev/null +++ b/docs/zephyr/zephyr_ap_power.md @@ -0,0 +1,58 @@ +# Zephyr EC AP Power Requirements + +[TOC] + +## Overview + +[AP] power configures the minimum amount of power needed to boot the Application +Processor. + +## Kconfig Options + +The Kconfig option `CONFIG_PLATFORM_EC_BOOT_AP_POWER_REQUIREMENTS` enables checking power +thresholds before booting the AP. See the file [Kconfig.ap_power] for all Kconfig +options related to this feature. + +## Devicetree Nodes + +None required. + +## Board Specific Code + +None required. + +## Threads + +AP_POWER support does not enable any threads. + +## Testing and Debugging + +Use the battfake command to force the battery level, independent of the actual battery charge. +To verify the AP power thresholds, force the battery level below the +`CONFIG_PLATFORM_EC_CHARGER_MIN_BAT_PCT_FOR_POWER_ON` setting and reboot the EC. +The EC should prevent the AP from powering up. + +`battfake` usage: battfake <percent> (-1 = use real level) + +``` +battfake 2 +reboot +/* Verify that AP does ot boot */ +battfak3 3 +/* Verify that AP boots */ +/* Restore normal operation */ +battfake -1 +``` +## Example + +For Herobrine, the minimum battery level to boot the AP without AC is 2 percent +of the battery capacity and the minimum AC power to boot the AP with a battery +is set to 10000 milliwats. + +``` +CONFIG_PLATFORM_EC_CHARGER_MIN_BAT_PCT_FOR_POWER_ON=2 +CONFIG_PLATFORM_EC_CHARGER_MIN_POWER_MW_FOR_POWER_ON=10000 +``` + +[AP]: ../ec_terms.md#ap +[Kconfig.ap_power]: https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/platform/ec/zephyr/Kconfig.ap_power diff --git a/docs/zephyr/zephyr_new_board_checklist.md b/docs/zephyr/zephyr_new_board_checklist.md index aa9eae4e8c..eb4584af2c 100644 --- a/docs/zephyr/zephyr_new_board_checklist.md +++ b/docs/zephyr/zephyr_new_board_checklist.md @@ -54,6 +54,7 @@ EC Feature | Ne :-------------------------------------------------------------------------- | :-----------------: [Configure EC Chipset (TODO)](./zephyr_template.md) | yes [Configure AP to EC Communication](./zephyr_ap_ec_comm.md) | yes +[Configure AP Power Thresholds](./zephyr_ap_power.md) | yes [Configure AP Power Sequencing (TODO)](./zephyr_template.md) | yes [Configure USB-A](./zephyr_usba.md) | no [Configure USB-C (TODO)](./zephyr_template.md) | yes |