diff options
author | Ching-Kang Yen <chingkang@chromium.org> | 2020-03-31 19:37:17 +0800 |
---|---|---|
committer | Ching-Kang Yen <chingkang@chromium.org> | 2020-04-23 17:30:41 +0000 |
commit | 00b4226613aa84f9734a22e50acd4d7ede960cc1 (patch) | |
tree | 93934e49b0d533489df3eb3bdc0475807e6c0206 /include | |
parent | 557dafbacbc61cd4c5dec9f27ead4ea17b67aac6 (diff) | |
download | chrome-ec-00b4226613aa84f9734a22e50acd4d7ede960cc1.tar.gz |
driver: Add BMI260 basic driver support
Add BMI260 accel/gyro driver code. Be able to do initial configuration,
start up sensor, config interrupt and fifo, perform calibration, and
access the sensor data from AP.
BRANCH=None
BUG=b:146144827
TEST=make -j4 BOARD=volteer \
&& flash_ec --image build/volteer/ec.bin --board volteer
Then, check sensor data is available on DUT by "ectool motionsense".
TEST=make buildall -j
TEST=tast run ${IP} hardware.SensorRing
Cq-Depend: chromium:2148802
Change-Id: I5124ee8359a74f98cfe8d26da640325f5e00cb15
Signed-off-by: Ching-Kang Yen <chingkang@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2086534
Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/config.h | 3 | ||||
-rw-r--r-- | include/ec_commands.h | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/include/config.h b/include/config.h index 1ac15ed5fb..a0afe634e7 100644 --- a/include/config.h +++ b/include/config.h @@ -108,6 +108,7 @@ #undef CONFIG_ACCEL_LIS2DW_AS_BASE #undef CONFIG_ACCELGYRO_BMI160 +#undef CONFIG_ACCELGYRO_BMI260 #undef CONFIG_ACCELGYRO_LSM6DS0 /* Use CONFIG_ACCELGYRO_LSM6DSM for LSM6DSL, LSM6DSM, and/or LSM6DS3 */ #undef CONFIG_ACCELGYRO_LSM6DSM @@ -190,6 +191,7 @@ /* Set when INT2 is an output */ #undef CONFIG_ACCELGYRO_BMI160_INT2_OUTPUT +#undef CONFIG_ACCELGYRO_BMI260_INT2_OUTPUT /* Specify type of Gyrometers attached. */ #undef CONFIG_GYRO_L3GD20H @@ -310,6 +312,7 @@ * Must be within TASK_EVENT_MOTION_INTERRUPT_MASK. */ #undef CONFIG_ACCELGYRO_BMI160_INT_EVENT +#undef CONFIG_ACCELGYRO_BMI260_INT_EVENT #undef CONFIG_ACCEL_LSM6DSM_INT_EVENT #undef CONFIG_ACCEL_LSM6DSO_INT_EVENT #undef CONFIG_ACCEL_LIS2DS_INT_EVENT diff --git a/include/ec_commands.h b/include/ec_commands.h index ca8d3e5f29..2685a0db22 100644 --- a/include/ec_commands.h +++ b/include/ec_commands.h @@ -2582,6 +2582,7 @@ enum motionsensor_chip { MOTIONSENSE_CHIP_LIS2DW12 = 21, MOTIONSENSE_CHIP_LIS2DWL = 22, MOTIONSENSE_CHIP_LIS2DS = 23, + MOTIONSENSE_CHIP_BMI260 = 24, MOTIONSENSE_CHIP_MAX, }; |