diff options
author | Michał Barnaś <mb@semihalf.com> | 2021-08-06 12:01:09 +0200 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-08-16 12:15:16 +0000 |
commit | 7c684a81a49c03cb5c8688c8607e883f7604dad8 (patch) | |
tree | 645ebdd3765d1dfac08c53d84101cd6e6f42fd15 /zephyr/dts/bindings | |
parent | 8e7f105716a105173dc8af41cb76437fee62e91a (diff) | |
download | chrome-ec-7c684a81a49c03cb5c8688c8607e883f7604dad8.tar.gz |
zephyr: add support for switchcap in device tree
This commit adds support for switchcap definition in device tree.
It will allow to remove board specific files which implemented
the switchcap functionalities. This will unify the logic between
different board in zephyr.
BRANCH=main
BUG=b:194211207
TEST=Use linked TEST commits to see example of definitions for lazor
Use GPIO or LN9310 version, build and flash to lazor.
Board should be able to boot correctly.
Signed-off-by: Michał Barnaś <mb@semihalf.com>
Change-Id: Ib80a73dcb2db95e2dcf48e33f876a39246fd506a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3085670
Reviewed-by: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'zephyr/dts/bindings')
-rw-r--r-- | zephyr/dts/bindings/switchcap/switchcap-gpio.yaml | 16 | ||||
-rw-r--r-- | zephyr/dts/bindings/switchcap/switchcap-ln9310.yaml | 27 |
2 files changed, 43 insertions, 0 deletions
diff --git a/zephyr/dts/bindings/switchcap/switchcap-gpio.yaml b/zephyr/dts/bindings/switchcap/switchcap-gpio.yaml new file mode 100644 index 0000000000..5d1a25bf94 --- /dev/null +++ b/zephyr/dts/bindings/switchcap/switchcap-gpio.yaml @@ -0,0 +1,16 @@ +description: SwitchCap controlled by gpios + +compatible: "switchcap-gpio" + +properties: + enable-pin: + type: phandle + required: true + description: | + GPIO used to enable the switch cap + + power-good-pin: + type: phandle + required: false + description: | + GPIO used to read if power is good diff --git a/zephyr/dts/bindings/switchcap/switchcap-ln9310.yaml b/zephyr/dts/bindings/switchcap/switchcap-ln9310.yaml new file mode 100644 index 0000000000..afd89aacc6 --- /dev/null +++ b/zephyr/dts/bindings/switchcap/switchcap-ln9310.yaml @@ -0,0 +1,27 @@ +description: SwitchCap controlled by LN9310 + +compatible: "switchcap-ln9310" + +properties: + enable-l-pin: + type: phandle + required: true + description: | + GPIO used to enable the switch cap - active low + + port: + type: phandle + required: true + description: | + I2C port used to communicate with controller + + addr-flags: + type: string + default: "LN9310_I2C_ADDR_0_FLAGS" + enum: + - "LN9310_I2C_ADDR_0_FLAGS" + - "LN9310_I2C_ADDR_1_FLAGS" + - "LN9310_I2C_ADDR_2_FLAGS" + - "LN9310_I2C_ADDR_3_FLAGS" + description: | + I2C address of controller |