summaryrefslogtreecommitdiff
path: root/zephyr/dts
diff options
context:
space:
mode:
authorSam Hurst <shurst@google.com>2021-10-04 10:23:03 -0700
committerCommit Bot <commit-bot@chromium.org>2021-10-22 01:29:16 +0000
commitf07b08ac2e713e7aac53ec35c2653e5d4103068b (patch)
tree08be048640cc716a46e60bc327403532fc09e09e /zephyr/dts
parent7bb51906784c97ec32248469ed6466783909a664 (diff)
downloadchrome-ec-f07b08ac2e713e7aac53ec35c2653e5d4103068b.tar.gz
zephyr: add support for bc1.2 in device tree
This commit adds support for bc1.2 definition in device tree. It will allow to remove board specific files which implemented the bc1.2 functionalities. This will unify the logic between different board in zephyr. BRANCH=main BUG=b:194432779 TEST=HOST MODE: Plug non-pd device into TypeC port and verified that the device received power and the following was printed to the EC console: pi3usb9201[p0]: CDP_HOST mode] CLIENT MODE: Plug an non-pd TypeC charger into the DUT and verified that the device was charging with the "chgsup" command. The EC console displayed the following: port=0, type=1, cur=3000mA, vtg=5000mV, lsm=1 And the following debug output was displayed: pi3usb9201[p0]: sts = 0x80, lim = 1500 mA, supplier = 3] Using Suzy-Q, EC console displayed the follow: pi3usb9201[p0]: sts = 0x40, lim = 500 mA, supplier = 5] and "chgsup" port=0, type=2, cur=1500mA, vtg=5000mV, lsm=1 Same results on Port 1 Signed-off-by: Sam Hurst <shurst@google.org> Change-Id: Ia8e182997c48aa00f92c06e0fef6758473df29bb Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3202996 Commit-Queue: Sam Hurst <shurst@google.com> Tested-by: Sam Hurst <shurst@google.com> Reviewed-by: Wai-Hong Tam <waihong@google.com> Reviewed-by: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'zephyr/dts')
-rw-r--r--zephyr/dts/bindings/usbc/pericom,pi3usb9201.yaml27
1 files changed, 27 insertions, 0 deletions
diff --git a/zephyr/dts/bindings/usbc/pericom,pi3usb9201.yaml b/zephyr/dts/bindings/usbc/pericom,pi3usb9201.yaml
new file mode 100644
index 0000000000..d72fa20a47
--- /dev/null
+++ b/zephyr/dts/bindings/usbc/pericom,pi3usb9201.yaml
@@ -0,0 +1,27 @@
+description: USBC BC1.2
+
+compatible: "pericom,pi3usb9201"
+
+properties:
+ port:
+ type: phandle
+ required: true
+ description: |
+ I2C port used to communicate with controller
+
+ irq:
+ type: phandles
+ required: true
+ description: |
+ GPIO interrupt from BC1.2
+
+ i2c-addr-flags:
+ type: string
+ default: "PI3USB9201_I2C_ADDR_3_FLAGS"
+ enum:
+ - "PI3USB9201_I2C_ADDR_0_FLAGS"
+ - "PI3USB9201_I2C_ADDR_1_FLAGS"
+ - "PI3USB9201_I2C_ADDR_2_FLAGS"
+ - "PI3USB9201_I2C_ADDR_3_FLAGS"
+ description: |
+ I2C address of controller