summaryrefslogtreecommitdiff
path: root/board/gimble/board.h
diff options
context:
space:
mode:
authorScott Chao <scott_chao@wistron.corp-partner.google.com>2021-06-30 20:06:07 +0800
committerCommit Bot <commit-bot@chromium.org>2021-07-02 02:31:58 +0000
commit0258161c11bf20414134d15d89aeb4ca25016c95 (patch)
tree9c848e6952c75d1f9067b3b8ca7991660fbbf462 /board/gimble/board.h
parent2ad2c6829f6fe11943f4c0e80eab1300512f2c4d (diff)
downloadchrome-ec-0258161c11bf20414134d15d89aeb4ca25016c95.tar.gz
gimble: add motion sense support
We have base BMI160 and lid BMA253 sensor. BUG=b:192423158 b:192477578 BRANCH=none TEST=make buildall Signed-off-by: Scott Chao <scott_chao@wistron.corp-partner.google.com> Change-Id: Iddd7e2de5e7809c419f7afb24ce2d3ad60ce78cb Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2996582 Tested-by: Will Tsai <will_tsai@wistron.corp-partner.google.com> Reviewed-by: Boris Mittelberg <bmbm@google.com>
Diffstat (limited to 'board/gimble/board.h')
-rw-r--r--board/gimble/board.h24
1 files changed, 9 insertions, 15 deletions
diff --git a/board/gimble/board.h b/board/gimble/board.h
index 4040e9269a..2965ddc6ae 100644
--- a/board/gimble/board.h
+++ b/board/gimble/board.h
@@ -37,16 +37,13 @@
#define CONFIG_LED_PWM_LOW_BATT_COLOR EC_LED_COLOR_AMBER
/* Sensors */
-#define CONFIG_ACCELGYRO_LSM6DSO /* Base accel */
-#define CONFIG_ACCEL_LSM6DSO_INT_EVENT \
- TASK_EVENT_MOTION_SENSOR_INTERRUPT(BASE_ACCEL)
+/* BMA253 accelerometer in lid */
+#define CONFIG_ACCEL_BMA255
-/* Enable sensor fifo, must also define the _SIZE and _THRES */
-#define CONFIG_ACCEL_FIFO
-/* FIFO size is in power of 2. */
-#define CONFIG_ACCEL_FIFO_SIZE 256
-/* Depends on how fast the AP boots and typical ODRs */
-#define CONFIG_ACCEL_FIFO_THRES (CONFIG_ACCEL_FIFO_SIZE / 3)
+#define CONFIG_ACCEL_INTERRUPTS
+#define CONFIG_ACCELGYRO_BMI160 /* Base accel/gyro */
+#define CONFIG_ACCELGYRO_BMI160_INT_EVENT \
+ TASK_EVENT_MOTION_SENSOR_INTERRUPT(BASE_ACCEL)
/* Sensors without hardware FIFO are in forced mode */
#define CONFIG_ACCEL_FORCE_MODE_MASK BIT(LID_ACCEL)
@@ -55,12 +52,6 @@
#define CONFIG_LID_ANGLE
#define CONFIG_LID_ANGLE_SENSOR_BASE BASE_ACCEL
#define CONFIG_LID_ANGLE_SENSOR_LID LID_ACCEL
-#define CONFIG_ACCEL_LIS2DWL
-#define CONFIG_ACCEL_LIS2DW_AS_BASE
-#define CONFIG_ACCEL_LIS2DW12_INT_EVENT \
- TASK_EVENT_MOTION_SENSOR_INTERRUPT(LID_ACCEL)
-
-#define CONFIG_ACCEL_INTERRUPTS
/* Sensor console commands */
#define CONFIG_CMD_ACCELS
@@ -152,6 +143,9 @@
#define I2C_PORT_EEPROM NPCX_I2C_PORT7_0
#define I2C_PORT_MP2964 NPCX_I2C_PORT7_0
+/* define this to aviod error on CONFIG_ACCELGYRO_BMI_COMM_I2C */
+#define I2C_PORT_ACCEL I2C_PORT_SENSOR
+
#define I2C_ADDR_EEPROM_FLAGS 0x50
#define I2C_ADDR_MP2964_FLAGS 0x20