Re: [PATCH 4/6] thermal: qcom: tsens: add hardware-bin trip-point filtering
From: Gaurav Kohli
Date: Tue Oct 27 2026 - 09:02:05 EST
On 10/26/2026 5:21 PM, Konrad Dybcio wrote:
On 10/23/26 12:01 PM, Gaurav Kohli wrote:
On 10/22/2026 2:39 PM, Konrad Dybcio wrote:
On 10/2/26 12:46 PM, Gaurav Kohli wrote:
From: Amit Kucheria <amit.kucheria@xxxxxxxxxxxxxxxx>
Some Qualcomm SoCs are binned at manufacturing time and expose the bin
in qfprom fuses. The thermal core's supported_hw_bin mechanism filters
trip points by hardware version; wire tsens up to feed it.
[...]
+ /* Hardware-bin values for thermal-hw-bin matching in DT. */
+ const u32 hw_bin_std = 0x1;
+ const u32 hw_bin_elevated = 0x2;
+
+ /* Higher thermal profile identification for qcm6490/sc7280 bins. */
+ const u32 tsens_chip_id0 = 0x197;
+ const u32 tsens_chip_id1 = 0x198;
+ const u32 tsens_chip_id2 = 0x20e;
+ const u32 tsens_chip_id3 = 0x20f;
+ const u8 tsens_feat_id2 = 0x2;
+ const u8 tsens_feat_id3 = 0x3;
+ const u8 tsens_feat_id4 = 0x4;
Isn't that (also) exposed over SMEM?
Thanks Konrad, for review.
SMEM has related socinfo data, but there is no exported helper for the
exact fields needed here, such as feat-id, which is also used as the bin
value.
Is that different to qcom_smem_get_feature_code()?
Thanks for review.
I am checking internally and will update with the exact difference from
feat-id. My understanding is that qcom_smem_get_feature_code() returns
the SMEM socinfo feature_code, while this code needs the QFPROM feat-id
field from the JTAG ID fuse word.
For this series, would prefer to keep the fuse-based path. The same
binding is also used by the generic i-temp fuse bit for Hamoa/future
targets, while the jtag-id/feat-id decoding remains only the
Kodiak/QCM6490-specific callback. Please let me know if you are fine with this approach.
This jtag-id/feat-id decoding is Kodiak/QCM6490-specific, and the
thermal-bin mapping needs both values. Other/future targets are expected
to use only the generic i-temp fuse bit, like Hamoa.
So there are variants of kodiak that ""incorrectly"" set the feat_id?
No, Kodiak is not incorrectly setting it.
Kodiak/QCM6490 does not use the generic i-temp bit for this thermal
profile selection, it is using feat id only for high TJ profile. The i-temp path is for Hamoa/future targets where the thermal bin is exposed
as single bit.
Konrad