diff options
author | Yuval Peress <peress@google.com> | 2023-03-14 21:57:45 -0600 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2023-03-17 18:05:59 +0000 |
commit | 0f16592f7f7e1313236738eae10a9de62015a204 (patch) | |
tree | c3dda11560381478a19ee154080295b143e3426f | |
parent | 99b0d860a9ed64693f8e59f66b71d290ab81f785 (diff) | |
download | chrome-ec-0f16592f7f7e1313236738eae10a9de62015a204.tar.gz |
rex: add rex-sans-sensors variant
Add a new variant on top of Rex that disables the motionsense task,
sensor configs, and respective DTS nodes.
BRANCH=none
BUG=b:272529568,b:273308069
TEST=zmake build rex rex-sans-sensors
Change-Id: I4df6cbc3e5e92b32232d24d8ce1d0f8a53dd7da6
Signed-off-by: Yuval Peress <peress@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4339257
Commit-Queue: Keith Short <keithshort@chromium.org>
Reviewed-by: Keith Short <keithshort@chromium.org>
Tested-by: Li1 Feng <li1.feng@intel.com>
-rw-r--r-- | zephyr/program/rex/BUILD.py | 28 | ||||
-rw-r--r-- | zephyr/program/rex/rex-sans-sensors/project.conf | 26 | ||||
-rw-r--r-- | zephyr/program/rex/rex-sans-sensors/project.overlay | 23 |
3 files changed, 71 insertions, 6 deletions
diff --git a/zephyr/program/rex/BUILD.py b/zephyr/program/rex/BUILD.py index e635e22f57..82aa3833ec 100644 --- a/zephyr/program/rex/BUILD.py +++ b/zephyr/program/rex/BUILD.py @@ -7,23 +7,39 @@ def register_variant( project_name, + kconfig_files=None, ): """Register a variant of Rex.""" + if kconfig_files is None: + kconfig_files = [ + # Common to all projects. + here / "program.conf", + # Project-specific KConfig customization. + here / project_name / "project.conf", + ] + register_npcx_project( project_name=project_name, zephyr_board="npcx9m7f", dts_overlays=[ here / project_name / "project.overlay", ], - kconfig_files=[ - # Common to all projects. - here / "program.conf", - # Project-specific KConfig customization. - here / project_name / "project.conf", - ], + kconfig_files=kconfig_files, ) register_variant( project_name="rex", ) + +register_variant( + project_name="rex-sans-sensors", + kconfig_files=[ + # Common to all projects. + here / "program.conf", + # Parent project's config + here / "rex" / "project.conf", + # Project-specific KConfig customization. + here / "rex-sans-sensors" / "project.conf", + ], +) diff --git a/zephyr/program/rex/rex-sans-sensors/project.conf b/zephyr/program/rex/rex-sans-sensors/project.conf new file mode 100644 index 0000000000..d9c0de150c --- /dev/null +++ b/zephyr/program/rex/rex-sans-sensors/project.conf @@ -0,0 +1,26 @@ +# Copyright 2023 The ChromiumOS Authors +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# Disable motionsense +CONFIG_PLATFORM_EC_MOTIONSENSE=n + +# Disable sensors console command +CONFIG_PLATFORM_EC_CONSOLE_CMD_ACCELS=n +CONFIG_PLATFORM_EC_CONSOLE_CMD_ACCEL_INFO=n +CONFIG_PLATFORM_EC_CONSOLE_CMD_I2C_SPEED=n + +# Disable sensors +CONFIG_PLATFORM_EC_ACCEL_FIFO=n +CONFIG_PLATFORM_EC_DYNAMIC_MOTION_SENSOR_COUNT=n +CONFIG_PLATFORM_EC_GMR_TABLET_MODE=n +CONFIG_PLATFORM_EC_LID_ANGLE=n +CONFIG_PLATFORM_EC_LID_ANGLE_UPDATE=n +CONFIG_PLATFORM_EC_SENSOR_TIGHT_TIMESTAMPS=n +CONFIG_PLATFORM_EC_TABLET_MODE=n +CONFIG_PLATFORM_EC_TABLET_MODE_SWITCH=n + +# Disable sensor Drivers +CONFIG_PLATFORM_EC_ACCELGYRO_LSM6DSO=n +CONFIG_PLATFORM_EC_ACCEL_LIS2DW12=n +CONFIG_PLATFORM_EC_ALS_TCS3400=n diff --git a/zephyr/program/rex/rex-sans-sensors/project.overlay b/zephyr/program/rex/rex-sans-sensors/project.overlay new file mode 100644 index 0000000000..59f3f5ae6d --- /dev/null +++ b/zephyr/program/rex/rex-sans-sensors/project.overlay @@ -0,0 +1,23 @@ +/* Copyright 2023 The ChromiumOS Authors + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +/* Include base Rex */ +#include "../rex/project.overlay" + +&i2c0_0 { + status = "disabled"; +}; +&i2c_ec_i2c_sensor { + status = "disabled"; +}; +&int_imu { + status = "disabled"; +}; +&int_als_rgb { + status = "disabled"; +}; +&int_accel { + status = "disabled"; +}; |