diff options
author | Yuval Peress <peress@chromium.org> | 2021-04-22 10:57:56 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-04-23 20:01:31 +0000 |
commit | 3ac4c27bad6a89074d81a7d6a747d00e9bed717e (patch) | |
tree | 6c915eef54127342a28fd1998821a5942ad7b3fe | |
parent | 4aaa85760faeec02f94b86b99d40768362d8c158 (diff) | |
download | chrome-ec-3ac4c27bad6a89074d81a7d6a747d00e9bed717e.tar.gz |
zephyr: lazor: Add kx022 sensor
Add the kx022 as an alternate sensor for the bma255. The logic for
swapping the sensors will come in future CLs associated with
b:183990188.
BRANCH=none
BUG=b:183990188, b:185966444
TEST=zmake testall
Signed-off-by: Yuval Peress <peress@chromium.org>
Change-Id: I681624034f63657dfcc0a352b31a0bbed61bd8db
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2846416
Reviewed-by: Keith Short <keithshort@chromium.org>
Commit-Queue: Keith Short <keithshort@chromium.org>
-rw-r--r-- | zephyr/projects/trogdor/lazor/motionsense.dts | 36 |
1 files changed, 33 insertions, 3 deletions
diff --git a/zephyr/projects/trogdor/lazor/motionsense.dts b/zephyr/projects/trogdor/lazor/motionsense.dts index 2dfee0969e..d8fc6123a8 100644 --- a/zephyr/projects/trogdor/lazor/motionsense.dts +++ b/zephyr/projects/trogdor/lazor/motionsense.dts @@ -25,8 +25,8 @@ */ motionsense-mutex { compatible = "cros-ec,motionsense-mutex"; - mutex_bma255: bma255-mutex { - label = "BMA255_MUTEX"; + lid_mutex: lid-mutex { + label = "LID_MUTEX"; }; mutex_bmi160: bmi160-mutex { @@ -69,6 +69,11 @@ compatible = "cros-ec,drvdata-bmi160"; status = "okay"; }; + + kx022_data: kx022-drv-data { + compatible = "cros-ec,drvdata-kionix"; + status = "okay"; + }; }; /* @@ -84,7 +89,7 @@ label = "Lid Accel"; active-mask = "SENSOR_ACTIVE_S0_S3_S5"; location = "MOTIONSENSE_LOC_LID"; - mutex = <&mutex_bma255>; + mutex = <&lid_mutex>; port = <&i2c_sensor>; rot-standard-ref = <&lid_rot_ref>; default-range = <2>; @@ -104,6 +109,31 @@ }; }; + alt_lid_accel { + compatible = "cros-ec,kx022"; + status = "okay"; + label = "Lid Accel"; + active-mask = "SENSOR_ACTIVE_S0_S3_S5"; + location = "MOTIONSENSE_LOC_LID"; + mutex = <&lid_mutex>; + port = <&i2c_sensor>; + rot-standard-ref = <&lid_rot_ref>; + drv-data = <&kx022_data>; + alternate-for = <&lid_accel>; + configs { + compatible = + "cros-ec,motionsense-sensor-config"; + ec-s0 { + label = "SENSOR_CONFIG_EC_S0"; + odr = <(10000 | ROUND_UP_FLAG)>; + }; + ec-s3 { + label = "SENSOR_CONFIG_EC_S3"; + odr = <(10000 | ROUND_UP_FLAG)>; + }; + }; + }; + base_accel: base-accel { compatible = "cros-ec,bmi160-accel"; status = "okay"; |