diff options
author | Sam Hurst <shurst@google.com> | 2022-08-04 12:26:14 -0700 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-09-26 23:01:48 +0000 |
commit | 01f25cc4647133e165c1f67f1ce7cfd8cdfcc38e (patch) | |
tree | af09dd1c620d28597bde1e373a0cf30b401ef7d2 /docs/zephyr | |
parent | d815f54d54b0af1ac811aab4a3bacd80bcd1bbd7 (diff) | |
download | chrome-ec-01f25cc4647133e165c1f67f1ce7cfd8cdfcc38e.tar.gz |
zephyr: docs: add TCPC documentation
Document the TCPC Kconfig.tcpm options
BUG=b:208437225
TEST=Browse doc in gerrit
BRANCH=main
Signed-off-by: Sam Hurst <shurst@google.com>
Change-Id: I7e917d823dbb18208257d84d6b441e59b19228e7
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3811790
Reviewed-by: Keith Short <keithshort@chromium.org>
Commit-Queue: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'docs/zephyr')
-rw-r--r-- | docs/zephyr/zephyr_tcpc.md | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/docs/zephyr/zephyr_tcpc.md b/docs/zephyr/zephyr_tcpc.md new file mode 100644 index 0000000000..d25ad26b34 --- /dev/null +++ b/docs/zephyr/zephyr_tcpc.md @@ -0,0 +1,65 @@ +# Zephyr EC TCPC Configuration + +[TOC] + +## Overview + +Enable support for a [USB-C] [TCPC]. + +## Kconfig Options + +See the file [Kconfig.tcpm] for all Kconfig options related to [TCPC]. +You must enable the specific Kconfig option matching the TCPC chips +used on your design. + +## Devicetree Nodes + +The `TCPC` device tree nodes are defined in the [`DTS Bindings TCPC`] directory. +The `TCPC` device is added to the corresponding I2C bus node and the +"named-usbc-port" contains a phandle to the `TCPC` device + +## Board Specific Code + +None required. + +## Threads + +TCPC support does not enable any threads. + +## Testing and Debugging + +The [`I2C bus scan`] can be used to verify the TCPC device can be accessed and +the `tcpc_dump` console command can be used to dump the TCPC register. + +``` +Usage: tcpc_dump <USB-C port> +``` + +## Example + +The Herobrine system uses the Parade PS8805 TCPC on USBC port 0. + +``` +CONFIG_PLATFORM_EC_USB_PD_TCPM_PS8805=y +``` + +``` +port0@0 { + compatible = "named-usbc-port"; + reg = <0>; + tcpc = <&tcpc_port0>; +}; + +&i2c1_0 { + tcpc_port0: ps8xxx@b { + compatible = "parade,ps8xxx"; + reg = <0xb>; + }; +}; +``` + +[USB-C]: ../usb-c.md +[TCPC]: ../ec_terms.md#tcpc +[`I2C bus scan`]: ./zephyr_i2c.md#Shell-Command_i2c +[Kconfig.tcpm]: https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/platform/ec/zephyr/Kconfig.tcpm +[`DTS Bindings TCPC`]: https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/platform/ec/zephyr/dts/bindings/usbc/tcpc |