[PATCH 0/2] arm64: dts: qcom: sm6125: add TSENS die temperature sensing

Roman Linev <[email protected]>
Newsgroups org.kernel.vger.linux-pm,org.kernel.vger.linux-arm-msm,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
SM6125 has a TSENS v2 block that mainline does not describe, so the SoC
has no die temperature sensing: on a stock kernel the only thermal zones
on an SM6125 board are the handful backed by PMIC ADC channels.

The block needs no new driver code. Its register and interrupt layout is
identical to SM6115's and, being v2, it self-calibrates and needs no
qfprom nvmem cells, so it binds through the existing qcom,tsens-v2
fallback. Patch 1 documents the SoC-specific compatible; patch 2 adds the
controller and the thermal zones.

Sensor-to-zone mapping was taken from the downstream device tree for the
Xiaomi Mi A3 (laurel_sprout) and cross-checked against sm6115.dtsi, which
agrees on every sensor the two have in common (2, 3, 4, 13, 14 and 15).
Sensor 5 is not referenced downstream and is left out, so 15 of the 16
sensors get zones.

No cooling devices are referenced, since SM6125 has no GPU node upstream
yet. The zones report temperature and carry passive and critical trips;
a cooling map for gpu-thermal can follow alongside the GPU node.

Tested on a Xiaomi Mi A3: tsens0 binds at 4411000.thermal-sensor with no
dmesg output, the thermal zone count goes from 5 to 20, and the 15 new
die zones read 37.7-39.6 degrees Celsius at idle. Under a 660 s
glmark2-es2-drm soak the hottest zone reached 52.2 degrees Celsius
against its 85 degrees Celsius passive trip.

Both SM6125 boards (laurel-sprout and ginkgo) compile with no new dtc
warnings: pristine master emits 7 unique_unit_address warnings on the
geniqup nodes, and the series emits the same 7.

I have no other SM6125 board to test on, so the zone naming beyond the
sensors shared with SM6115 rests on the downstream device tree.

Roman Linev (2):
  dt-bindings: thermal: qcom-tsens: add qcom,sm6125-tsens
  arm64: dts: qcom: sm6125: add TSENS and thermal zones

 .../bindings/thermal/qcom-tsens.yaml          |   1 +
 arch/arm64/boot/dts/qcom/sm6125.dtsi          | 299 ++++++++++++++++++
 2 files changed, 300 insertions(+)

-- 
2.55.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.