diff options
author | Tomasz Michalec <tm@semihalf.com> | 2021-06-22 11:09:31 +0200 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-07-14 21:24:50 +0000 |
commit | 3d41adc1d1d13a76b68f7927caa37315ed90977e (patch) | |
tree | ec679e13f5ec35281fea6e852fa38783ccc5fbad /zephyr/dts | |
parent | 58e9704c8f823bebbf2ae426567dd95a8eef6d50 (diff) | |
download | chrome-ec-3d41adc1d1d13a76b68f7927caa37315ed90977e.tar.gz |
zephyr: Add BMI160 emulator
Add BMI emulator which is emulated device on i2c bus. Emulated
accelerometer and gyroscope properties are defined through device tree,
but they can be changed in runtime through BMI emulator API. It allows
to set custom handlers for write and read messages to emulate more
complex scenarios or malfunctioning device.
BMI emulator is designed to implement support for different BMI models
as an extension to common emulator code.
BUG=b:184856157
BRANCH=none
TEST=none
Signed-off-by: Tomasz Michalec <tm@semihalf.com>
Change-Id: I63e9d3aca98c8923372437f7a66257a4c82817f2
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2977559
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
Diffstat (limited to 'zephyr/dts')
-rw-r--r-- | zephyr/dts/bindings/emul/zephyr,bmi.yaml | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/zephyr/dts/bindings/emul/zephyr,bmi.yaml b/zephyr/dts/bindings/emul/zephyr,bmi.yaml new file mode 100644 index 0000000000..0067407e61 --- /dev/null +++ b/zephyr/dts/bindings/emul/zephyr,bmi.yaml @@ -0,0 +1,41 @@ +# 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: Zephyr BMI Emulator + +compatible: "zephyr,bmi" + +include: base.yaml + +properties: + device-model: + type: string + required: true + enum: + - BMI_EMUL_160 + description: Model of device that is emulated. + + error-on-ro-write: + type: boolean + description: + Flag indicating if error should be generated when read only register + is being written. + + error-on-wo-read: + type: boolean + description: + Flag indicating if error should be generated when write only register + is being read. + + error-on-reserved-bit-write: + type: boolean + description: + Flag indicating if error should be generated when reserved bit + is being written. + + simulate-command-exec-time: + type: boolean + description: + Flag indicating if emulator should wait the same amount of time before + finishing command as real device would. |