diff options
author | Gwendal Grignou <gwendal@chromium.org> | 2022-02-01 19:40:46 -0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2022-02-02 22:51:26 +0000 |
commit | e8942461d5c8235a163d8c447472a2dcd48ff2b1 (patch) | |
tree | 98e6e181a3e519b261e5b73416296bdc7aade5c7 /baseboard/octopus/baseboard.h | |
parent | fe92cdf5cb260b159a7f18cc21d17c92e5c69730 (diff) | |
download | chrome-ec-e8942461d5c8235a163d8c447472a2dcd48ff2b1.tar.gz |
baseboard: octopus: Limit sensor ODR to 125Hz when using it8320
For device with it8320, limit sensor frequency to 125Hz to make sure
the EC is able to process a sample before another one arrives.
BUG=b:217195395
BRANCH=octopus
TEST=`tast run localhost:22552 hardware.SensorIioserviceHard`
Passes. Without it, would have errors like:
error during validation: too much delta between samples for base
cros-ec-gyro at index 8(2h11m49.912599111s): got 10.374407ms; want
<=
7.5ms
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Change-Id: If5b88b5fee0cb6037dbd1cbc5bee690d07fdfb3a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3430316
Reviewed-by: Diana Z <dzigterman@chromium.org>
Diffstat (limited to 'baseboard/octopus/baseboard.h')
-rw-r--r-- | baseboard/octopus/baseboard.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/baseboard/octopus/baseboard.h b/baseboard/octopus/baseboard.h index 281adf7f1e..8e0bfcf99c 100644 --- a/baseboard/octopus/baseboard.h +++ b/baseboard/octopus/baseboard.h @@ -69,6 +69,12 @@ /* EC variant determines USB-C variant */ #define VARIANT_OCTOPUS_USBC_ITE_EC_TCPCS + + /* + * Limit maximal ODR to 125Hz, the EC is using ~5ms per sample at + * 48MHz core cpu clock. + */ + #define CONFIG_EC_MAX_SENSOR_FREQ_MILLIHZ 125000 #else #error Must define a VARIANT_OCTOPUS_EC #endif /* VARIANT_OCTOPUS_EC */ |