diff options
author | Tomasz Michalec <tm@semihalf.com> | 2021-05-19 17:00:33 +0200 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-06-30 08:49:29 +0000 |
commit | 8f98839255b6bdccd21610454818b0d75e40414e (patch) | |
tree | d2035d34f7111e389caa00a8307521ac87289c0a /zephyr/dts/bindings/emul/zephyr,bma255.yaml | |
parent | 743590937b1a6029d69c8f392d7292030fd42c5b (diff) | |
download | chrome-ec-8f98839255b6bdccd21610454818b0d75e40414e.tar.gz |
zephyr: Add BMA255 emulator
Add BMA255 emulator which is emulated device on i2c bus. Emulated
accelerometer properties are defined through device tree, but they can
be changed in runtime through BMA255 emulator API. It allows to set
custom handlers for write and read messages to emulate more complex
scenarios or malfunctioning device.
BUG=b:184855546
BRANCH=none
TEST=none
Signed-off-by: Tomasz Michalec <tm@semihalf.com>
Change-Id: I4def7fcc54edbf9cb346fda0f21f647a5ad5f8d5
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2933301
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
Diffstat (limited to 'zephyr/dts/bindings/emul/zephyr,bma255.yaml')
-rw-r--r-- | zephyr/dts/bindings/emul/zephyr,bma255.yaml | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/zephyr/dts/bindings/emul/zephyr,bma255.yaml b/zephyr/dts/bindings/emul/zephyr,bma255.yaml new file mode 100644 index 0000000000..40750196c1 --- /dev/null +++ b/zephyr/dts/bindings/emul/zephyr,bma255.yaml @@ -0,0 +1,83 @@ +# 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 BMA255 Emulator + +compatible: "zephyr,bma255" + +include: base.yaml + +properties: + nvm-off-x: + type: int + required: false + default: 0 + description: Accelerometer offset of x axis stored in NVM. + + nvm-off-y: + type: int + required: false + default: 0 + description: Accelerometer offset of y axis stored in NVM. + + nvm-off-z: + type: int + required: false + default: 0 + description: Accelerometer offset of z axis stored in NVM. + + nvm-gp0: + type: int + required: false + default: 0 + description: GP0 value stored in NVM. + + nvm-gp1: + type: int + required: false + default: 0 + description: GP1 value stored in NVM. + + nvm-acc-x: + type: int + required: false + default: 0 + description: Accelerometer value of x axis used until new value is set. + + nvm-acc-y: + type: int + required: false + default: 0 + description: Accelerometer value of y axis used until new value is set. + + nvm-acc-z: + type: int + required: false + default: 0 + description: Accelerometer value of z axis used until new value is set. + + error-on-compensation-not-ready: + type: boolean + description: + Flag indicating if error should be generated when fast compensation + is started when not ready bit is set. + + error-on-ro-write: + type: boolean + description: + Flag indicating if error should be generated when read only register + is being written. + + error-on-reserved-bit-write: + type: boolean + description: + Flag indicating if error should be generated when reserved bit + is being written. + + error-on-msb-first-access: + type: boolean + description: + Flag indicating if error should be generated when MSB register of + accelerometer value is accessed before LSB and shadowing is enabled + at the same time. |