summaryrefslogtreecommitdiff
path: root/zephyr/dts
diff options
context:
space:
mode:
authorHyungwoo Yang <hyungwoo.yang@intel.corp-partner.google.com>2021-03-19 23:37:43 -0700
committerCommit Bot <commit-bot@chromium.org>2021-03-24 02:10:53 +0000
commita0e46cd164efca0f48ecff3d1d2ffe10309e3fd4 (patch)
tree57dd6c2651c674ee563173635cb4aaeb5f8d9cc2 /zephyr/dts
parentd4ebcc156bc62d9b883882ddd7b3ad629b926803 (diff)
downloadchrome-ec-a0e46cd164efca0f48ecff3d1d2ffe10309e3fd4.tar.gz
zephyr: DT: support BMI260
This change is to support BMI260 via DT. The change includes, using DT, - creating BMI260 driver specific data - creating motion sensor entry for BMI260 - creating the BMI260 irq event to motion sense task BUG=b:173507858 BRANCH=none TEST=make buildall -j8 build volteer on zephyr Signed-off-by: Hyungwoo Yang <hyungwoo.yang@intel.corp-partner.google.com> Change-Id: Id5c64df4d2f14a50709ac15855567a67671b8515 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2778821 Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'zephyr/dts')
-rw-r--r--zephyr/dts/bindings/motionsense/driver/bmi260.yaml16
-rw-r--r--zephyr/dts/bindings/motionsense/driver/cros-ec,bmi260-accel.yaml9
-rw-r--r--zephyr/dts/bindings/motionsense/driver/cros-ec,bmi260-gyro.yaml9
-rw-r--r--zephyr/dts/bindings/motionsense/drvdata/cros-ec,drvdata-bmi260.yaml18
4 files changed, 52 insertions, 0 deletions
diff --git a/zephyr/dts/bindings/motionsense/driver/bmi260.yaml b/zephyr/dts/bindings/motionsense/driver/bmi260.yaml
new file mode 100644
index 0000000000..1f9c16a2d9
--- /dev/null
+++ b/zephyr/dts/bindings/motionsense/driver/bmi260.yaml
@@ -0,0 +1,16 @@
+# Copyright 2021 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.
+
+# common fields for both BMI260 accel and BMI260 gyro
+
+# every motionsense sensor node should include motionsense-sensor-base.yaml
+include: motionsense-sensor-base.yaml
+
+properties:
+ i2c-spi-addr-flags:
+ type: string
+ required: true
+ description: i2c address or SPI slave logic GPIO
+ enum:
+ - "BMI260_ADDR0_FLAGS"
diff --git a/zephyr/dts/bindings/motionsense/driver/cros-ec,bmi260-accel.yaml b/zephyr/dts/bindings/motionsense/driver/cros-ec,bmi260-accel.yaml
new file mode 100644
index 0000000000..09907d8711
--- /dev/null
+++ b/zephyr/dts/bindings/motionsense/driver/cros-ec,bmi260-accel.yaml
@@ -0,0 +1,9 @@
+# Copyright 2021 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.
+
+description: motion sense sensor node for BMI260 accel
+
+compatible: "cros-ec,bmi260-accel"
+
+include: bmi260.yaml
diff --git a/zephyr/dts/bindings/motionsense/driver/cros-ec,bmi260-gyro.yaml b/zephyr/dts/bindings/motionsense/driver/cros-ec,bmi260-gyro.yaml
new file mode 100644
index 0000000000..67da0c4085
--- /dev/null
+++ b/zephyr/dts/bindings/motionsense/driver/cros-ec,bmi260-gyro.yaml
@@ -0,0 +1,9 @@
+# Copyright 2021 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.
+
+description: motion sense sensor node for BMI260 gyro
+
+compatible: "cros-ec,bmi260-gyro"
+
+include: bmi260.yaml
diff --git a/zephyr/dts/bindings/motionsense/drvdata/cros-ec,drvdata-bmi260.yaml b/zephyr/dts/bindings/motionsense/drvdata/cros-ec,drvdata-bmi260.yaml
new file mode 100644
index 0000000000..4d414121d1
--- /dev/null
+++ b/zephyr/dts/bindings/motionsense/drvdata/cros-ec,drvdata-bmi260.yaml
@@ -0,0 +1,18 @@
+# Copyright 2021 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.
+
+description: BMI260 driver data node
+
+compatible: "cros-ec,drvdata-bmi260"
+
+include: drvdata-base.yaml
+
+#
+# examples:
+#
+# bmi260_data: bmi260-drv-data {
+# compatible = "cros-ec,drvdata-bmi260";
+# status = "okay";
+# };
+#