summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGwendal Grignou <gwendal@chromium.org>2019-12-08 02:02:00 -0800
committerCommit Bot <commit-bot@chromium.org>2021-10-12 15:09:59 +0000
commit270925bdc4b1287e1a0087f9ac797904234ef9db (patch)
treeaf1bc5b671a7ab13afdd18a48342e0bba9af6513
parent621b2b8500e1439b37f05533fa58739960299e24 (diff)
downloadchrome-ec-270925bdc4b1287e1a0087f9ac797904234ef9db.tar.gz
board: Set Accelerometer range to 4g
Required by Android CDD - Section 7.3.1 - Paragraph C.1.4 Modified mechanically with: for i in $(grep -lr "\.default_range" board); do sed -i '/.default_range =/s#\(.*\.default_range = \).* /\ \* g.*#\14, /* g, to meet CDD 7.3.1/C-1-4 reqs */#' $i done Manually reworked to only change the accelerometer that matters to android: The lid accelerometer or the base accelerometer if the base also hosts the gyroscope. This is only for future EC, no need to land the change on branches: mems_setup will take care to set accelerometer ranges at 4g on startup. BUG=b:144004449 BRANCH=none TEST=compile Conflicts: boards not in branch Change-Id: If8c14b2e928c9c70c0ce51451adcfcd674a9e73b Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1957375 Reviewed-by: Justin TerAvest <teravest@chromium.org> Reviewed-by: Alexandru M Stan <amstan@chromium.org> (cherry picked from commit 992810a77dd3698e69bcedd84f8259a08a753cb9) Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3193837 Tested-by: Rong Chang <rongchang@chromium.org> Auto-Submit: Rong Chang <rongchang@chromium.org> Commit-Queue: Rong Chang <rongchang@chromium.org>
-rw-r--r--board/akemi/board.c4
-rw-r--r--board/ampton/board.c4
-rw-r--r--board/arcada_ish/board.c10
-rw-r--r--board/bloog/board.c2
-rw-r--r--board/bobba/board.c4
-rw-r--r--board/cheza/board.c2
-rw-r--r--board/coral/board.c2
-rw-r--r--board/dood/board.c4
-rw-r--r--board/drallion_ish/board.c2
-rw-r--r--board/dratini/board.c4
-rw-r--r--board/elm/board.c4
-rw-r--r--board/eve/board.c4
-rw-r--r--board/flapjack/board.c2
-rw-r--r--board/fleex/board.c2
-rw-r--r--board/garg/board.c4
-rw-r--r--board/glados/board.c2
-rw-r--r--board/hatch/board.c4
-rw-r--r--board/helios/board.c4
-rw-r--r--board/kindred/board.c4
-rw-r--r--board/kodama/board.c2
-rw-r--r--board/kohaku/board.c4
-rw-r--r--board/kukui/board.c2
-rw-r--r--board/mchpevb1/board.c2
-rw-r--r--board/meep/board.c2
-rw-r--r--board/nami/board.c6
-rw-r--r--board/nautilus/board.c4
-rw-r--r--board/nocturne/board.c2
-rw-r--r--board/nucleo-f411re/board.c2
-rw-r--r--board/oak/board.c4
-rw-r--r--board/phaser/board.c2
-rw-r--r--board/poppy/board.c2
-rw-r--r--board/rainier/board.c2
-rw-r--r--board/rammus/board.c4
-rw-r--r--board/reef/board.c4
-rw-r--r--board/reef_mchp/board.c4
-rw-r--r--board/samus/board.c6
-rw-r--r--board/scarlet/board.c2
-rw-r--r--board/strago/board.c4
-rw-r--r--board/treeya/board.c4
-rw-r--r--board/yorp/board.c4
40 files changed, 70 insertions, 66 deletions
diff --git a/board/akemi/board.c b/board/akemi/board.c
index fee15acc87..806be06f4f 100644
--- a/board/akemi/board.c
+++ b/board/akemi/board.c
@@ -204,7 +204,7 @@ struct motion_sensor_t motion_sensors[] = {
.port = I2C_PORT_ACCEL,
.i2c_spi_addr_flags = LIS2DWL_ADDR1_FLAGS,
.rot_standard_ref = &lid_standard_ref,
- .default_range = 4, /* g */
+ .default_range = 2, /* g */
.min_frequency = LIS2DW12_ODR_MIN_VAL,
.max_frequency = LIS2DW12_ODR_MAX_VAL,
.config = {
@@ -234,7 +234,7 @@ struct motion_sensor_t motion_sensors[] = {
.port = I2C_PORT_ACCEL,
.i2c_spi_addr_flags = LSM6DSM_ADDR0_FLAGS,
.rot_standard_ref = &base_standard_ref,
- .default_range = 4, /* g */
+ .default_range = 4, /* g, to meet CDD 7.3.1/C-1-4 reqs */
.min_frequency = LSM6DSM_ODR_MIN_VAL,
.max_frequency = LSM6DSM_ODR_MAX_VAL,
.config = {
diff --git a/board/ampton/board.c b/board/ampton/board.c
index 588a1d5e58..9dfa1e1db8 100644
--- a/board/ampton/board.c
+++ b/board/ampton/board.c
@@ -190,7 +190,7 @@ struct motion_sensor_t motion_sensors[] = {
.port = I2C_PORT_SENSOR,
.i2c_spi_addr_flags = KX022_ADDR1_FLAGS,
.rot_standard_ref = &lid_standard_ref,
- .default_range = 4, /* g */
+ .default_range = 2, /* g */
.min_frequency = KX022_ACCEL_MIN_FREQ,
.max_frequency = KX022_ACCEL_MAX_FREQ,
.config = {
@@ -216,7 +216,7 @@ struct motion_sensor_t motion_sensors[] = {
.port = I2C_PORT_SENSOR,
.i2c_spi_addr_flags = BMI160_ADDR0_FLAGS,
.rot_standard_ref = &base_standard_ref,
- .default_range = 4, /* g */
+ .default_range = 4, /* g, to meet CDD 7.3.1/C-1-4 reqs */
.min_frequency = BMI160_ACCEL_MIN_FREQ,
.max_frequency = BMI160_ACCEL_MAX_FREQ,
.config = {
diff --git a/board/arcada_ish/board.c b/board/arcada_ish/board.c
index 8c96067be5..6563ae7eb6 100644
--- a/board/arcada_ish/board.c
+++ b/board/arcada_ish/board.c
@@ -65,7 +65,7 @@ struct motion_sensor_t motion_sensors[] = {
.port = I2C_PORT_SENSOR,
.i2c_spi_addr_flags = LSM6DSM_ADDR1_FLAGS,
.rot_standard_ref = &lid_rot_ref,
- .default_range = 4, /* g */
+ .default_range = 4, /* g, to meet CDD 7.3.1/C-1-4 reqs */
.min_frequency = LSM6DSM_ODR_MIN_VAL,
.max_frequency = LSM6DSM_ODR_MAX_VAL,
.config = {
@@ -112,8 +112,12 @@ struct motion_sensor_t motion_sensors[] = {
.port = I2C_PORT_SENSOR,
.i2c_spi_addr_flags = LNG2DM_ADDR0_FLAGS,
.rot_standard_ref = NULL, /* Identity matrix */
- /* We only use 2g because its resolution is only 8-bits */
- .default_range = 2, /* g */
+ /*
+ * We only use 2g because its resolution is only 8-bits.
+ * Beside, it is only used for lid angle calculation, where
+ * measure over 1.5g are dropped.
+ */
+ .default_range = 2, /* g */
.min_frequency = LIS2DH_ODR_MIN_VAL,
.max_frequency = LIS2DH_ODR_MAX_VAL,
.config = {
diff --git a/board/bloog/board.c b/board/bloog/board.c
index a17db4288c..87f022a15b 100644
--- a/board/bloog/board.c
+++ b/board/bloog/board.c
@@ -170,7 +170,7 @@ struct motion_sensor_t motion_sensors[] = {
.port = I2C_PORT_SENSOR,
.i2c_spi_addr_flags = LSM6DSM_ADDR0_FLAGS,
.rot_standard_ref = &base_standard_ref,
- .default_range = 2, /* g */
+ .default_range = 4, /* g, to meet CDD 7.3.1/C-1-4 reqs */
.min_frequency = LSM6DSM_ODR_MIN_VAL,
.max_frequency = LSM6DSM_ODR_MAX_VAL,
.config = {
diff --git a/board/bobba/board.c b/board/bobba/board.c
index 9bbedbcb07..a89f63681b 100644
--- a/board/bobba/board.c
+++ b/board/bobba/board.c
@@ -170,7 +170,7 @@ struct motion_sensor_t motion_sensors[] = {
.port = I2C_PORT_SENSOR,
.i2c_spi_addr_flags = KX022_ADDR1_FLAGS,
.rot_standard_ref = NULL, /* Identity matrix. */
- .default_range = 4, /* g */
+ .default_range = 2, /* g */
.min_frequency = KX022_ACCEL_MIN_FREQ,
.max_frequency = KX022_ACCEL_MAX_FREQ,
.config = {
@@ -196,7 +196,7 @@ struct motion_sensor_t motion_sensors[] = {
.port = I2C_PORT_SENSOR,
.i2c_spi_addr_flags = BMI160_ADDR0_FLAGS,
.rot_standard_ref = &base_standard_ref,
- .default_range = 4, /* g */
+ .default_range = 4, /* g, to meet CDD 7.3.1/C-1-4 reqs */
.min_frequency = BMI160_ACCEL_MIN_FREQ,
.max_frequency = BMI160_ACCEL_MAX_FREQ,
.config = {
diff --git a/board/cheza/board.c b/board/cheza/board.c
index 8fb927d436..1742b9d4a2 100644
--- a/board/cheza/board.c
+++ b/board/cheza/board.c
@@ -651,7 +651,7 @@ struct motion_sensor_t motion_sensors[] = {
.port = I2C_PORT_SENSOR,
.i2c_spi_addr_flags = BMI160_ADDR0_FLAGS,
.rot_standard_ref = &base_standard_ref,
- .default_range = 4, /* g */
+ .default_range = 4, /* g, to meet CDD 7.3.1/C-1-4 reqs */
.min_frequency = BMI160_ACCEL_MIN_FREQ,
.max_frequency = BMI160_ACCEL_MAX_FREQ,
.config = {
diff --git a/board/coral/board.c b/board/coral/board.c
index 5e359c4051..021343851c 100644
--- a/board/coral/board.c
+++ b/board/coral/board.c
@@ -752,7 +752,7 @@ struct motion_sensor_t motion_sensors[] = {
.port = I2C_PORT_GYRO,
.i2c_spi_addr_flags = BMI160_ADDR0_FLAGS,
.rot_standard_ref = &base_standard_ref,
- .default_range = 2, /* g, enough for laptop. */
+ .default_range = 4, /* g, to meet CDD 7.3.1/C-1-4 reqs */
.min_frequency = BMI160_ACCEL_MIN_FREQ,
.max_frequency = BMI160_ACCEL_MAX_FREQ,
.config = {
diff --git a/board/dood/board.c b/board/dood/board.c
index 5c64fc60b5..de51648b88 100644
--- a/board/dood/board.c
+++ b/board/dood/board.c
@@ -153,7 +153,7 @@ struct motion_sensor_t motion_sensors[] = {
.port = I2C_PORT_SENSOR,
.i2c_spi_addr_flags = KX022_ADDR1_FLAGS,
.rot_standard_ref = NULL, /* Identity matrix. */
- .default_range = 4, /* g */
+ .default_range = 2, /* g */
.min_frequency = KX022_ACCEL_MIN_FREQ,
.max_frequency = KX022_ACCEL_MAX_FREQ,
.config = {
@@ -179,7 +179,7 @@ struct motion_sensor_t motion_sensors[] = {
.port = I2C_PORT_SENSOR,
.i2c_spi_addr_flags = BMI160_ADDR0_FLAGS,
.rot_standard_ref = &base_standard_ref,
- .default_range = 4, /* g */
+ .default_range = 4, /* g, to meet CDD 7.3.1/C-1-4 reqs */
.min_frequency = BMI160_ACCEL_MIN_FREQ,
.max_frequency = BMI160_ACCEL_MAX_FREQ,
.config = {
diff --git a/board/drallion_ish/board.c b/board/drallion_ish/board.c
index 597cf6a9e5..92e1305df9 100644
--- a/board/drallion_ish/board.c
+++ b/board/drallion_ish/board.c
@@ -66,7 +66,7 @@ struct motion_sensor_t motion_sensors[] = {
.port = I2C_PORT_SENSOR,
.i2c_spi_addr_flags = LSM6DSM_ADDR0_FLAGS,
.rot_standard_ref = &lid_rot_ref,
- .default_range = 4, /* g */
+ .default_range = 4, /* g, to meet CDD 7.3.1/C-1-4 reqs */
.min_frequency = LSM6DSM_ODR_MIN_VAL,
.max_frequency = LSM6DSM_ODR_MAX_VAL,
.config = {
diff --git a/board/dratini/board.c b/board/dratini/board.c
index 2a8c73ed9e..7829ceec79 100644
--- a/board/dratini/board.c
+++ b/board/dratini/board.c
@@ -213,7 +213,7 @@ struct motion_sensor_t motion_sensors[] = {
.rot_standard_ref = &lid_standard_ref,
.min_frequency = BMA255_ACCEL_MIN_FREQ,
.max_frequency = BMA255_ACCEL_MAX_FREQ,
- .default_range = 2, /* g, to support tablet mode */
+ .default_range = 2, /* g, enough for lid angle calculation. */
.config = {
/* EC use accel for angle detection */
[SENSOR_CONFIG_EC_S0] = {
@@ -240,7 +240,7 @@ struct motion_sensor_t motion_sensors[] = {
.rot_standard_ref = &base_standard_ref,
.min_frequency = BMI160_ACCEL_MIN_FREQ,
.max_frequency = BMI160_ACCEL_MAX_FREQ,
- .default_range = 2, /* g, to support tablet mode */
+ .default_range = 4, /* g, to meet CDD 7.3.1/C-1-4 reqs */
.config = {
[SENSOR_CONFIG_EC_S0] = {
.odr = 10000 | ROUND_UP_FLAG,
diff --git a/board/elm/board.c b/board/elm/board.c
index 80cc6ff02f..1c54b71862 100644
--- a/board/elm/board.c
+++ b/board/elm/board.c
@@ -471,7 +471,7 @@ struct motion_sensor_t motion_sensors[] = {
.drv_data = &g_kx022_data[0],
.i2c_spi_addr_flags = SLAVE_MK_SPI_ADDR_FLAGS(0),
.rot_standard_ref = &base_standard_ref,
- .default_range = 2, /* g, enough for laptop. */
+ .default_range = 2, /* g, enough for lid angle calculation. */
.min_frequency = KX022_ACCEL_MIN_FREQ,
.max_frequency = KX022_ACCEL_MAX_FREQ,
.config = {
@@ -494,7 +494,7 @@ struct motion_sensor_t motion_sensors[] = {
.drv_data = &g_kx022_data[1],
.i2c_spi_addr_flags = SLAVE_MK_SPI_ADDR_FLAGS(1),
.rot_standard_ref = &lid_standard_ref,
- .default_range = 2, /* g, enough for laptop. */
+ .default_range = 4, /* g, to meet CDD 7.3.1/C-1-4 reqs */
.min_frequency = KX022_ACCEL_MIN_FREQ,
.max_frequency = KX022_ACCEL_MAX_FREQ,
.config = {
diff --git a/board/eve/board.c b/board/eve/board.c
index e58bca9efd..42ff73643f 100644
--- a/board/eve/board.c
+++ b/board/eve/board.c
@@ -817,7 +817,7 @@ struct motion_sensor_t motion_sensors[] = {
.port = I2C_PORT_LID_ACCEL,
.i2c_spi_addr_flags = KXCJ9_ADDR0_FLAGS,
.rot_standard_ref = &lid_standard_ref,
- .default_range = 2, /* g, enough for laptop. */
+ .default_range = 2, /* g, enough for lid angle calculation. */
.min_frequency = KXCJ9_ACCEL_MIN_FREQ,
.max_frequency = KXCJ9_ACCEL_MAX_FREQ,
.config = {
@@ -844,7 +844,7 @@ struct motion_sensor_t motion_sensors[] = {
.port = I2C_PORT_GYRO,
.i2c_spi_addr_flags = BMI160_ADDR0_FLAGS,
.rot_standard_ref = NULL,
- .default_range = 2, /* g, enough for laptop. */
+ .default_range = 4, /* g, to meet CDD 7.3.1/C-1-4 reqs */
.min_frequency = BMI160_ACCEL_MIN_FREQ,
.max_frequency = BMI160_ACCEL_MAX_FREQ,
.config = {
diff --git a/board/flapjack/board.c b/board/flapjack/board.c
index 4b8e7d2816..cb191c3578 100644
--- a/board/flapjack/board.c
+++ b/board/flapjack/board.c
@@ -528,7 +528,7 @@ struct motion_sensor_t motion_sensors[] = {
.port = I2C_PORT_ACCEL,
.i2c_spi_addr_flags = BMI160_ADDR0_FLAGS,
.rot_standard_ref = &lid_standard_ref,
- .default_range = 4, /* g */
+ .default_range = 4, /* g, to meet CDD 7.3.1/C-1-4 reqs */
.min_frequency = BMI160_ACCEL_MIN_FREQ,
.max_frequency = BMI160_ACCEL_MAX_FREQ,
.config = {
diff --git a/board/fleex/board.c b/board/fleex/board.c
index 7ee6495b86..ce193c90a5 100644
--- a/board/fleex/board.c
+++ b/board/fleex/board.c
@@ -166,7 +166,7 @@ struct motion_sensor_t motion_sensors[] = {
.port = I2C_PORT_SENSOR,
.i2c_spi_addr_flags = LSM6DSM_ADDR0_FLAGS,
.rot_standard_ref = &base_standard_ref,
- .default_range = 4, /* g */
+ .default_range = 4, /* g, to meet CDD 7.3.1/C-1-4 reqs */
.min_frequency = LSM6DSM_ODR_MIN_VAL,
.max_frequency = LSM6DSM_ODR_MAX_VAL,
.config = {
diff --git a/board/garg/board.c b/board/garg/board.c
index 66c065700d..7c997ba546 100644
--- a/board/garg/board.c
+++ b/board/garg/board.c
@@ -148,7 +148,7 @@ struct motion_sensor_t motion_sensors[] = {
.port = I2C_PORT_SENSOR,
.i2c_spi_addr_flags = KX022_ADDR1_FLAGS,
.rot_standard_ref = NULL, /* Identity matrix. */
- .default_range = 4, /* g */
+ .default_range = 2, /* g */
.min_frequency = KX022_ACCEL_MIN_FREQ,
.max_frequency = KX022_ACCEL_MAX_FREQ,
.config = {
@@ -174,7 +174,7 @@ struct motion_sensor_t motion_sensors[] = {
.port = I2C_PORT_SENSOR,
.i2c_spi_addr_flags = BMI160_ADDR0_FLAGS,
.rot_standard_ref = &base_standard_ref,
- .default_range = 4, /* g */
+ .default_range = 4, /* g, to meet CDD 7.3.1/C-1-4 reqs */
.min_frequency = BMI160_ACCEL_MIN_FREQ,
.max_frequency = BMI160_ACCEL_MAX_FREQ,
.config = {
diff --git a/board/glados/board.c b/board/glados/board.c
index 7a5a6247d2..8003e91906 100644
--- a/board/glados/board.c
+++ b/board/glados/board.c
@@ -460,7 +460,7 @@ struct motion_sensor_t motion_sensors[] = {
.port = I2C_PORT_ACCEL,
.addr = BMI160_ADDR0,
.rot_standard_ref = NULL, /* Identity matrix. */
- .default_range = 2, /* g, enough for laptop. */
+ .default_range = 4, /* g, to meet CDD 7.3.1/C-1-4 reqs */
.min_frequency = BMI160_ACCEL_MIN_FREQ,
.max_frequency = BMI160_ACCEL_MAX_FREQ,
.config = {
diff --git a/board/hatch/board.c b/board/hatch/board.c
index 3bbdbfd031..180dc1be96 100644
--- a/board/hatch/board.c
+++ b/board/hatch/board.c
@@ -251,7 +251,7 @@ struct motion_sensor_t motion_sensors[] = {
.rot_standard_ref = &lid_standard_ref,
.min_frequency = BMA255_ACCEL_MIN_FREQ,
.max_frequency = BMA255_ACCEL_MAX_FREQ,
- .default_range = 2, /* g, to support tablet mode */
+ .default_range = 2, /* g, to support lid angle calculation. */
.config = {
/* EC use accel for angle detection */
[SENSOR_CONFIG_EC_S0] = {
@@ -278,7 +278,7 @@ struct motion_sensor_t motion_sensors[] = {
.rot_standard_ref = &base_standard_ref,
.min_frequency = BMI160_ACCEL_MIN_FREQ,
.max_frequency = BMI160_ACCEL_MAX_FREQ,
- .default_range = 2, /* g, to support tablet mode */
+ .default_range = 4, /* g, to meet CDD 7.3.1/C-1-4 reqs */
.config = {
[SENSOR_CONFIG_EC_S0] = {
.odr = 10000 | ROUND_UP_FLAG,
diff --git a/board/helios/board.c b/board/helios/board.c
index 83b91ae521..472e19360d 100644
--- a/board/helios/board.c
+++ b/board/helios/board.c
@@ -224,7 +224,7 @@ struct motion_sensor_t motion_sensors[] = {
.rot_standard_ref = &lid_standard_ref,
.min_frequency = BMA255_ACCEL_MIN_FREQ,
.max_frequency = BMA255_ACCEL_MAX_FREQ,
- .default_range = 2, /* g, to support tablet mode */
+ .default_range = 2, /* g, to support lid angle calculation. */
.config = {
/* EC use accel for angle detection */
[SENSOR_CONFIG_EC_S0] = {
@@ -251,7 +251,7 @@ struct motion_sensor_t motion_sensors[] = {
.rot_standard_ref = &base_standard_ref,
.min_frequency = BMI160_ACCEL_MIN_FREQ,
.max_frequency = BMI160_ACCEL_MAX_FREQ,
- .default_range = 2, /* g, to support tablet mode */
+ .default_range = 4, /* g, to meet CDD 7.3.1/C-1-4 reqs */
.config = {
[SENSOR_CONFIG_EC_S0] = {
.odr = 10000 | ROUND_UP_FLAG,
diff --git a/board/kindred/board.c b/board/kindred/board.c
index 31689699e2..40038cc4b3 100644
--- a/board/kindred/board.c
+++ b/board/kindred/board.c
@@ -215,7 +215,7 @@ struct motion_sensor_t motion_sensors[] = {
.rot_standard_ref = &lid_standard_ref,
.min_frequency = BMA255_ACCEL_MIN_FREQ,
.max_frequency = BMA255_ACCEL_MAX_FREQ,
- .default_range = 2, /* g, to support tablet mode */
+ .default_range = 2, /* g, to support lid angle calculation. */
.config = {
/* EC use accel for angle detection */
[SENSOR_CONFIG_EC_S0] = {
@@ -242,7 +242,7 @@ struct motion_sensor_t motion_sensors[] = {
.rot_standard_ref = &base_standard_ref,
.min_frequency = BMI160_ACCEL_MIN_FREQ,
.max_frequency = BMI160_ACCEL_MAX_FREQ,
- .default_range = 2, /* g, to support tablet mode */
+ .default_range = 4, /* g, to meet CDD 7.3.1/C-1-4 reqs */
.config = {
[SENSOR_CONFIG_EC_S0] = {
.odr = 10000 | ROUND_UP_FLAG,
diff --git a/board/kodama/board.c b/board/kodama/board.c
index 4fa47eb6b1..c7aea72e72 100644
--- a/board/kodama/board.c
+++ b/board/kodama/board.c
@@ -327,7 +327,7 @@ struct motion_sensor_t motion_sensors[] = {
.port = I2C_PORT_ACCEL,
.i2c_spi_addr_flags = LSM6DSM_ADDR0_FLAGS,
.rot_standard_ref = &lid_standard_ref,
- .default_range = 4, /* g */
+ .default_range = 4, /* g, to meet CDD 7.3.1/C-1-4 reqs */
.min_frequency = LSM6DSM_ODR_MIN_VAL,
.max_frequency = LSM6DSM_ODR_MAX_VAL,
.config = {
diff --git a/board/kohaku/board.c b/board/kohaku/board.c
index b70d782e6d..2559abbec7 100644
--- a/board/kohaku/board.c
+++ b/board/kohaku/board.c
@@ -254,7 +254,7 @@ struct motion_sensor_t motion_sensors[] = {
.rot_standard_ref = &lid_standard_ref,
.min_frequency = BMA255_ACCEL_MIN_FREQ,
.max_frequency = BMA255_ACCEL_MAX_FREQ,
- .default_range = 2, /* g, to support tablet mode */
+ .default_range = 2, /* g, to support lid angle calculation. */
.config = {
/* EC use accel for angle detection */
[SENSOR_CONFIG_EC_S0] = {
@@ -281,7 +281,7 @@ struct motion_sensor_t motion_sensors[] = {
.rot_standard_ref = &base_standard_ref,
.min_frequency = BMI160_ACCEL_MIN_FREQ,
.max_frequency = BMI160_ACCEL_MAX_FREQ,
- .default_range = 2, /* g, to support tablet mode */
+ .default_range = 4, /* g, to meet CDD 7.3.1/C-1-4 reqs */
.config = {
[SENSOR_CONFIG_EC_S0] = {
.odr = 10000 | ROUND_UP_FLAG,
diff --git a/board/kukui/board.c b/board/kukui/board.c
index 45b6ebfc4e..5ea20a376b 100644
--- a/board/kukui/board.c
+++ b/board/kukui/board.c
@@ -448,7 +448,7 @@ struct motion_sensor_t motion_sensors[] = {
.port = I2C_PORT_ACCEL,
.i2c_spi_addr_flags = BMI160_ADDR0_FLAGS,
.rot_standard_ref = &lid_standard_ref,
- .default_range = 4, /* g */
+ .default_range = 4, /* g, to meet CDD 7.3.1/C-1-4 reqs */
.min_frequency = BMI160_ACCEL_MIN_FREQ,
.max_frequency = BMI160_ACCEL_MAX_FREQ,
.config = {
diff --git a/board/mchpevb1/board.c b/board/mchpevb1/board.c
index 8ce5ea658d..d6532bd59e 100644
--- a/board/mchpevb1/board.c
+++ b/board/mchpevb1/board.c
@@ -934,7 +934,7 @@ struct motion_sensor_t motion_sensors[] = {
.i2c_spi_addr_flags = SLAVE_MK_SPI_ADDR_FLAGS(
CONFIG_SPI_ACCEL_PORT),
.rot_standard_ref = NULL, /* Identity matrix. */
- .default_range = 2, /* g, enough for laptop. */
+ .default_range = 4, /* g, to meet CDD 7.3.1/C-1-4 reqs */
.min_frequency = BMI160_ACCEL_MIN_FREQ,
.max_frequency = BMI160_ACCEL_MAX_FREQ,
.config = {
diff --git a/board/meep/board.c b/board/meep/board.c
index 6029a77ab7..999dfb6096 100644
--- a/board/meep/board.c
+++ b/board/meep/board.c
@@ -170,7 +170,7 @@ struct motion_sensor_t motion_sensors[] = {
.port = I2C_PORT_SENSOR,
.i2c_spi_addr_flags = LSM6DSM_ADDR0_FLAGS,
.rot_standard_ref = &base_standard_ref,
- .default_range = 2, /* g */
+ .default_range = 4, /* g, to meet CDD 7.3.1/C-1-4 reqs */
.min_frequency = LSM6DSM_ODR_MIN_VAL,
.max_frequency = LSM6DSM_ODR_MAX_VAL,
.config = {
diff --git a/board/nami/board.c b/board/nami/board.c
index 24e9311acb..f9fb3e3b33 100644
--- a/board/nami/board.c
+++ b/board/nami/board.c
@@ -755,7 +755,7 @@ const struct motion_sensor_t lid_accel_1 = {
.rot_standard_ref = &rotation_x180_z90,
.min_frequency = KX022_ACCEL_MIN_FREQ,
.max_frequency = KX022_ACCEL_MAX_FREQ,
- .default_range = 2, /* g, to support tablet mode */
+ .default_range = 2, /* g, to support lid angle calculation. */
.config = {
/* EC use accel for angle detection */
[SENSOR_CONFIG_EC_S0] = {
@@ -783,7 +783,7 @@ struct motion_sensor_t motion_sensors[] = {
.rot_standard_ref = &lid_standard_ref,
.min_frequency = BMA255_ACCEL_MIN_FREQ,
.max_frequency = BMA255_ACCEL_MAX_FREQ,
- .default_range = 2, /* g, to support tablet mode */
+ .default_range = 2, /* g, to support lid angle calculation. */
.config = {
/* EC use accel for angle detection */
[SENSOR_CONFIG_EC_S0] = {
@@ -811,7 +811,7 @@ struct motion_sensor_t motion_sensors[] = {
.rot_standard_ref = &base_standard_ref,
.min_frequency = BMI160_ACCEL_MIN_FREQ,
.max_frequency = BMI160_ACCEL_MAX_FREQ,
- .default_range = 2, /* g, to support tablet mode */
+ .default_range = 4, /* g, to meet CDD 7.3.1/C-1-4 reqs */
.config = {
/* EC use accel for angle detection */
[SENSOR_CONFIG_EC_S0] = {
diff --git a/board/nautilus/board.c b/board/nautilus/board.c
index c305d67250..854d590202 100644
--- a/board/nautilus/board.c
+++ b/board/nautilus/board.c
@@ -616,7 +616,7 @@ struct motion_sensor_t motion_sensors[] = {
.rot_standard_ref = &lid_standard_ref,
.min_frequency = BMA255_ACCEL_MIN_FREQ,
.max_frequency = BMA255_ACCEL_MAX_FREQ,
- .default_range = 2, /* g, to support tablet mode */
+ .default_range = 2, /* g, to support lid angle calculation. */
.config = {
/* EC use accel for angle detection */
[SENSOR_CONFIG_EC_S0] = {
@@ -642,7 +642,7 @@ struct motion_sensor_t motion_sensors[] = {
.rot_standard_ref = &base_standard_ref,
.min_frequency = BMI160_ACCEL_MIN_FREQ,
.max_frequency = BMI160_ACCEL_MAX_FREQ,
- .default_range = 2, /* g, to support tablet mode */
+ .default_range = 4, /* g, to meet CDD 7.3.1/C-1-4 reqs */
.config = {
/* EC use accel for angle detection */
[SENSOR_CONFIG_EC_S0] = {
diff --git a/board/nocturne/board.c b/board/nocturne/board.c
index f97fc83945..5b785e209b 100644
--- a/board/nocturne/board.c
+++ b/board/nocturne/board.c
@@ -192,7 +192,7 @@ struct motion_sensor_t motion_sensors[] = {
.port = I2C_PORT_ALS_GYRO,
.i2c_spi_addr_flags = BMI160_ADDR0_FLAGS,
.rot_standard_ref = &lid_standard_ref,
- .default_range = 4, /* g */
+ .default_range = 4, /* g, to meet CDD 7.3.1/C-1-4 reqs */
.min_frequency = BMI160_ACCEL_MIN_FREQ,
.max_frequency = BMI160_ACCEL_MAX_FREQ,
.config = {
diff --git a/board/nucleo-f411re/board.c b/board/nucleo-f411re/board.c
index d5a4a67a40..b203ea4884 100644
--- a/board/nucleo-f411re/board.c
+++ b/board/nucleo-f411re/board.c
@@ -76,7 +76,7 @@ struct motion_sensor_t motion_sensors[] = {
.drv_data = &g_bmi160_data,
.port = I2C_PORT_ACCEL,
.i2c_spi_addr_flags = BMI160_ADDR0_FLAGS,
- .default_range = 2, /* g, enough for laptop. */
+ .default_range = 4, /* g, to meet CDD 7.3.1/C-1-4 reqs */
.min_frequency = BMI160_ACCEL_MIN_FREQ,
.max_frequency = BMI160_ACCEL_MAX_FREQ,
.config = {
diff --git a/board/oak/board.c b/board/oak/board.c
index 3cd77454f1..e7b0653907 100644
--- a/board/oak/board.c
+++ b/board/oak/board.c
@@ -649,7 +649,7 @@ struct motion_sensor_t motion_sensors[] = {
.port = I2C_PORT_ACCEL,
.i2c_spi_addr_flags = SLAVE_MK_SPI_ADDR_FLAGS(0),
.rot_standard_ref = &base_standard_ref,
- .default_range = 2, /* g, enough for laptop. */
+ .default_range = 4, /* g, to meet CDD 7.3.1/C-1-4 reqs */
.min_frequency = BMI160_ACCEL_MIN_FREQ,
.max_frequency = BMI160_ACCEL_MAX_FREQ,
.config = {
@@ -691,7 +691,7 @@ struct motion_sensor_t motion_sensors[] = {
.port = I2C_PORT_ACCEL,
.i2c_spi_addr_flags = KX022_ADDR1_FLAGS,
.rot_standard_ref = NULL, /* Identity matrix. */
- .default_range = 2, /* g, enough for laptop. */
+ .default_range = 2, /* g, to support lid angle calculation. */
.min_frequency = KX022_ACCEL_MIN_FREQ,
.max_frequency = KX022_ACCEL_MAX_FREQ,
.config = {
diff --git a/board/phaser/board.c b/board/phaser/board.c
index 009bbfb25a..30572a335b 100644
--- a/board/phaser/board.c
+++ b/board/phaser/board.c
@@ -153,7 +153,7 @@ struct motion_sensor_t motion_sensors[] = {
.port = I2C_PORT_SENSOR,
.i2c_spi_addr_flags = LSM6DSM_ADDR0_FLAGS,
.rot_standard_ref = &standard_rot_ref,
- .default_range = 4, /* g */
+ .default_range = 4, /* g, to meet CDD 7.3.1/C-1-4 reqs */
.min_frequency = LSM6DSM_ODR_MIN_VAL,
.max_frequency = LSM6DSM_ODR_MAX_VAL,
.config = {
diff --git a/board/poppy/board.c b/board/poppy/board.c
index f99b06fbf9..9faf9575b6 100644
--- a/board/poppy/board.c
+++ b/board/poppy/board.c
@@ -754,7 +754,7 @@ struct motion_sensor_t motion_sensors[] = {
.port = I2C_PORT_GYRO,
.i2c_spi_addr_flags = BMI160_ADDR0_FLAGS,
.rot_standard_ref = &lid_standard_ref,
- .default_range = 2, /* g, enough for laptop. */
+ .default_range = 4, /* g, to meet CDD 7.3.1/C-1-4 reqs */
.min_frequency = BMI160_ACCEL_MIN_FREQ,
.max_frequency = BMI160_ACCEL_MAX_FREQ,
.config = {
diff --git a/board/rainier/board.c b/board/rainier/board.c
index 4caefa94fb..99751de860 100644
--- a/board/rainier/board.c
+++ b/board/rainier/board.c
@@ -379,7 +379,7 @@ struct motion_sensor_t motion_sensors[] = {
.port = CONFIG_SPI_ACCEL_PORT,
.i2c_spi_addr_flags = SLAVE_MK_SPI_ADDR_FLAGS(CONFIG_SPI_ACCEL_PORT),
.rot_standard_ref = &base_standard_ref,
- .default_range = 2, /* g, enough for laptop. */
+ .default_range = 4, /* g, to meet CDD 7.3.1/C-1-4 reqs */
.min_frequency = BMI160_ACCEL_MIN_FREQ,
.max_frequency = BMI160_ACCEL_MAX_FREQ,
.config = {
diff --git a/board/rammus/board.c b/board/rammus/board.c
index a854416dda..5782ab4943 100644
--- a/board/rammus/board.c
+++ b/board/rammus/board.c
@@ -607,7 +607,7 @@ struct motion_sensor_t motion_sensors[] = {
.rot_standard_ref = &lid_standard_ref,
.min_frequency = BMA255_ACCEL_MIN_FREQ,
.max_frequency = BMA255_ACCEL_MAX_FREQ,
- .default_range = 2, /* g, to support tablet mode */
+ .default_range = 2, /* g, to support lid angle calculation. */
.config = {
/* EC use accel for angle detection */
[SENSOR_CONFIG_EC_S0] = {
@@ -635,7 +635,7 @@ struct motion_sensor_t motion_sensors[] = {
.rot_standard_ref = &base_standard_ref,
.min_frequency = BMI160_ACCEL_MIN_FREQ,
.max_frequency = BMI160_ACCEL_MAX_FREQ,
- .default_range = 2, /* g, to support tablet mode */
+ .default_range = 4, /* g, to meet CDD 7.3.1/C-1-4 reqs */
.config = {
/* EC use accel for angle detection */
[SENSOR_CONFIG_EC_S0] = {
diff --git a/board/reef/board.c b/board/reef/board.c
index 8754d17bd0..10516d6e62 100644
--- a/board/reef/board.c
+++ b/board/reef/board.c
@@ -717,7 +717,7 @@ struct motion_sensor_t motion_sensors[] = {
.port = I2C_PORT_LID_ACCEL,
.i2c_spi_addr_flags = KX022_ADDR1_FLAGS,
.rot_standard_ref = NULL, /* Identity matrix. */
- .default_range = 2, /* g, enough for laptop. */
+ .default_range = 2, /* g, to support lid angle calculation. */
.min_frequency = KX022_ACCEL_MIN_FREQ,
.max_frequency = KX022_ACCEL_MAX_FREQ,
.config = {
@@ -744,7 +744,7 @@ struct motion_sensor_t motion_sensors[] = {
.port = I2C_PORT_GYRO,
.i2c_spi_addr_flags = BMI160_ADDR0_FLAGS,
.rot_standard_ref = &base_standard_ref,
- .default_range = 2, /* g, enough for laptop. */
+ .default_range = 4, /* g, to meet CDD 7.3.1/C-1-4 reqs */
.min_frequency = BMI160_ACCEL_MIN_FREQ,
.max_frequency = BMI160_ACCEL_MAX_FREQ,
.config = {
diff --git a/board/reef_mchp/board.c b/board/reef_mchp/board.c
index 769f96197b..d020d407bc 100644
--- a/board/reef_mchp/board.c
+++ b/board/reef_mchp/board.c
@@ -963,7 +963,7 @@ struct motion_sensor_t motion_sensors[] = {
.port = I2C_PORT_LID_ACCEL,
.i2c_spi_addr_flags = KX022_ADDR1_FLAGS,
.rot_standard_ref = NULL, /* Identity matrix. */
- .default_range = 2, /* g, enough for laptop. */
+ .default_range = 2, /* g, to support lid angle calculation. */
.min_frequency = KX022_ACCEL_MIN_FREQ,
.max_frequency = KX022_ACCEL_MAX_FREQ,
.config = {
@@ -990,7 +990,7 @@ struct motion_sensor_t motion_sensors[] = {
.port = I2C_PORT_GYRO,
.i2c_spi_addr_flags = BMI160_ADDR0_FLAGS,
.rot_standard_ref = &base_standard_ref,
- .default_range = 2, /* g, enough for laptop. */
+ .default_range = 4, /* g, to meet CDD 7.3.1/C-1-4 reqs */
.min_frequency = BMI160_ACCEL_MIN_FREQ,
.max_frequency = BMI160_ACCEL_MAX_FREQ,
.config = {
diff --git a/board/samus/board.c b/board/samus/board.c
index a7ec373d62..062ad17ef3 100644
--- a/board/samus/board.c
+++ b/board/samus/board.c
@@ -334,7 +334,7 @@ struct motion_sensor_t motion_sensors[] = {
.port = I2C_PORT_ACCEL,
.i2c_spi_addr_flags = LSM6DS0_ADDR1_FLAGS,
.rot_standard_ref = &base_standard_ref,
- .default_range = 2, /* g, enough for laptop. */
+ .default_range = 4, /* g, to meet CDD 7.3.1/C-1-4 reqs */
.min_frequency = LSM6DS0_ACCEL_MIN_FREQ,
.max_frequency = LSM6DS0_ACCEL_MAX_FREQ,
.config = {
@@ -366,7 +366,7 @@ struct motion_sensor_t motion_sensors[] = {
.port = I2C_PORT_ACCEL,
.i2c_spi_addr_flags = KXCJ9_ADDR0_FLAGS,
.rot_standard_ref = &lid_standard_ref,
- .default_range = 2, /* g, enough for laptop. */
+ .default_range = 2, /* g, to support lid angle calculation. */
.min_frequency = KXCJ9_ACCEL_MIN_FREQ,
.max_frequency = KXCJ9_ACCEL_MAX_FREQ,
.config = {
@@ -389,7 +389,7 @@ struct motion_sensor_t motion_sensors[] = {
.port = I2C_PORT_ACCEL,
.i2c_spi_addr_flags = LSM6DS0_ADDR1_FLAGS,
.rot_standard_ref = NULL,
- .default_range = 2000, /* g, enough for laptop. */
+ .default_range = 2000, /* dps, enough for laptop. */
.min_frequency = LSM6DS0_GYRO_MIN_FREQ,
.max_frequency = LSM6DS0_GYRO_MAX_FREQ,
},
diff --git a/board/scarlet/board.c b/board/scarlet/board.c
index 4321d53179..aece3503ae 100644
--- a/board/scarlet/board.c
+++ b/board/scarlet/board.c
@@ -403,7 +403,7 @@ struct motion_sensor_t motion_sensors[] = {
.port = CONFIG_SPI_ACCEL_PORT,
.i2c_spi_addr_flags = SLAVE_MK_SPI_ADDR_FLAGS(CONFIG_SPI_ACCEL_PORT),
.rot_standard_ref = &base_standard_ref,
- .default_range = 4, /* g */
+ .default_range = 4, /* g, to meet CDD 7.3.1/C-1-4 reqs */
.min_frequency = BMI160_ACCEL_MIN_FREQ,
.max_frequency = BMI160_ACCEL_MAX_FREQ,
.config = {
diff --git a/board/strago/board.c b/board/strago/board.c
index 03c4c814be..d96f09834f 100644
--- a/board/strago/board.c
+++ b/board/strago/board.c
@@ -215,7 +215,7 @@ struct motion_sensor_t motion_sensors[] = {
.port = I2C_PORT_ACCEL,
.i2c_spi_addr_flags = KXCJ9_ADDR1_FLAGS,
.rot_standard_ref = &base_standard_ref,
- .default_range = 2, /* g, enough for laptop. */
+ .default_range = 2, /* g, to support lid angle calculation. */
.min_frequency = KXCJ9_ACCEL_MIN_FREQ,
.max_frequency = KXCJ9_ACCEL_MAX_FREQ,
.config = {
@@ -238,7 +238,7 @@ struct motion_sensor_t motion_sensors[] = {
.port = I2C_PORT_ACCEL,
.i2c_spi_addr_flags = KXCJ9_ADDR0_FLAGS,
.rot_standard_ref = &lid_standard_ref,
- .default_range = 2, /* g, enough for laptop. */
+ .default_range = 4, /* g, to meet CDD 7.3.1/C-1-4 reqs */
.min_frequency = KXCJ9_ACCEL_MIN_FREQ,
.max_frequency = KXCJ9_ACCEL_MAX_FREQ,
.config = {
diff --git a/board/treeya/board.c b/board/treeya/board.c
index 16816e5068..cf96579ac9 100644
--- a/board/treeya/board.c
+++ b/board/treeya/board.c
@@ -83,7 +83,7 @@ struct motion_sensor_t lid_accel_1 = {
.port = I2C_PORT_ACCEL,
.i2c_spi_addr_flags = LIS2DWL_ADDR1_FLAGS,
.rot_standard_ref = &lis2dwl_lid_standard_ref,
- .default_range = 4, /* g */
+ .default_range = 2, /* g */
.min_frequency = LIS2DW12_ODR_MIN_VAL,
.max_frequency = LIS2DW12_ODR_MAX_VAL,
.config = {
@@ -113,7 +113,7 @@ struct motion_sensor_t base_accel_1 = {
.port = I2C_PORT_ACCEL,
.i2c_spi_addr_flags = LSM6DSM_ADDR0_FLAGS,
.rot_standard_ref = &lsm6dsm_base_standard_ref,
- .default_range = 4, /* g */
+ .default_range = 4, /* g, to meet CDD 7.3.1/C-1-4 reqs */
.min_frequency = LSM6DSM_ODR_MIN_VAL,
.max_frequency = LSM6DSM_ODR_MAX_VAL,
.config = {
diff --git a/board/yorp/board.c b/board/yorp/board.c
index fefebe3f07..b066e451e2 100644
--- a/board/yorp/board.c
+++ b/board/yorp/board.c
@@ -121,7 +121,7 @@ struct motion_sensor_t motion_sensors[] = {
.port = I2C_PORT_SENSOR,
.i2c_spi_addr_flags = KX022_ADDR1_FLAGS,
.rot_standard_ref = NULL, /* Identity matrix. */
- .default_range = 4, /* g */
+ .default_range = 2, /* g */
.min_frequency = KX022_ACCEL_MIN_FREQ,
.max_frequency = KX022_ACCEL_MAX_FREQ,
.config = {
@@ -151,7 +151,7 @@ struct motion_sensor_t motion_sensors[] = {
.port = I2C_PORT_SENSOR,
.i2c_spi_addr_flags = LSM6DSM_ADDR0_FLAGS,
.rot_standard_ref = &base_standard_ref,
- .default_range = 4, /* g */
+ .default_range = 4, /* g, to meet CDD 7.3.1/C-1-4 reqs */
.min_frequency = LSM6DSM_ODR_MIN_VAL,
.max_frequency = LSM6DSM_ODR_MAX_VAL,
.config = {