diff options
author | Yuval Peress <peress@chromium.org> | 2021-04-07 00:17:55 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-04-09 07:06:52 +0000 |
commit | c4d1b01bc345557ea9be3793f724d7d35ddbf174 (patch) | |
tree | 67a82f814ef889de07b6ed819dbe2f0ee0beca21 /zephyr/dts/bindings/i2c | |
parent | 41aeb59c43bfb94ac7d34a4a796aa245759ee8e3 (diff) | |
download | chrome-ec-c4d1b01bc345557ea9be3793f724d7d35ddbf174.tar.gz |
zephyr: volteer: init i2c_ports
Populate i2c_ports[] and set i2c_ports_used correctly.
Add child bindings for named i2c ports that allow configurations. A
configured named i2c node MUST have a kbps property and 2 child nodes
for `scl` and `sda` which will use the same enums as the named gpios.
This provides a compile-time check to make sure that the overlay
gpio.dts defined a named gpio using the SCL/SDA enums. This means
that if the i2c port config uses a valid enum from gpio-enum-name.yaml
but the overlay did not define a node using that same enum, the build
will break (because the gpio_signal enum will not have that enum
defined).
BRANCH=none
BUG=b:184269641
TEST=zmake testall
TEST=run firmware_ECCbiEeprom FAFT on volteer
Signed-off-by: Yuval Peress <peress@chromium.org>
Change-Id: I7f46ab8f8b4079cf6ae5287869e6844fea38a100
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2810333
Commit-Queue: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'zephyr/dts/bindings/i2c')
-rw-r--r-- | zephyr/dts/bindings/i2c/cros-ec-i2c-port-base.yaml | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/zephyr/dts/bindings/i2c/cros-ec-i2c-port-base.yaml b/zephyr/dts/bindings/i2c/cros-ec-i2c-port-base.yaml index 49d9ee53c4..eb6b572569 100644 --- a/zephyr/dts/bindings/i2c/cros-ec-i2c-port-base.yaml +++ b/zephyr/dts/bindings/i2c/cros-ec-i2c-port-base.yaml @@ -32,3 +32,14 @@ properties: description: Human readable string describing the device (used as device_get_binding() argument). + +child-binding: + description: Optional configuration bindings + properties: + frequency: + type: int + required: true + description: Transfer data rate in kHz + child-binding: + description: SCL and SDA configurations + include: gpio-enum-name.yaml |