summaryrefslogtreecommitdiff
path: root/zephyr/test/i2c/boards/native_posix.overlay
diff options
context:
space:
mode:
Diffstat (limited to 'zephyr/test/i2c/boards/native_posix.overlay')
-rw-r--r--zephyr/test/i2c/boards/native_posix.overlay37
1 files changed, 37 insertions, 0 deletions
diff --git a/zephyr/test/i2c/boards/native_posix.overlay b/zephyr/test/i2c/boards/native_posix.overlay
new file mode 100644
index 0000000000..e78c5d0faa
--- /dev/null
+++ b/zephyr/test/i2c/boards/native_posix.overlay
@@ -0,0 +1,37 @@
+/* Copyright 2020 The ChromiumOS Authors
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#include <board-overlays/native_posix.dts>
+
+/ {
+ i2c1: i2c@400 {
+ status = "okay";
+ compatible = "zephyr,i2c-emul-controller";
+ clock-frequency = <I2C_BITRATE_STANDARD>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x400 4>;
+ };
+
+ named-i2c-ports {
+ compatible = "named-i2c-ports";
+ accel-0 {
+ i2c-port = <&i2c0>;
+ enum-names = "I2C_PORT_ACCEL",
+ "I2C_PORT_EEPROM";
+ };
+ usb-c1 {
+ i2c-port = <&i2c1>;
+ enum-names = "I2C_PORT_USB_C1";
+ };
+ };
+};
+
+&i2c0 {
+ bmi_i2c: bmi@68 {
+ compatible = "bosch,bmi160";
+ reg = <0x68>;
+ };
+};