summaryrefslogtreecommitdiff
path: root/zephyr/test/i2c_dts
diff options
context:
space:
mode:
Diffstat (limited to 'zephyr/test/i2c_dts')
-rw-r--r--zephyr/test/i2c_dts/CMakeLists.txt10
-rw-r--r--zephyr/test/i2c_dts/overlay.dts23
-rw-r--r--zephyr/test/i2c_dts/prj.conf14
-rw-r--r--zephyr/test/i2c_dts/src/main.c30
-rw-r--r--zephyr/test/i2c_dts/zmake.yaml14
5 files changed, 0 insertions, 91 deletions
diff --git a/zephyr/test/i2c_dts/CMakeLists.txt b/zephyr/test/i2c_dts/CMakeLists.txt
deleted file mode 100644
index eea2834af1..0000000000
--- a/zephyr/test/i2c_dts/CMakeLists.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-# Copyright 2020 The Chromium OS Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-cmake_minimum_required(VERSION 3.13.1)
-find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
-project(i2c_test)
-
-FILE(GLOB app_sources src/*.c)
-target_sources(app PRIVATE ${app_sources})
diff --git a/zephyr/test/i2c_dts/overlay.dts b/zephyr/test/i2c_dts/overlay.dts
deleted file mode 100644
index 2c56ee3b7a..0000000000
--- a/zephyr/test/i2c_dts/overlay.dts
+++ /dev/null
@@ -1,23 +0,0 @@
-/* Copyright 2020 The Chromium OS Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-/ {
- named-i2c-ports {
- compatible = "named-i2c-ports";
- accel-0 {
- i2c-port = <&bmi_i2c>;
- enum-name = "I2C_PORT_ACCEL";
- label = "ACCEL_0";
- };
- };
-};
-
-&i2c0 {
- bmi_i2c: bmi@68 {
- compatible = "bosch,bmi160";
- reg = <0x68>;
- label = "accel-i2c";
- };
-};
diff --git a/zephyr/test/i2c_dts/prj.conf b/zephyr/test/i2c_dts/prj.conf
deleted file mode 100644
index a08cdbb7fb..0000000000
--- a/zephyr/test/i2c_dts/prj.conf
+++ /dev/null
@@ -1,14 +0,0 @@
-CONFIG_ZTEST=y
-CONFIG_LOG=y
-
-CONFIG_EMUL=y
-CONFIG_I2C=y
-CONFIG_I2C_EMUL=y
-CONFIG_BMI160=y
-CONFIG_EMUL_BMI160=y
-CONFIG_SENSOR=y
-CONFIG_BMI160_TRIGGER_NONE=y
-
-# TODO(b/173711210) figure out why SPI is required here when we're not using it.
-CONFIG_SPI=y
-CONFIG_SPI_EMUL=y
diff --git a/zephyr/test/i2c_dts/src/main.c b/zephyr/test/i2c_dts/src/main.c
deleted file mode 100644
index ccd58dde67..0000000000
--- a/zephyr/test/i2c_dts/src/main.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Copyright 2020 The Chromium OS Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#include <device.h>
-#include <devicetree.h>
-#include <ztest.h>
-
-static void test_i2c_get_device(void)
-{
- const struct device *accel0 = DEVICE_DT_GET(
- DT_PHANDLE(DT_PATH(named_i2c_ports, accel_0),
- i2c_port));
- const struct device *bmi_i2c = DEVICE_DT_GET(
- DT_NODELABEL(bmi_i2c));
-
- zassert_not_null(accel0, "accel0 was NULL");
- zassert_not_null(bmi_i2c, "bmi_i2c was NULL");
- zassert_equal(accel0, bmi_i2c,
- "named_i2c_ports/accel0 and bmi_i2c should resolve to the same device");
-}
-
-/* test case main entry */
-void test_main(void)
-{
- ztest_test_suite(test_i2c_bindings,
- ztest_user_unit_test(test_i2c_get_device));
- ztest_run_test_suite(test_i2c_bindings);
-}
diff --git a/zephyr/test/i2c_dts/zmake.yaml b/zephyr/test/i2c_dts/zmake.yaml
deleted file mode 100644
index c3fca2272e..0000000000
--- a/zephyr/test/i2c_dts/zmake.yaml
+++ /dev/null
@@ -1,14 +0,0 @@
-# Copyright 2020 The Chromium OS Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-board: native_posix
-supported-zephyr-versions:
- - v2.6
-output-type: elf
-supported-toolchains:
- - llvm
- - host
-is-test: true
-dts-overlays:
- - overlay.dts