summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWai-Hong Tam <waihong@google.com>2021-07-20 15:46:58 -0700
committerCommit Bot <commit-bot@chromium.org>2021-07-21 18:26:33 +0000
commit44ca1f290d976154b8b695d38d858a07fcf0e14b (patch)
treed873755c50c1e2288e2950ef9adb1f38565e343a
parentfc2016b6e2dcdee7706e14197ee373e10d761445 (diff)
downloadchrome-ec-44ca1f290d976154b8b695d38d858a07fcf0e14b.tar.gz
zephyr: herobrine: Switch to use BMI260 sensor driver
Switch the base accel/gyro sensor from BMI160 to BMI260. BRANCH=None BUG=b:194194887 TEST=Built the herobrine_npcx9 image successfully. Change-Id: I459e58a76acc9a5c986f08de711c0227adca63c3 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3042987 Reviewed-by: Yuval Peress <peress@chromium.org>
-rw-r--r--zephyr/projects/herobrine/herobrine_npcx9/include/gpio_map.h2
-rw-r--r--zephyr/projects/herobrine/herobrine_npcx9/motionsense.dts22
-rw-r--r--zephyr/projects/herobrine/herobrine_npcx9/prj.conf2
3 files changed, 13 insertions, 13 deletions
diff --git a/zephyr/projects/herobrine/herobrine_npcx9/include/gpio_map.h b/zephyr/projects/herobrine/herobrine_npcx9/include/gpio_map.h
index 931b886b22..f1a255399f 100644
--- a/zephyr/projects/herobrine/herobrine_npcx9/include/gpio_map.h
+++ b/zephyr/projects/herobrine/herobrine_npcx9/include/gpio_map.h
@@ -55,7 +55,7 @@
GPIO_INT(GPIO_USB_C1_BC12_INT_L, GPIO_INT_EDGE_FALLING, usb1_evt) \
GPIO_INT(GPIO_USB_A0_OC_ODL, GPIO_INT_EDGE_BOTH, usba_oc_interrupt) \
GPIO_INT(GPIO_ACCEL_GYRO_INT_L, GPIO_INT_EDGE_FALLING, \
- bmi160_interrupt) \
+ bmi260_interrupt) \
GPIO_INT(GPIO_TABLET_MODE_L, GPIO_INT_EDGE_BOTH, gmr_tablet_switch_isr)
#endif /* __ZEPHYR_GPIO_MAP_H */
diff --git a/zephyr/projects/herobrine/herobrine_npcx9/motionsense.dts b/zephyr/projects/herobrine/herobrine_npcx9/motionsense.dts
index 1f222c8f18..977c27bfc3 100644
--- a/zephyr/projects/herobrine/herobrine_npcx9/motionsense.dts
+++ b/zephyr/projects/herobrine/herobrine_npcx9/motionsense.dts
@@ -13,7 +13,7 @@
* by alias. Using the alias, each driver creates
* its own <>_INT_EVENT.
*/
- bmi160-int = &base_accel;
+ bmi260-int = &base_accel;
};
/*
@@ -29,8 +29,8 @@
label = "LID_MUTEX";
};
- mutex_bmi160: bmi160-mutex {
- label = "BMI160_MUTEX";
+ mutex_bmi260: bmi260-mutex {
+ label = "BMI260_MUTEX";
};
};
@@ -65,8 +65,8 @@
status = "okay";
};
- bmi160_data: bmi160-drv-data {
- compatible = "cros-ec,drvdata-bmi160";
+ bmi260_data: bmi260-drv-data {
+ compatible = "cros-ec,drvdata-bmi260";
status = "okay";
};
};
@@ -105,16 +105,16 @@
};
base_accel: base-accel {
- compatible = "cros-ec,bmi160-accel";
+ compatible = "cros-ec,bmi260-accel";
status = "okay";
label = "Base Accel";
active-mask = "SENSOR_ACTIVE_S0_S3";
location = "MOTIONSENSE_LOC_BASE";
- mutex = <&mutex_bmi160>;
+ mutex = <&mutex_bmi260>;
port = <&i2c_sensor>;
rot-standard-ref = <&base_rot_ref>;
- drv-data = <&bmi160_data>;
+ drv-data = <&bmi260_data>;
configs {
compatible =
"cros-ec,motionsense-sensor-config";
@@ -130,16 +130,16 @@
};
base-gyro {
- compatible = "cros-ec,bmi160-gyro";
+ compatible = "cros-ec,bmi260-gyro";
status = "okay";
label = "Base Gyro";
active-mask = "SENSOR_ACTIVE_S0_S3";
location = "MOTIONSENSE_LOC_BASE";
- mutex = <&mutex_bmi160>;
+ mutex = <&mutex_bmi260>;
port = <&i2c_sensor>;
rot-standard-ref = <&base_rot_ref>;
- drv-data = <&bmi160_data>;
+ drv-data = <&bmi260_data>;
};
};
diff --git a/zephyr/projects/herobrine/herobrine_npcx9/prj.conf b/zephyr/projects/herobrine/herobrine_npcx9/prj.conf
index f846733869..1ed0d5765e 100644
--- a/zephyr/projects/herobrine/herobrine_npcx9/prj.conf
+++ b/zephyr/projects/herobrine/herobrine_npcx9/prj.conf
@@ -141,7 +141,7 @@ CONFIG_PLATFORM_EC_TABLET_MODE_SWITCH=y
# Sensor Drivers
CONFIG_PLATFORM_EC_ACCEL_BMA255=y
-CONFIG_PLATFORM_EC_ACCELGYRO_BMI160=y
+CONFIG_PLATFORM_EC_ACCELGYRO_BMI260=y
CONFIG_PLATFORM_EC_ACCELGYRO_BMI_COMM_I2C=y
# Features should be enabled. But the code RAM is not enough, disable them.