summaryrefslogtreecommitdiff
path: root/board/phaser/board.h
diff options
context:
space:
mode:
Diffstat (limited to 'board/phaser/board.h')
-rw-r--r--board/phaser/board.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/board/phaser/board.h b/board/phaser/board.h
index bcb8fcbe91..52ebeca133 100644
--- a/board/phaser/board.h
+++ b/board/phaser/board.h
@@ -21,6 +21,34 @@
#define CONFIG_STEINHART_HART_3V3_13K7_47K_4050B
#define CONFIG_STEINHART_HART_3V3_51K1_47K_4050B
+/* EC console commands */
+#define CONFIG_CMD_ACCELS
+#define CONFIG_CMD_ACCEL_INFO
+
+/* Sensors */
+#define CONFIG_ACCEL_LIS2DH /* Lid accel */
+#define CONFIG_ACCELGYRO_LSM6DSM /* Base accel */
+/* Sensors without hardware FIFO are in forced mode */
+#define CONFIG_ACCEL_FORCE_MODE_MASK (1 << LID_ACCEL)
+
+#define CONFIG_LID_ANGLE
+#define CONFIG_LID_ANGLE_SENSOR_BASE BASE_ACCEL
+#define CONFIG_LID_ANGLE_SENSOR_LID LID_ACCEL
+
+/* Interrupt and fifo are only used for base accelerometer
+ * and the lid sensor is polled real-time (in forced mode).
+ */
+#define CONFIG_ACCEL_INTERRUPTS
+/* FIFO size is in power of 2. */
+#define CONFIG_ACCEL_FIFO 1024
+
+/* Depends on how fast the AP boots and typical ODRs */
+#define CONFIG_ACCEL_FIFO_THRES (CONFIG_ACCEL_FIFO / 3)
+#define CONFIG_MKBP_EVENT
+#define CONFIG_MKBP_USE_HOST_EVENT
+
+#define CONFIG_ACCEL_LSM6DSM_INT_EVENT TASK_EVENT_CUSTOM(4)
+
#ifndef __ASSEMBLER__
#include "gpio_signal.h"
@@ -44,6 +72,14 @@ enum pwm_channel {
PWM_CH_COUNT
};
+/* Motion sensors */
+enum sensor_id {
+ LID_ACCEL,
+ BASE_ACCEL,
+ BASE_GYRO,
+ SENSOR_COUNT
+};
+
/* List of possible batteries */
enum battery_type {
BATTERY_PANASONIC,