From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=205.220.168.131 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1793452993; b=jSKOIbmZqqG/7E8faxTGf2eDUWjt/6qww9mKSEqoG/k6OYHevN29AY+eYWySJWFAnEa9 LpTdP3Rxzjd27ElMiOf0nnqTFAvWOCJi5O/M83JKu6opmpDQwY/N0V5ueX3QPBxXTLcmo 68l8S9xEoj29A1Y1VrBgWkV/BgaUe0EhjutUz8+R974ANfqdmjHT3dhnEKIzBzu7CCAu1 VrF/zRdOvX1RzGzfqxn2LaFlzgW22d7z3EoFsS70UyBhWa+JTCeWK+QuVZ+edqNY1hRY+ qUBe3gUu9tOwSYDD3u6c1l6T2CrR8v3hGBDJcao3YquRAqg9ZIaianZseT9Xe268DyQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793452993; h=DMARC-Filter:Received:DKIM-Signature:Received:Received: DKIM-Signature:X-Google-DKIM-Signature:X-Forwarded-Encrypted: X-Gm-Message-State:X-Gm-Gg:X-Received:X-Received:Received:From: Subject:Date:Message-Id:MIME-Version:Content-Type: Content-Transfer-Encoding:X-B4-Tracking:X-Change-ID:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Proofpoint-Spam-Details-Enc: X-Authority-Analysis:X-Proofpoint-ORIG-GUID:X-Proofpoint-GUID: X-Proofpoint-Spam-Info:X-Proofpoint-Virus-Version: X-Proofpoint-Spam-Details; bh=4oSUppzxzHF3D+dg1jUudVpg0qnnD2G2Yi8QoIkwJ48=; b=IM8utEA5nSkeEZf5TGlB7umJpZjeE4dfZtsUUo5ha5lno867gd78rrbw1lTyc/nBO4pT NA0KwxDjn627akJ+jx0TjHZrP1LTOLFSCD26cgE2KN4TJKYsI9Zep0rm3mnhDokr4a4eg PMyE7Kn/lEZAuYdp8JcOvttyyfLkoJdqM0IGpWTDMz+DZKT4ueIjcLBeqIGLgam8huQLM Zrr0ta2+a6HsHOuKMrTWf1vcXYJseDv8VY9coGwurQU902n2IfbiPVUFd0r/Fw+RY4ey3 dCAVdHKAFKWGCoOHLVhyxEKJ1eZ73l2wvF4QdWlZWiYzbLyyKDYqTMSkDsssr+QK3iw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=cgvrcHcv; dkim=pass header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=LZQ3R96Q; arc=none smtp.remote-ip=205.220.168.131 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2F73A606A31C for ; Sat, 31 Oct 2026 13:23:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 2F73A606A31C Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=cgvrcHcv; dkim=pass (2048-bit key, unprotected) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=LZQ3R96Q Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69VD0E281631011 for ; Sat, 31 Oct 2026 13:23:12 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to; s=qcppdkim1; bh=4oSUppzxzHF3D+dg1jUudV pg0qnnD2G2Yi8QoIkwJ48=; b=cgvrcHcvCZNzVtSvV+tBKNVF/ZohKSMCXHsLDR 7pMaDiDHuenF92r1ZIXt2wUzDXiBmM1US0Bi3Z0jHukA68ihi/IM2pegxHuG/wAr 6pgvlxLpVNP+kNQOTQXOk/kwf35vTEqTxAvbL0XV0iH9+P2v0nplCY1Rp0gd54j/ WUdbzCAIwnFcM6bBjWBsaElL2BlbEH3a/MIQvDQgA4ljvQ+83OxMcawZjVGEQytY gHK/mxicw2hpNfILmqLLO4A6JxR7jyaNGShPWHcDaIscJUEYjCXDdpguvCkgBMHO l+sWrMoEuv3prrxvVD52TlMFXilTYbO/AH/7fpyVDH9uALkg== Received: from mail-dl1-f71.google.com (mail-dl1-f71.google.com [74.125.82.71]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hn93eh2d0-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Sat, 31 Oct 2026 13:23:11 +0000 (GMT) Received: by mail-dl1-f71.google.com with SMTP id a92af1059eb24-139b62317d0so1811101c88.0 for ; Sat, 31 Oct 2026 06:23:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1793452991; x=1794057791; darn=vger.kernel.org; h=cc:to:content-transfer-encoding:content-type:mime-version :message-id:date:subject:from:from:to:cc:subject:date:message-id :reply-to:content-type; bh=4oSUppzxzHF3D+dg1jUudVpg0qnnD2G2Yi8QoIkwJ48=; b=LZQ3R96QnU+Gi19XZCAZanIqNUuiLezMaVE2deiiYIFJ5SHjkQN2trIpyWarsGnr96 R2jDqCeNU+6h4q92jJ3+TgIfgCHEDBTBz428/lFCoIN2wXrRj22JCLKQpxbctxYbNL71 Xa4S+qg/7CJVsK3xiX2hxQJi4XOBj6gNxysu3oeB9yKi/3ZpMVHwHmlAl/0SYPq9TFxx MGMdKZCX9suaK+ef1wGwDPZ7JMisVxKkM5+v79E8zX/SACiZFwBdB2Xgj4LFUpJWDh3Q 73AvgGtn6AMfiyuXTnrSpHioC2HSZ3GS5kDY7L+oE7P+IniYDuCzsqfQNIUkYjMrxKf3 nxpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1793452991; x=1794057791; h=cc:to:content-transfer-encoding:content-type:mime-version :message-id:date:subject:from:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to:content-type; bh=4oSUppzxzHF3D+dg1jUudVpg0qnnD2G2Yi8QoIkwJ48=; b=oP063CYJHHYY1/U6Ip9lbUneDB8njvSb/NWXnD9H3ZosYM2LezRTUd5RK4YSOlEN8+ gNjgLQOFv3L+Dw8pj051boyyBjUTyGbvuFEXdKBs6e1HOBzsZlNmVdivnQcNJF+ON2HR O77D3Uj89ASV+dI11S5IrKHKD1UOFgfPB7/C7bjbjMuc/sY481EzAC1hG6nvpXSnKvbG evCAC4q3G4s2lstEy4L+AsjsPqcb2f6NzYshNEI9KM+rvSbK0WAuddwM4WM/QrlIOqqv bDDUaNTpQuXEOPQCLsaRrxNBmk6awyQqlupDkLqA00g7F8lDJFUgOFCcY4LApN9h0OjI Buew== X-Forwarded-Encrypted: i=1; AKwUvBzpTSto6Kg3SnkJ/UNOkawNfccMoOw9BXkB5ayZhEvGG29Ncpa7SICgR6jgJ6BiPlmzGZZkIcef62TbXZE=@vger.kernel.org X-Gm-Message-State: AFq9FYK7boMtdQE4bS70dRf5sttsSalRWBO3XwOa/e43+xU6T6ke3Px4 tna1AgsQnwZb0nVU0iqyJ+rm00Rri1RenR1o0cTa/JPdGZ/V4/aE/xMOkN1vk+hU9GWYPi3qqo/ 8cEToRPtSHCdThZUoWz5CcQVuliWdcIZ+altjZoMJdcefX5sOQ6cyYeRFDaTTvYAxxZM= X-Gm-Gg: AYBFou2907uL+bU8ZXx0OGZU7N5G2/7aqKYFZuRuw5jYIRBfRWCeQETmyErZ5Fq+fJ3 9lrljJH7RqnhlZcTJRX5KpnpNYP4bewmqSb+4E+JmrBu9J8PWYCQQ6Uq22ASWrdRtZj55njOfbo 9xuVQgUPEUAkN/fi5NrbOcYT0eWYEuRCaKPq20gUNpJjxhjWXG6hbBUsP8bqnEgUX0ARaMdOUf0 4zttwx6E16HHq03RhGaSZXl+gu02sUiZ8JPWfQcnMFzVLPeXbBBNe9Yb1S8tP387q7/p6W9kjCH cW2lJWN4/VoEoXtdVJPIwjAUwZc62AurgySkcf+pUXRXXpxgjINoZI4lyEt0Mi93D5sM5wFqne7 hp+0RrdJ8vM6EFGUs6iLZUE0XvDnshI+X5ZDrm4JzV6P/sne3IYrGgO6RoCKOv0tsopMZtdFOsj ZaR+k= X-Received: by 2002:a05:701b:4502:10b0:18d:96e8:b913 with SMTP id a92af1059eb24-1ac5f64afcbmr7058774c88.47.1793452991114; Sat, 31 Oct 2026 06:23:11 -0700 (PDT) X-Received: by 2002:a05:701b:4502:10b0:18d:96e8:b913 with SMTP id a92af1059eb24-1ac5f64afcbmr7058733c88.47.1793452990367; Sat, 31 Oct 2026 06:23:10 -0700 (PDT) Received: from hu-gkohli-hyd.qualcomm.com ([202.46.23.25]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-1ac193b8179sm18234699c88.11.2026.10.31.06.23.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 31 Oct 2026 06:23:09 -0700 (PDT) From: Gaurav Kohli Subject: [PATCH v2 0/6] thermal: Add hardware-binned trip point support Date: Sat, 31 Oct 2026 18:52:46 +0530 Message-Id: <20261031-thermal_bin-v2-0-d76fd073ae98@oss.qualcomm.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAKfr5WoC/1XM0QrCIBTG8VcZ5zqHCsvWVe8RI9Sd5YE5S5cUw 3fPdtfNgf+B77dBwkiY4NxsEDFTorDUkIcGrNPLHRmNtUFyeeS9UGx1GL2eb4YWNqEyaMeJo1B QF4+IE7137TrUdpTWED87nsXvuzuCc/nnZME467TsDSo8oe0uIaX2+dKzDd639cBQSvkCfTZIX K0AAAA= X-Change-ID: 20260917-thermal_bin-fe7becdf0e17 To: "Rafael J. Wysocki" , Daniel Lezcano , Zhang Rui , Lukasz Luba , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jonathan Corbet , Shuah Khan , Randy Dunlap , Amit Kucheria , Thara Gopinath , Bjorn Andersson , Konrad Dybcio , Abel Vesa Cc: linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-arm-msm@vger.kernel.org, Gaurav Kohli , Amit Kucheria X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1793452983; l=4715; i=gaurav.kohli@oss.qualcomm.com; s=20260302; h=from:subject:message-id; bh=MRemRaOBOzvAS+s91I3hR3FSXCHfN0Am3nSSTty9cbc=; b=Y+4eo6jLmnpvhRPgCYXsO0sY0h6PwZfNKxRNFHd0HoR+PgpiTyd9NwOWHU2fj2AW5kVaV+Wfh ImDebT/ed3pDFmlHJu6sjPOIsUTV5u4Z3aNiv0mayuqPbb7U4n813q4 X-Developer-Key: i=gaurav.kohli@oss.qualcomm.com; a=ed25519; pk=IdNsqe8rWsF6dbpGHfwPEH9zM0nbOdRH72HxUT9qPak= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDMxMDA1MyBTYWx0ZWRfXxtegQz4xfyec dS0y5d6YNBLlYcNranVd1SD0s1mCYBlhFKY+JmKdxIXakFLuBKjtEICGurVeVWAXQBFPnA8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Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-31_03,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 bulkscore=0 impostorscore=0 suspectscore=0 malwarescore=0 lowpriorityscore=0 priorityscore=1501 phishscore=0 adultscore=0 spamscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610300000 definitions=main-2610310053 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/ Slides: https://lpc.events/event/19/contributions/2245/attachments/1885/4034/LPC2025-Thermal-Microconf-Amit-Tj-Thermal-binning.pdf 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. Signed-off-by: Gaurav Kohli --- 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/20261002-thermal_bin-v1-0-5a29be7e8ec5@oss.qualcomm.com --- 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 | 57 ++++- .../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, 751 insertions(+), 114 deletions(-) --- base-commit: 0d9d0dbf2fddcff5859d623e90ca73c4054276e1 change-id: 20260917-thermal_bin-fe7becdf0e17 Best regards, -- Gaurav Kohli