diff options
author | Dawid Niedzwiecki <dn@semihalf.com> | 2021-02-17 12:15:21 +0100 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-02-23 19:29:13 +0000 |
commit | a5a81dca4579961b9d78c7c85442d76b3c87dbbb (patch) | |
tree | c702e09f5137ecab4b8b69b5982543bf9a9f3e63 /zephyr/dts/bindings/temp/temp_sensor.yaml | |
parent | 25fa055c3ecd98c5d339cc4002054c584f99cb1b (diff) | |
download | chrome-ec-a5a81dca4579961b9d78c7c85442d76b3c87dbbb.tar.gz |
zephyr: add shim thermal support
Add thermal support to Zephyr which includes handling temperature
threshold for certain events. The thresholds are defined in the dts
file as temperature sensor parameters - there are limits per
temperature sensor. The struct ec_thermal_config thermal_params[] array
with all parameters is generated automatically based on
named_temp_sensors node.
Enable "thermalget" and "thermalset" console commands along with
EC_CMD_THERMAL_GET_THRESHOLD and EC_CMD_THERMAL_SET_THRESHOLD host
commands.
Also, add a few functions to utils needed to verify if an event
occurred (falling/rising edge).
BUG=b:179886912
BRANCH=none
TEST=build Zephyr
TEST=Run "thermalget" command to check current thresholds.
Change the thresholds with "thermalset" to verify if AP throttling
is requested.
Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com>
Change-Id: I5f527ceecab2427b3034fd8baa62bb8482f99ff3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2698845
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'zephyr/dts/bindings/temp/temp_sensor.yaml')
-rw-r--r-- | zephyr/dts/bindings/temp/temp_sensor.yaml | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/zephyr/dts/bindings/temp/temp_sensor.yaml b/zephyr/dts/bindings/temp/temp_sensor.yaml new file mode 100644 index 0000000000..b96e9c3262 --- /dev/null +++ b/zephyr/dts/bindings/temp/temp_sensor.yaml @@ -0,0 +1,79 @@ +# Copyright 2021 The Chromium OS Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# Common properties for temperature sensors +# Zero values in degrees K(-273 in degrees C)in thermal thresholds will +# be ignored + +properties: + label: + required: true + type: string + description: + Human-readable string describing the device (used as + device_get_binding() argument) + + temp_fan_off: + required: false + type: int + default: -273 + description: + Temperature threshold in degrees C when no active cooling + is needed + + temp_fan_max: + required: false + type: int + default: -273 + description: + Temperature threshold in degrees C when max active cooling + is needed + + temp_host_warn: + required: false + type: int + default: -273 + description: + Temperature threshold in degrees C of thermal warn. + Temperatures above the thermal warn threshold generate a + request to the AP to throttle itself. + + temp_host_high: + required: false + type: int + default: -273 + description: + Temperature threshold in degrees C of thermal high. + Temperatures above the thermal high threshold cause the EC to + assert a signal (usually PROCHOT) to the AP and force the AP to + throttle. + + temp_host_halt: + required: false + type: int + default: -273 + description: + Temperature threshold in degrees C that forces AP to shutdown + due to thermal reason + + temp_host_release_warn: + required: false + type: int + default: -273 + description: + Temperature release threshold in degrees C of thermal warn + + temp_host_release_high: + required: false + type: int + default: -273 + description: + Temperature release threshold in degrees C of thermal high + + temp_host_release_halt: + required: false + type: int + default: -273 + description: + Temperature release threshold in degrees C of thermal shutdown |