* [PATCH v3 0/2] Lenovo ThinkPad T14s EC thermal monitoring and thermal zone integration
@ 2026-07-01 10:37 Daniel Lezcano
2026-07-01 10:37 ` [PATCH v3 1/2] platform: arm64: lenovo-thinkpad-t14s-ec: Add hwmon support for temperatures Daniel Lezcano
2026-07-01 10:37 ` [PATCH v3 2/2] arm64: dts: qcom: x1e78100-t14s: Add thermal zones for keyboard skin and charging sensors Daniel Lezcano
0 siblings, 2 replies; 7+ messages in thread
From: Daniel Lezcano @ 2026-07-01 10:37 UTC (permalink / raw)
To: sre, hansg, ilpo.jarvinen, linux, andersson, konradybcio, robh,
krzk+dt, conor+dt
Cc: bryan.odonoghue, platform-driver-x86, linux-kernel, linux-hwmon,
linux-arm-msm, devicetree
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).
Thanks,
Daniel
---
Changelog:
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 (2):
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
.../qcom/x1e78100-lenovo-thinkpad-t14s.dtsi | 68 ++++++++-
drivers/platform/arm64/lenovo-thinkpad-t14s.c | 130 ++++++++++++++++++
2 files changed, 197 insertions(+), 1 deletion(-)
--
2.53.0
^ permalink raw reply [flat|nested] 7+ messages in thread* [PATCH v3 1/2] platform: arm64: lenovo-thinkpad-t14s-ec: Add hwmon support for temperatures 2026-07-01 10:37 [PATCH v3 0/2] Lenovo ThinkPad T14s EC thermal monitoring and thermal zone integration Daniel Lezcano @ 2026-07-01 10:37 ` Daniel Lezcano 2026-07-01 10:51 ` sashiko-bot 2026-07-01 10:37 ` [PATCH v3 2/2] arm64: dts: qcom: x1e78100-t14s: Add thermal zones for keyboard skin and charging sensors Daniel Lezcano 1 sibling, 1 reply; 7+ messages in thread From: Daniel Lezcano @ 2026-07-01 10:37 UTC (permalink / raw) To: sre, hansg, ilpo.jarvinen, linux, andersson, konradybcio, robh, krzk+dt, conor+dt Cc: bryan.odonoghue, platform-driver-x86, linux-kernel, linux-hwmon, linux-arm-msm, devicetree Expose the Lenovo ThinkPad T14s EC environmental sensors through the hwmon subsystem. The driver now registers a hwmon device providing access to six EC temperature sensors corresponding to the SoC, keyboard area, base cover, PMIC/charging circuitry, QTM module and SSD. Sensor labels are exported to allow user space to identify each measurement. This allows standard monitoring tools such as lm-sensors to report platform temperatures. Signed-off-by: Daniel Lezcano daniel.lezcano@oss.qualcomm.com --- drivers/platform/arm64/lenovo-thinkpad-t14s.c | 130 ++++++++++++++++++ 1 file changed, 130 insertions(+) diff --git a/drivers/platform/arm64/lenovo-thinkpad-t14s.c b/drivers/platform/arm64/lenovo-thinkpad-t14s.c index 5590302a5694..c9917a1d2bd7 100644 --- a/drivers/platform/arm64/lenovo-thinkpad-t14s.c +++ b/drivers/platform/arm64/lenovo-thinkpad-t14s.c @@ -11,6 +11,7 @@ #include <linux/delay.h> #include <linux/dev_printk.h> #include <linux/err.h> +#include <linux/hwmon.h> #include <linux/i2c.h> #include <linux/input.h> #include <linux/input/sparse-keymap.h> @@ -21,6 +22,7 @@ #include <linux/regmap.h> #include <linux/slab.h> #include <linux/pm.h> +#include <linux/units.h> #define T14S_EC_CMD_ECRD 0x02 #define T14S_EC_CMD_ECWR 0x03 @@ -67,6 +69,13 @@ #define T14S_EC_EVT_KEY_FN_F11 0x7a #define T14S_EC_EVT_KEY_FN_G 0x7e +#define T14S_EC_SYS_THERM0 0x78 /* SoC (CPU+GPU) */ +#define T14S_EC_SYS_THERM1 0x79 /* Keyboard */ +#define T14S_EC_SYS_THERM2 0x7a /* Back cover */ +#define T14S_EC_SYS_THERM3 0x7b /* Charger / PMIC */ +#define T14S_EC_SYS_THERM6 0x7c /* QTM West */ +#define T14S_EC_SYS_THERM7 0x7d /* SSD */ + /* Hardware LED blink rate is 1 Hz (500ms off, 500ms on) */ #define T14S_EC_BLINK_RATE_ON_OFF_MS 500 @@ -93,9 +102,19 @@ struct t14s_ec_led_classdev { struct t14s_ec *ec; }; +struct t14s_ec_hwmon_sys_thermx { + const char *label; + int reg; +}; + +struct t14s_ec_hwmon { + struct t14s_ec_hwmon_sys_thermx *sys_thermx; +}; + struct t14s_ec { struct regmap *regmap; struct device *dev; + struct t14s_ec_hwmon ec_hwmon; struct t14s_ec_led_classdev led_pwr_btn; struct t14s_ec_led_classdev led_chrg_orange; struct t14s_ec_led_classdev led_chrg_white; @@ -555,6 +574,113 @@ static irqreturn_t t14s_ec_irq_handler(int irq, void *data) return IRQ_HANDLED; } +static umode_t t14s_ec_hwmon_is_visible(const void *drvdata, + enum hwmon_sensor_types type, + u32 attr, int channel) +{ + switch (type) { + case hwmon_temp: + if (attr == hwmon_temp_input || + attr == hwmon_temp_label) + return 0444; + break; + default: + return 0; + } + + return 0; +} + +static int t14s_ec_hwmon_read_string(struct device *dev, enum hwmon_sensor_types type, + u32 attr, int channel, const char **str) +{ + struct t14s_ec *ec = dev_get_drvdata(dev); + + switch (type) { + case hwmon_temp: + if (attr == hwmon_temp_label) { + *str = ec->ec_hwmon.sys_thermx[channel].label; + return 0; + } + break; + default: + return -EOPNOTSUPP; + } + + return -EOPNOTSUPP; +} + +static int t14s_ec_hwmon_read(struct device *dev, enum hwmon_sensor_types type, + u32 attr, int channel, long *val) +{ + struct t14s_ec *ec = dev_get_drvdata(dev); + unsigned int value; + int ret; + + switch (type) { + case hwmon_temp: + if (attr == hwmon_temp_input) { + ret = t14s_ec_read(ec, ec->ec_hwmon.sys_thermx[channel].reg, &value); + if (ret) + return ret; + *val = value * MILLIDEGREE_PER_DEGREE; + + return 0; + } + break; + default: + return -EOPNOTSUPP; + } + + return -EOPNOTSUPP; +} + +static const struct hwmon_ops t14s_ec_hwmon_ops = { + .is_visible = t14s_ec_hwmon_is_visible, + .read = t14s_ec_hwmon_read, + .read_string = t14s_ec_hwmon_read_string, +}; + +static const struct hwmon_channel_info *t14s_ec_hwmon_info[] = { + HWMON_CHANNEL_INFO(temp, + HWMON_T_INPUT | HWMON_T_LABEL, + HWMON_T_INPUT | HWMON_T_LABEL, + HWMON_T_INPUT | HWMON_T_LABEL, + HWMON_T_INPUT | HWMON_T_LABEL, + HWMON_T_INPUT | HWMON_T_LABEL, + HWMON_T_INPUT | HWMON_T_LABEL), + NULL +}; + +static const struct hwmon_chip_info t14s_ec_chip_info = { + .ops = &t14s_ec_hwmon_ops, + .info = t14s_ec_hwmon_info, +}; + +static int t14s_ec_hwmon_probe(struct t14s_ec *ec) +{ + struct device *dev; + struct t14s_ec_hwmon_sys_thermx sys_thermx[] = { + { .label = "soc", .reg = T14S_EC_SYS_THERM0 }, + { .label = "keyboard", .reg = T14S_EC_SYS_THERM1 }, + { .label = "base", .reg = T14S_EC_SYS_THERM2 }, + { .label = "charging", .reg = T14S_EC_SYS_THERM3 }, + { .label = "qtm", .reg = T14S_EC_SYS_THERM6 }, + { .label = "ssd", .reg = T14S_EC_SYS_THERM7 }, + }; + + ec->ec_hwmon.sys_thermx = devm_kmemdup_array(ec->dev, sys_thermx, + ARRAY_SIZE(sys_thermx), + sizeof(sys_thermx[0]), GFP_KERNEL); + if (!ec->ec_hwmon.sys_thermx) + return -ENOMEM; + + dev = devm_hwmon_device_register_with_info(ec->dev, "t14s_ec", ec, + &t14s_ec_chip_info, NULL); + + return PTR_ERR_OR_ZERO(dev); +} + static int t14s_ec_probe(struct i2c_client *client) { struct device *dev = &client->dev; @@ -590,6 +716,10 @@ static int t14s_ec_probe(struct i2c_client *client) if (ret < 0) return ret; + ret = t14s_ec_hwmon_probe(ec); + if (ret < 0) + return ret; + ret = devm_request_threaded_irq(dev, client->irq, NULL, t14s_ec_irq_handler, IRQF_ONESHOT, dev_name(dev), ec); -- 2.53.0 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v3 1/2] platform: arm64: lenovo-thinkpad-t14s-ec: Add hwmon support for temperatures 2026-07-01 10:37 ` [PATCH v3 1/2] platform: arm64: lenovo-thinkpad-t14s-ec: Add hwmon support for temperatures Daniel Lezcano @ 2026-07-01 10:51 ` sashiko-bot 0 siblings, 0 replies; 7+ messages in thread From: sashiko-bot @ 2026-07-01 10:51 UTC (permalink / raw) To: Daniel Lezcano; +Cc: devicetree, linux-hwmon, robh, conor+dt Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider: - [High] t14s_ec_hwmon_read() bypasses the regmap lock, allowing concurrent I2C commands to the EC without the required 10ms hardware delay. - [Low] The driver unconditionally uses hwmon functions but its Kconfig entry does not depend on HWMON, leading to linker errors. -- commit 53ea0adbdbb89073fdf3f9621385cdebffccdb5b Author: Daniel Lezcano <daniel.lezcano@oss.qualcomm.com> platform: arm64: lenovo-thinkpad-t14s-ec: Add hwmon support for temperatures This commit exposes the Lenovo ThinkPad T14s EC environmental sensors through the hwmon subsystem. It registers a hwmon device to provide access to six EC temperature sensors and exports their labels. > diff --git a/drivers/platform/arm64/lenovo-thinkpad-t14s.c b/drivers/platform/arm64/lenovo-thinkpad-t14s.c > index 5590302a5694f..c9917a1d2bd7a 100644 > --- a/drivers/platform/arm64/lenovo-thinkpad-t14s.c > +++ b/drivers/platform/arm64/lenovo-thinkpad-t14s.c > @@ -11,6 +11,7 @@ > #include <linux/delay.h> > #include <linux/dev_printk.h> > #include <linux/err.h> > +#include <linux/hwmon.h> [Severity: Low] The driver now unconditionally uses hwmon functions like devm_hwmon_device_register_with_info(), but the Kconfig definition for EC_LENOVO_THINKPAD_T14S doesn't appear to depend on HWMON. Will this cause linker errors if EC_LENOVO_THINKPAD_T14S is built-in while HWMON is built as a module or disabled? [ ... ] > @@ -555,6 +574,113 @@ static irqreturn_t t14s_ec_irq_handler(int irq, void *data) > return IRQ_HANDLED; > } > [ ... ] > +static int t14s_ec_hwmon_read(struct device *dev, enum hwmon_sensor_types type, > + u32 attr, int channel, long *val) > +{ > + struct t14s_ec *ec = dev_get_drvdata(dev); > + unsigned int value; > + int ret; > + > + switch (type) { > + case hwmon_temp: > + if (attr == hwmon_temp_input) { > + ret = t14s_ec_read(ec, ec->ec_hwmon.sys_thermx[channel].reg, &value); [Severity: High] Does calling t14s_ec_read() directly here bypass the regmap serialization? Multiple subsystems (LEDs, keyboard, etc.) use regmap_write/read which serialize access and respect the 10ms delay between EC I2C commands. Since t14s_ec_read() drops the I2C bus lock before sleeping for 10ms: drivers/platform/arm64/lenovo-thinkpad-t14s.c:t14s_ec_read() { ... out: i2c_unlock_bus(client->adapter, I2C_LOCK_SEGMENT); fsleep(10000); return ret; } could a concurrent regmap access acquire the I2C bus lock immediately, issuing a new command to the EC before the hardware-mandated 10ms delay has elapsed? > + if (ret) > + return ret; > + *val = value * MILLIDEGREE_PER_DEGREE; > + > + return 0; > + } > + break; [ ... ] -- Sashiko AI review · https://sashiko.dev/#/patchset/20260701103714.22583-1-daniel.lezcano@oss.qualcomm.com?part=1 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v3 2/2] arm64: dts: qcom: x1e78100-t14s: Add thermal zones for keyboard skin and charging sensors 2026-07-01 10:37 [PATCH v3 0/2] Lenovo ThinkPad T14s EC thermal monitoring and thermal zone integration Daniel Lezcano 2026-07-01 10:37 ` [PATCH v3 1/2] platform: arm64: lenovo-thinkpad-t14s-ec: Add hwmon support for temperatures Daniel Lezcano @ 2026-07-01 10:37 ` Daniel Lezcano 2026-07-01 10:47 ` sashiko-bot 2026-07-02 12:17 ` Konrad Dybcio 1 sibling, 2 replies; 7+ messages in thread From: Daniel Lezcano @ 2026-07-01 10:37 UTC (permalink / raw) To: sre, hansg, ilpo.jarvinen, linux, andersson, konradybcio, robh, krzk+dt, conor+dt Cc: bryan.odonoghue, platform-driver-x86, linux-kernel, linux-hwmon, linux-arm-msm, devicetree The Lenovo ThinkPad T14s embedded controller exposes several platform temperature sensors that are already used by the firmware for thermal management. Expose the EC as a thermal sensor provider and describe the keyboard skin and charging circuitry sensors as thermal zones in the device tree. The keyboard thermal zone defines passive and hot trip points, while the charging thermal zone also associates a cooling map with the CPU clusters, allowing the generic thermal framework to apply CPU throttling when the charging circuitry temperature exceeds the passive threshold. This integrates the EC temperature sensors with the Linux thermal framework and enables platform thermal management using standard thermal zone definitions. The EC protocol currently does not provide a mechanism to program trip points from Linux. Consequently, the thermal zones rely on periodic polling to detect threshold crossings. Using the charging circuitry temperature for thermal mitigation provides a conservative approximation of the platform thermal state and prevents the platform from reaching critical temperatures under sustained heavy CPU load. Without this change the platform reaches a critical thermal condition and resets under heavy load. Signed-off-by: Daniel Lezcano <daniel.lezcano@oss.qualcomm.com> --- .../qcom/x1e78100-lenovo-thinkpad-t14s.dtsi | 68 ++++++++++++++++++- 1 file changed, 67 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi b/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi index 5d49df41be02..a19a363da9ed 100644 --- a/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi +++ b/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi @@ -979,7 +979,7 @@ &i2c6 { status = "okay"; - embedded-controller@28 { + ec: embedded-controller@28 { compatible = "lenovo,thinkpad-t14s-ec"; reg = <0x28>; @@ -988,6 +988,8 @@ embedded-controller@28 { pinctrl-0 = <&ec_int_n_default>; pinctrl-names = "default"; + #thermal-sensor-cells = <1>; + wakeup-source; }; }; @@ -1729,3 +1731,67 @@ &usb_mp_qmpphy1 { status = "okay"; }; + +&thermal_zones { + ec-keyboard-thermal { + polling-delay = <5000>; + polling-delay-passive = <1000>; + + thermal-sensors = <&ec 1>; + + trips { + trip-point0 { + temperature = <55000>; + hysteresis = <2000>; + type = "passive"; + }; + + trip-point1 { + temperature = <62000>; + hysteresis = <0>; + type = "hot"; + }; + }; + }; + + ec-charging-thermal { + /* EC trip points cannot yet be programmed. */ + polling-delay = <5000>; + polling-delay-passive = <2000>; + + thermal-sensors = <&ec 3>; + + trips { + ec_charging_psv0: trip-point0 { + temperature = <55000>; + hysteresis = <0>; + type = "passive"; + }; + + ec_charging_alrt0: trip-point1 { + temperature = <63000>; + hysteresis = <0>; + type = "hot"; + }; + }; + + cooling-maps { + map0 { + trip = <&ec_charging_psv0>; + cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu8 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu9 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu10 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu11 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + + }; +}; -- 2.53.0 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v3 2/2] arm64: dts: qcom: x1e78100-t14s: Add thermal zones for keyboard skin and charging sensors 2026-07-01 10:37 ` [PATCH v3 2/2] arm64: dts: qcom: x1e78100-t14s: Add thermal zones for keyboard skin and charging sensors Daniel Lezcano @ 2026-07-01 10:47 ` sashiko-bot 2026-07-02 12:17 ` Konrad Dybcio 1 sibling, 0 replies; 7+ messages in thread From: sashiko-bot @ 2026-07-01 10:47 UTC (permalink / raw) To: Daniel Lezcano; +Cc: robh, devicetree, linux-hwmon, conor+dt Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [High] The DT thermal zones are completely non-functional because the backing EC driver does not register its sensors with the thermal framework. The driver (`drivers/platform/arm64/lenovo-thinkpad-t14s.c`) registers a hwmon device using `devm_hwmon_device_register_with_info()` but fails to include the `HWMON_C_REGISTER_TZ` attribute under a `hwmon_chip` channel, nor does it explicitly call `devm_thermal_of_zone_register()`. The hwmon core requires `HWMON_C_REGISTER_TZ` to automatically register thermal zones. Consequently, the DT thermal zones remain permanently unbound, and the CPU thermal throttling described in the commit will not execute. -- commit 7064bd8ea5ff8a561ac7494d4e760b120e4d6d03 Author: Daniel Lezcano <daniel.lezcano@oss.qualcomm.com> arm64: dts: qcom: x1e78100-t14s: Add thermal zones for keyboard skin and charging sensors This commit exposes the embedded controller temperature sensors as thermal zones in the device tree for the Lenovo ThinkPad T14s. It maps the charging thermal zone to CPU cooling devices, allowing the generic thermal framework to apply throttling when temperatures exceed the passive threshold. > diff --git a/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi b/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi > index 5d49df41be02a..a19a363da9ed5 100644 > --- a/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi > +++ b/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi [ ... ] > @@ -1729,3 +1731,67 @@ &usb_mp_qmpphy1 { > > status = "okay"; > }; > + > +&thermal_zones { > + ec-keyboard-thermal { > + polling-delay = <5000>; > + polling-delay-passive = <1000>; > + > + thermal-sensors = <&ec 1>; [Severity: High] Will these thermal zones successfully bind to the embedded controller? Looking at the underlying driver in drivers/platform/arm64/lenovo-thinkpad-t14s.c, it registers a hwmon device using devm_hwmon_device_register_with_info() but does not appear to include the HWMON_C_REGISTER_TZ attribute under a hwmon_chip channel. It also doesn't seem to explicitly call devm_thermal_of_zone_register(). Without the HWMON_C_REGISTER_TZ attribute, the hwmon core will not automatically register these thermal zones. Does this mean the DT thermal zones remain permanently unbound, preventing the CPU thermal throttling described in the commit message from actually executing? -- Sashiko AI review · https://sashiko.dev/#/patchset/20260701103714.22583-1-daniel.lezcano@oss.qualcomm.com?part=2 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v3 2/2] arm64: dts: qcom: x1e78100-t14s: Add thermal zones for keyboard skin and charging sensors 2026-07-01 10:37 ` [PATCH v3 2/2] arm64: dts: qcom: x1e78100-t14s: Add thermal zones for keyboard skin and charging sensors Daniel Lezcano 2026-07-01 10:47 ` sashiko-bot @ 2026-07-02 12:17 ` Konrad Dybcio 2026-07-02 13:35 ` Daniel Lezcano 1 sibling, 1 reply; 7+ messages in thread From: Konrad Dybcio @ 2026-07-02 12:17 UTC (permalink / raw) To: Daniel Lezcano, sre, hansg, ilpo.jarvinen, linux, andersson, konradybcio, robh, krzk+dt, conor+dt Cc: bryan.odonoghue, platform-driver-x86, linux-kernel, linux-hwmon, linux-arm-msm, devicetree On 7/1/26 12:37 PM, Daniel Lezcano wrote: > The Lenovo ThinkPad T14s embedded controller exposes several platform > temperature sensors that are already used by the firmware for thermal > management. > > Expose the EC as a thermal sensor provider and describe the keyboard > skin and charging circuitry sensors as thermal zones in the device > tree. [...] > +&thermal_zones { > + ec-keyboard-thermal { > + polling-delay = <5000>; > + polling-delay-passive = <1000>; > + > + thermal-sensors = <&ec 1>; Do you think it'd be worth to add dt-bindings defines to avoid raw numbers here? [...] > + cooling-maps { > + map0 { > + trip = <&ec_charging_psv0>; > + cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > + <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > + <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > + <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > + <&cpu4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > + <&cpu5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > + <&cpu6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > + <&cpu7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > + <&cpu8 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > + <&cpu9 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > + <&cpu10 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > + <&cpu11 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; > + }; > + }; > + > + }; Stray \n above Otherwise: Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Konrad ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v3 2/2] arm64: dts: qcom: x1e78100-t14s: Add thermal zones for keyboard skin and charging sensors 2026-07-02 12:17 ` Konrad Dybcio @ 2026-07-02 13:35 ` Daniel Lezcano 0 siblings, 0 replies; 7+ messages in thread From: Daniel Lezcano @ 2026-07-02 13:35 UTC (permalink / raw) To: Konrad Dybcio, sre, hansg, ilpo.jarvinen, linux, andersson, konradybcio, robh, krzk+dt, conor+dt Cc: bryan.odonoghue, platform-driver-x86, linux-kernel, linux-hwmon, linux-arm-msm, devicetree On 7/2/26 14:17, Konrad Dybcio wrote: > On 7/1/26 12:37 PM, Daniel Lezcano wrote: >> The Lenovo ThinkPad T14s embedded controller exposes several platform >> temperature sensors that are already used by the firmware for thermal >> management. >> >> Expose the EC as a thermal sensor provider and describe the keyboard >> skin and charging circuitry sensors as thermal zones in the device >> tree. > > [...] > >> +&thermal_zones { >> + ec-keyboard-thermal { >> + polling-delay = <5000>; >> + polling-delay-passive = <1000>; >> + >> + thermal-sensors = <&ec 1>; > > Do you think it'd be worth to add dt-bindings defines to avoid raw > numbers here? No it is not worth. Usually we put raw numbers and they are untouched. > [...] > >> + cooling-maps { >> + map0 { >> + trip = <&ec_charging_psv0>; >> + cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, >> + <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, >> + <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, >> + <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, >> + <&cpu4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, >> + <&cpu5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, >> + <&cpu6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, >> + <&cpu7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, >> + <&cpu8 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, >> + <&cpu9 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, >> + <&cpu10 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, >> + <&cpu11 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; >> + }; >> + }; >> + >> + }; > > Stray \n above > > Otherwise: > > Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Thanks for your review ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-07-02 13:35 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-07-01 10:37 [PATCH v3 0/2] Lenovo ThinkPad T14s EC thermal monitoring and thermal zone integration Daniel Lezcano 2026-07-01 10:37 ` [PATCH v3 1/2] platform: arm64: lenovo-thinkpad-t14s-ec: Add hwmon support for temperatures Daniel Lezcano 2026-07-01 10:51 ` sashiko-bot 2026-07-01 10:37 ` [PATCH v3 2/2] arm64: dts: qcom: x1e78100-t14s: Add thermal zones for keyboard skin and charging sensors Daniel Lezcano 2026-07-01 10:47 ` sashiko-bot 2026-07-02 12:17 ` Konrad Dybcio 2026-07-02 13:35 ` Daniel Lezcano
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox