diff options
author | Yu-An Chen <yu-an.chen@quanta.corp-partner.google.com> | 2022-09-15 15:43:45 +0800 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-09-20 02:08:21 +0000 |
commit | c40c77f75b68a4ec12d4092575bb741c07b27a59 (patch) | |
tree | b0de2f633430e3436e6f6ae39beeb1aae88137be | |
parent | 7c2fa195590a1e496fe97ac10cc545138a66699c (diff) | |
download | chrome-ec-c40c77f75b68a4ec12d4092575bb741c07b27a59.tar.gz |
evoker: Remove TCS3400 Light sensor
Remove TCS3400 Light sensor
BUG=b:238571776
BRANCH=none
TEST=zmake build evoker
Signed-off-by: Yu-An Chen <yu-an.chen@quanta.corp-partner.google.com>
Change-Id: Ibe307307bc331373b9f469f7d2430098db6fdf30
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3897920
Commit-Queue: Sam Hurst <shurst@google.com>
Reviewed-by: Sam Hurst <shurst@google.com>
-rw-r--r-- | zephyr/projects/herobrine/BUILD.py | 2 | ||||
-rw-r--r-- | zephyr/projects/herobrine/motionsense_evoker.dts | 148 | ||||
-rw-r--r-- | zephyr/projects/herobrine/prj_evoker.conf | 7 |
3 files changed, 149 insertions, 8 deletions
diff --git a/zephyr/projects/herobrine/BUILD.py b/zephyr/projects/herobrine/BUILD.py index 01f51bd73c..b8bbdb0ce7 100644 --- a/zephyr/projects/herobrine/BUILD.py +++ b/zephyr/projects/herobrine/BUILD.py @@ -40,7 +40,7 @@ register_variant( here / "i2c_evoker.dts", here / "led_pins_evoker.dts", here / "led_policy_evoker.dts", - here / "motionsense.dts", + here / "motionsense_evoker.dts", here / "switchcap.dts", here / "usbc_evoker.dts", ], diff --git a/zephyr/projects/herobrine/motionsense_evoker.dts b/zephyr/projects/herobrine/motionsense_evoker.dts new file mode 100644 index 0000000000..8d6eaf6cc9 --- /dev/null +++ b/zephyr/projects/herobrine/motionsense_evoker.dts @@ -0,0 +1,148 @@ +/* Copyright 2022 The ChromiumOS Authors + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#include <dt-bindings/motionsense/utils.h> + + +/ { + aliases { + /* + * motion sense's <>_INT_EVENT is handled + * by alias. Using the alias, each driver creates + * its own <>_INT_EVENT. + */ + bmi260-int = &base_accel; + }; + + /* + * Declare mutexes used by sensor drivers. + * A mutex node is used to create an instance of mutex_t. + * A mutex node is referenced by a sensor node if the + * corresponding sensor driver needs to use the + * instance of the mutex. + */ + motionsense-mutex { + compatible = "cros-ec,motionsense-mutex"; + lid_mutex: lid-mutex { + }; + + mutex_bmi260: bmi260-mutex { + }; + }; + + /* Rotation matrix used by drivers. */ + motionsense-rotation-ref { + compatible = "cros-ec,motionsense-rotation-ref"; + lid_rot_ref: lid-rotation-ref { + mat33 = <0 1 0 + 1 0 0 + 0 0 (-1)>; + }; + + base_rot_ref: base-rotation-ref { + mat33 = <1 0 0 + 0 (-1) 0 + 0 0 (-1)>; + }; + }; + + /* + * Driver specific data. A driver-specific data can be shared with + * different motion sensors while they are using the same driver. + * + * If a node's compatible starts with "cros-ec,accelgyro-", it is for + * a common structure defined in accelgyro.h. + * e.g) compatible = "cros-ec,accelgyro-als-drv-data" is for + * "struct als_drv_data_t" in accelgyro.h + */ + motionsense-sensor-data { + bma255_data: bma255-drv-data { + compatible = "cros-ec,drvdata-bma255"; + status = "okay"; + }; + + bmi260_data: bmi260-drv-data { + compatible = "cros-ec,drvdata-bmi260"; + status = "okay"; + }; + }; + + /* + * List of motion sensors that creates motion_sensors array. + * The nodelabel "lid_accel" and "base_accel" are used to indicate + * motion sensor IDs for lid angle calculation. + */ + motionsense-sensor { + lid_accel: lid-accel { + compatible = "cros-ec,bma255"; + status = "okay"; + + active-mask = "SENSOR_ACTIVE_S0_S3"; + location = "MOTIONSENSE_LOC_LID"; + mutex = <&lid_mutex>; + port = <&i2c_sensor>; + rot-standard-ref = <&lid_rot_ref>; + default-range = <2>; + drv-data = <&bma255_data>; + i2c-spi-addr-flags = "BMA2x2_I2C_ADDR1_FLAGS"; + configs { + compatible = + "cros-ec,motionsense-sensor-config"; + ec-s0 { + odr = <(10000 | ROUND_UP_FLAG)>; + }; + ec-s3 { + odr = <(10000 | ROUND_UP_FLAG)>; + }; + }; + }; + + base_accel: base-accel { + compatible = "cros-ec,bmi260-accel"; + status = "okay"; + + active-mask = "SENSOR_ACTIVE_S0_S3"; + location = "MOTIONSENSE_LOC_BASE"; + mutex = <&mutex_bmi260>; + port = <&i2c_sensor>; + rot-standard-ref = <&base_rot_ref>; + drv-data = <&bmi260_data>; + configs { + compatible = + "cros-ec,motionsense-sensor-config"; + ec-s0 { + odr = <(10000 | ROUND_UP_FLAG)>; + }; + ec-s3 { + odr = <(10000 | ROUND_UP_FLAG)>; + }; + }; + }; + + base-gyro { + compatible = "cros-ec,bmi260-gyro"; + status = "okay"; + + active-mask = "SENSOR_ACTIVE_S0_S3"; + location = "MOTIONSENSE_LOC_BASE"; + mutex = <&mutex_bmi260>; + port = <&i2c_sensor>; + rot-standard-ref = <&base_rot_ref>; + drv-data = <&bmi260_data>; + }; + }; + + motionsense-sensor-info { + compatible = "cros-ec,motionsense-sensor-info"; + + /* + * list of GPIO interrupts that have to + * be enabled at initial stage + */ + sensor-irqs = <&int_accel_gyro>; + /* list of sensors in force mode */ + accel-force-mode-sensors = <&lid_accel>; + }; +}; diff --git a/zephyr/projects/herobrine/prj_evoker.conf b/zephyr/projects/herobrine/prj_evoker.conf index 85c2f21af0..b26fdf8c62 100644 --- a/zephyr/projects/herobrine/prj_evoker.conf +++ b/zephyr/projects/herobrine/prj_evoker.conf @@ -5,12 +5,5 @@ # Evoker board-specific Kconfig settings. CONFIG_BOARD_EVOKER=y -# Sensors -CONFIG_PLATFORM_EC_ALS=y - -# Sensor Drivers -CONFIG_PLATFORM_EC_ALS_TCS3400=y -CONFIG_PLATFORM_EC_ALS_TCS3400_EMULATED_IRQ_EVENT=y - # Disable type-c port sourcing 3A CONFIG_PLATFORM_EC_CONFIG_USB_PD_3A_PORTS=0 |