diff options
author | Yuval Peress <peress@chromium.org> | 2020-11-18 00:08:22 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-01-15 03:55:15 +0000 |
commit | 09e50c9b65860d16a6b6628ed2e43f7acd3db488 (patch) | |
tree | 2b96d9ab86c76c7d721b7abacf6a059e4989b97f | |
parent | ca0a8e4e2231b17ebba4dda22de4241166f63000 (diff) | |
download | chrome-ec-09e50c9b65860d16a6b6628ed2e43f7acd3db488.tar.gz |
dts: Add custom bindings directory to builds
This change adds a dts/bindings directory which can be included for
our builds. Normally, we would have to add the dts/bindings
directory to each project. That means that we would need to add
the custom bindings at projects/experimental/volteer/dts/bindings.
This change allows us to add a single location of it instead at the
zephyr-chrome/ level.
The first use case is a custom list of phandles which allows us
to curate the mapping of i2c ports. This will later be used to
move away from our dependency on platform/ec/chip/ files.
BUG=b:173031122
TEST=firmware_builder.py test
Change-Id: I251cb32d1a3e63fc0d76c7f3f480a6538d539af4
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/zephyr-chrome/+/2546328
Tested-by: Yuval Peress <peress@chromium.org>
Auto-Submit: Yuval Peress <peress@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Commit-Queue: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2630146
Tested-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
-rw-r--r-- | zephyr/dts/bindings/i2c/i2c-keys.yaml | 17 | ||||
-rw-r--r-- | zephyr/projects/volteer/boards/arm/volteer/volteer.dts | 29 |
2 files changed, 46 insertions, 0 deletions
diff --git a/zephyr/dts/bindings/i2c/i2c-keys.yaml b/zephyr/dts/bindings/i2c/i2c-keys.yaml new file mode 100644 index 0000000000..08add12b32 --- /dev/null +++ b/zephyr/dts/bindings/i2c/i2c-keys.yaml @@ -0,0 +1,17 @@ +# Copyright (c) 2020 The Chromium OS Authors +# SPDX-License-Identifier: Apache-2.0 + +description: I2C KEYS parent node + +compatible: "i2c-keys" + +child-binding: + description: I2C KEYS child node + properties: + i2c-port: + type: phandle + required: true + label: + required: true + type: string + description: Human readable string describing the device (used as device_get_binding() argument)
\ No newline at end of file diff --git a/zephyr/projects/volteer/boards/arm/volteer/volteer.dts b/zephyr/projects/volteer/boards/arm/volteer/volteer.dts index b3c076e6a2..0d8b3d9af8 100644 --- a/zephyr/projects/volteer/boards/arm/volteer/volteer.dts +++ b/zephyr/projects/volteer/boards/arm/volteer/volteer.dts @@ -28,6 +28,35 @@ zephyr,flash = &flash0; }; + named-i2c-ports { + compatible = "i2c-keys"; + + sensor { + i2c-port = <&i2c0_0>; + label = "SENSOR"; + }; + usb-c0 { + i2c-port = <&i2c1_0>; + label = "USB_C0"; + }; + usb-c1 { + i2c-port = <&i2c2_0>; + label = "USB_C1"; + }; + usb1-mix { + i2c-port = <&i2c3_0>; + label = "USB_1_MIX"; + }; + power { + i2c-port = <&i2c5_0>; + label = "POWER"; + }; + eeprom { + i2c-port = <&i2c7_0>; + label = "EEPROM"; + }; + }; + named-gpios { compatible = "gpio-keys"; |