summaryrefslogtreecommitdiff
path: root/zephyr/test/i2c/overlay.dts
diff options
context:
space:
mode:
authorYuval Peress <peress@chromium.org>2021-03-23 01:24:03 -0600
committerCommit Bot <commit-bot@chromium.org>2021-04-08 07:39:45 +0000
commitf48f2ee331ead2bf641279d37ee091217e0d141c (patch)
treea98177440f53292e19b68c87d0292d19e27d29d4 /zephyr/test/i2c/overlay.dts
parent8d70ee4c035e949d5e59655d93c43ebd81060c87 (diff)
downloadchrome-ec-f48f2ee331ead2bf641279d37ee091217e0d141c.tar.gz
zephyr: i2c mapping using an enum
Currently, every project will need to provide a custom mapping header for i2c as well as gpios. We'd like to move that overhead to the dts files, which will make the board dts a lot more reusable as well as clean up the bringup of new boards. Add to the i2c_ports enum from the dts named i2c port list. Each enum is only added if a node exists using that enum. This also allowes for verifying that the enum is only used once. BRANCH=none BUG=b:184786824 TEST=build and flashed volteer TEST=zmake testall Signed-off-by: Yuval Peress <peress@chromium.org> Change-Id: I42cc098a9badac57a3781fa9dfaf32c0ec0c5aca Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2780838
Diffstat (limited to 'zephyr/test/i2c/overlay.dts')
-rw-r--r--zephyr/test/i2c/overlay.dts1
1 files changed, 1 insertions, 0 deletions
diff --git a/zephyr/test/i2c/overlay.dts b/zephyr/test/i2c/overlay.dts
index 301695b791..2c56ee3b7a 100644
--- a/zephyr/test/i2c/overlay.dts
+++ b/zephyr/test/i2c/overlay.dts
@@ -8,6 +8,7 @@
compatible = "named-i2c-ports";
accel-0 {
i2c-port = <&bmi_i2c>;
+ enum-name = "I2C_PORT_ACCEL";
label = "ACCEL_0";
};
};