Skip to content

Lenovo ThinkPad T14s EC thermal monitoring and thermal zone integration

Daniel Lezcano linux-arm-msm linux-devicetree linux-hwmon lkml platform-driver-x86 7 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest posting 2/23 patches 11 repliesIn review
  2. v6 posting 1/20 of 3 patches 0 repliesSuperseded
  3. v53 patches 7 repliesSuperseded
Earlier versions · 4
VersionPostedPatchesRepliesStatus
v42 patches1 replySuperseded
v32 patches5 repliesSuperseded
v23 patches2 repliesSuperseded
v13 patches9 repliesSuperseded

Changes in v6 from the cover letter

- Added Reviewed-by tag (Dmitry Baryshkov)
- Removed required property for #thermal-sensor-cells (Krzysztof Kozlowski)

Patches in v6 posting 2/2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3dt-bindings: embedded-controller: Add Lenovo ThinkPad T14s thermal sensor provider supportDocumentation/devicetree/bindings/embedded-controller/lenovo,thinkpad-t14s-ec.yaml+4 -02 replies
2/3platform: arm64: lenovo-thinkpad-t14s-ec: Add hwmon support for temperaturesdrivers/platform/arm64/Kconfig drivers/platform/arm64/lenovo-thinkpad-t14s.c+132 -05 replies
3/3arm64: dts: qcom: x1e78100-t14s: Add thermal zones for keyboard skin and charging sensorsarch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi+66 -10 replies

Reviews trailers per patch

2 of 3 patches have a Reviewed-by or Acked-by.

PatchIlpo JärvinenDmitry BaryshkovNeil ArmstrongKonrad Dybcio
1/3
2/3R-b R-b T-b
3/3R-b T-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v6 thread

Cover letter [PATCH v6 0/3] Lenovo ThinkPad T14s EC thermal monitoring and thermal zone integration

Hi,

This series extends the Lenovo ThinkPad T14s embedded controller driver with environmental monitoring capabilities and integrates the exposed sensors into the Linux thermal framework.

The EC provides access to several platform temperature sensors covering the SoC, keyboard area, bottom cover, charging circuitry, QTM module and SSD. These sensors are currently used by the firmware for thermal management but are not exposed to Linux.

The first patch adds hwmon support for the EC temperature sensors.

The second patch exposes the EC as a thermal sensor provider in the device tree and defines thermal zones for the keyboard skin temperature and the charging circuitry temperature. This allows the generic thermal framework to react to EC-reported temperatures and apply standard Linux thermal mitigation policies.

As the EC protocol is not fully decoded, the passive trip points get/set actions are missing, so it is not possible to program a threshold and receive an interrupt when crossed the way up or down. Consequently, the thermal zone related to the charging circuitry is polled every two seconds until we can set the trip points in the EC.

This series fixes critical thermal issues happening on this platform where a kernel compilation, or heavy workloads, lead to a system reboot.

Tested on a Lenovo ThinkPad T14s Gen 6 (Snapdragon X Elite).

Please make sure scmi-cpufreq.ko is loaded before testing

Thanks,

Daniel

---
Changelog:
v6:
- Added Reviewed-by tag (Dmitry Baryshkov)
- Removed required property for #thermal-sensor-cells (Krzysztof Kozlowski)
v5:
- Added Reviewed-by tag (Ilpo Järvinen)
- Added the '#thermal-sensor-cells' property DT binding (Sashiko)
v4:
- Added the missing HWMON_C_REGISTER_TZ attribute (Sashiko)
- Fixed dependency with HWMON (Sashiko)
- Added Tested-by tag (Neil Armstrong)
v3:
- Removed event based because trip point are not yet well supported
- Added an empty line after variable declaration (Ilpo Järvinen)
- Used MILLIDEGREE_PER_DEGREE from units.h (Ilpo Järvinen)
- Made switch consistent (Ilpo Järvinen)
v2:
- Fixed patch 1 subject prefix
- Removed the fan information part
- Added HWMON_T_ALARM
- Fixed DT change description to reflect what it does really

Daniel Lezcano (3):
dt-bindings: embedded-controller: Add Lenovo ThinkPad T14s thermal
sensor provider support
platform: arm64: lenovo-thinkpad-t14s-ec: Add hwmon support for
temperatures
arm64: dts: qcom: x1e78100-t14s: Add thermal zones for keyboard skin
and charging sensors

 .../lenovo,thinkpad-t14s-ec.yaml              |   4 +
 .../qcom/x1e78100-lenovo-thinkpad-t14s.dtsi   |  67 ++++++++-
 drivers/platform/arm64/Kconfig                |   1 +
 drivers/platform/arm64/lenovo-thinkpad-t14s.c | 131 ++++++++++++++++++
 4 files changed, 202 insertions(+), 1 deletion(-)
Signature · 1 line
2.53.0