thermal: Add hardware-binned trip point support
Get series with b4
b4 am [email protected] change-id 20260917-thermal_bin-fe7becdf0e17Versions newest first
- v3 Latest6 patches 3 repliesIn review
- v26 patches 4 repliesSuperseded
- v16 patches 10 repliesSuperseded
Changes in v3 from the cover letter
- Add minItems/maxItems constraints for thermal-hw-bin. (Krzysztof)
- Return -EINVAL for invalid trip types so -ENODEV remains reserved for
skipped hw-bin trips. (Sashiko)
- Add Reviewed-by from Krzysztof for the qcom-tsens binding patch.
- Link to v2: https://lore.kernel.org/r/[email protected]
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | dt-bindings: thermal: thermal-zones: add hardware-binning trip propertiesDocumentation/ | +59 | 3 replies | |
| 2/6 | thermal: add hardware-binning trip-point filtering supportDocumentation/ Documentation/ MAINTAINERS +2 more | +377 | 0 replies | |
| 3/6 | dt-bindings: thermal: qcom-tsens: document qcm6490 tsensDocumentation/ | +8 | 0 replies | |
| 4/6 | thermal: qcom: tsens: add hardware-bin trip-point filteringdrivers/ drivers/ drivers/ | +232 | 0 replies | |
| 5/6 | arm64: dts: qcom: kodiak: use thermal hw-bin tripsarch/ | +44 | 0 replies | |
| 6/6 | arm64: dts: qcom: hamoa: add thermal hw-bin supportarch/ arch/ | +34 | 0 replies |
Reviews trailers per patch
1 of 6 patches has a Reviewed-by or Acked-by.
| Patch | Krzysztof Kozlowski |
|---|---|
| 1/6 | |
| 2/6 | |
| 3/6 | R-b |
| 4/6 | |
| 5/6 | |
| 6/6 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v3 0/6] thermal: Add hardware-binned trip point support
Some SoCs are available in multiple thermal/package bins. The silicon is otherwise the same, but the package/bin determines which junction temperature limits are valid for a given part. This information is programmed in manufacturing fuses and needs to be reflected in the trip points used by the kernel.
At the moment this is difficult to describe cleanly. Board-specific trip overrides can handle individual cases, but they do not describe the real hardware property: the limit is selected by SoC fuse state, not by board identity. Duplicating thermal zones or adding vendor-specific trip properties would also make the binding harder to share across platforms.
This series adds generic hardware-binned trip point support to the thermal OF parser, following the same general model as the OPP framework's opp-supported-hw property. A thermal sensor driver provides the decoded hardware bin when registering a thermal zone, and the OF parser uses that information to select the applicable trip data.
Two generic trip-point properties are added:
- thermal-hw-bin:
one or more hardware-bin mask groups for which the trip is valid
- temperature-bin:
per-bin trip temperatures, selected by the matching thermal-hw-bin group
This topic was discussed at the Linux Plumbers Conference Power and Thermal Management microconference as "Thermal binning support". The discussion covered how to represent SoCs whose valid junction temperature limits depend on package/bin characteristics. The approach taken here is to keep the DT description generic and let the platform thermal driver provide the hardware-specific fuse decoding.
LPC discussion:
https://lpc.events/event/19/contributions/2245/
Qualcomm TSENS is added as the first user of the generic support. On SC7280/QCM6490-class platforms, TSENS reads the jtag-id and feat-id QFPROM cells and maps them to the thermal hardware bin. On X1E80100-class platforms, TSENS reads the i-temp QFPROM bit. The decoded bin is passed to the thermal OF registration path before trip points are parsed.
The DTS patches use the new properties for the affected Kodiak and Hamoa thermal zones. For the standard bin the passive trip remains at 95C; for the elevated bin it is selected as 105C.
---
Changes in v3:
- Add minItems/maxItems constraints for thermal-hw-bin. (Krzysztof)
- Return -EINVAL for invalid trip types so -ENODEV remains reserved for
skipped hw-bin trips. (Sashiko)
- Add Reviewed-by from Krzysztof for the qcom-tsens binding patch.
- Link to v2: https://lore.kernel.org/r/[email protected]
Changes in v2:
- Format temperature-bin as separate DT cells. (Konrad)
- Add min/max constraints for temperature-bin entries. (Sashiko)
- Drop the post-registration hardware-bin API. (Sashiko)
- Remove CONFIG_THERMAL_BIN and make hardware-bin trip parsing part of
the thermal OF registration path. (Sashiko)
- Keep hardware-bin selection registration-time only through devm_thermal_of_zone_register_with_bin(), because OF trips are parsed synchronously during zone registration. (Sashiko)
- Propagate -EPROBE_DEFER when TSENS cannot read the hardware-bin nvmem
cells yet. (Sashiko)
- Link to v1: https://lore.kernel.org/r/[email protected]
---
Amit Kucheria (6):
dt-bindings: thermal: thermal-zones: add hardware-binning trip properties
thermal: add hardware-binning trip-point filtering support
dt-bindings: thermal: qcom-tsens: document qcm6490 tsens
thermal: qcom: tsens: add hardware-bin trip-point filtering
arm64: dts: qcom: kodiak: use thermal hw-bin trips
arm64: dts: qcom: hamoa: add thermal hw-bin support
.../devicetree/bindings/thermal/qcom-tsens.yaml | 8 + .../devicetree/bindings/thermal/thermal-zones.yaml | 60 ++++- .../driver-api/thermal/hardware-binning.rst | 112 +++++++++ Documentation/driver-api/thermal/index.rst | 1 + MAINTAINERS | 1 + arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts | 66 ------ arch/arm64/boot/dts/qcom/hamoa.dtsi | 42 +++- arch/arm64/boot/dts/qcom/kodiak.dtsi | 58 +++-- drivers/thermal/qcom/tsens-v2.c | 16 ++ drivers/thermal/qcom/tsens.c | 190 +++++++++++++++- drivers/thermal/qcom/tsens.h | 29 +++ drivers/thermal/thermal_of.c | 253 +++++++++++++++++++-- include/linux/thermal.h | 32 +++ 13 files changed, 754 insertions(+), 114 deletions(-)
---
base-commit: 6d582d78fad9d828e575ca0cdcff8ea47a77220b
change-id: 20260917-thermal_bin-fe7becdf0e17
Best regards,
Signature · 1 line
Gaurav Kohli <[email protected]>