diff options
author | Scott Collyer <scollyer@google.com> | 2019-02-11 17:50:35 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2019-02-27 13:43:43 -0800 |
commit | 62e6e0ac57958e976fd7575febe0c8d2926a39bf (patch) | |
tree | 5d26410a88228a2b9ebed15aacbae4d044ae4dd8 /baseboard | |
parent | a3c27b39fa69f280a3728a5cf24de57a5d3ccb0d (diff) | |
download | chrome-ec-62e6e0ac57958e976fd7575febe0c8d2926a39bf.tar.gz |
hatch: Add support for base accelgyro bmi160 sensor
This CL adds the motion_sensor_t table, config options, gpio interrupt
signal, and rotation matrix required for the bmi160 base accel/gyro
sensor.
BUG=b:124337208
BRANCH=none
TEST=Verfied with 'ectool motionsense' that sensor readings are
present and that values move in the expected direction as I rotated
the unit along it's X and Y axis. Also verified the gyro sensor
returns non-zero values when moving the system.
Change-Id: I57c323916662a4ee0b9aa3fc00c3a4bf18aaef40
Signed-off-by: Scott Collyer <scollyer@google.com>
Reviewed-on: https://chromium-review.googlesource.com/1464393
Commit-Ready: Scott Collyer <scollyer@chromium.org>
Tested-by: Scott Collyer <scollyer@chromium.org>
Tested-by: Zack Yang <zack_yang@compal.corp-partner.google.com>
Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Diffstat (limited to 'baseboard')
-rw-r--r-- | baseboard/hatch/baseboard.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/baseboard/hatch/baseboard.h b/baseboard/hatch/baseboard.h index e57b9a24e4..54edc83c9a 100644 --- a/baseboard/hatch/baseboard.h +++ b/baseboard/hatch/baseboard.h @@ -48,6 +48,26 @@ #define CONFIG_KEYBOARD_PROTOCOL_8042 #define CONFIG_KEYBOARD_PWRBTN_ASSERTS_KSI2 +/* Sensors */ +#define CONFIG_MKBP_EVENT +/* + * TODO(b/125933998): Remove this config and use EC_PCH_INT_L to signal AP + * instead. + */ +#define CONFIG_MKBP_USE_HOST_EVENT +#define CONFIG_DYNAMIC_MOTION_SENSOR_COUNT +/* I2C_PORT_ACCEL needs to be defined for i2c transactions */ +#define I2C_PORT_ACCEL I2C_PORT_SENSOR + +/* FIFO size is in power of 2. */ +#define CONFIG_ACCEL_FIFO 256 +/* Depends on how fast the AP boots and typical ODRs */ +#define CONFIG_ACCEL_FIFO_THRES (CONFIG_ACCEL_FIFO / 3) + +/* Sensor console commands */ +#define CONFIG_CMD_ACCELS +#define CONFIG_CMD_ACCEL_INFO + /* Common charger defines */ #define CONFIG_CHARGE_MANAGER #define CONFIG_CHARGE_RAMP_HW |