============================================= Thermal management (tsens, zones, mitigation) ============================================= The SoC's thermal subsystem spans hardware (on-die temperature sensors and PMIC ADC thermistor channels), the kernel (95 device-tree thermal zones and two governors), and firmware throttle actors that were documented per-subsystem elsewhere — LMh on the CPU clusters (:doc:`/boot/base-dtb`), the AOP DDR manager (:doc:`/soc/aop`), and the CDSP HVX/sysmon throttle (:doc:`/audio/dsp-firmware`). This page ties those together into the thermal control loop. All addresses, zone names, sensor bindings and trip temperatures are read directly from ``artifacts/boot_a/board.dts``; the userspace ``thermal-engine`` daemon that consumes the monitor zones is out of scope (it is HLOS userspace) and is noted only as the reader of those zones. Temperature sensors =================== Two kinds of sensor feed the zones: **On-die TSENS** — two ``qcom,tsens24xx`` controllers, each a SROT + TM register pair, up to 16 sensors, with upper/lower, critical and 0 °C interrupts: .. list-table:: :header-rows: 1 :widths: 16 36 20 28 * - Controller - Registers (SROT / TM) - phandle - Notes * - tsens0 - ``0xc222000`` / ``0xc263000`` - ``0x3a`` - ``0C-sensor-num = 16``, ``tsens-reinit-wa`` * - tsens1 - ``0xc223000`` / ``0xc265000`` - ``0x3b`` - ``0C-sensor-num = 16``, ``tsens-reinit-wa`` Zones reference these as ``thermal-sensors = <0x3a N>`` (tsens0, sensor N) or ``<0x3b N>`` (tsens1). TSENS measures the silicon (CPU/GPU/DSP/DDR/AOSS dies). **PMIC ADC thermal-monitor** — ``qcom,adc-tm5`` (phandle ``0x58``, PMIC register ``0x3500``) exposes board **thermistor** channels through the PMIC's VADC (``io-channels`` e.g. ``0x4d``, ``0x4f``). The board/skin zones (``chg-skin-therm``, ``conn-therm``, ``sdm-skin-therm``, …) read these — physical NTCs on the PCB, not die sensors. See :doc:`/soc/pmic`. Thermal-zone taxonomy ===================== The ``thermal-zones`` node defines **95 zones**. Almost every heat-producing IP has a pair — a ``*-usr`` monitor zone and a ``*-step`` mitigation zone — plus the board thermistor zones. Categories: .. list-table:: :header-rows: 1 :widths: 24 30 46 * - Group - Zones (examples) - Sensed thing * - CPU cores - ``cpu-0-0``…``cpu-0-5`` (little), ``cpu-1-0``…``cpu-1-3`` (big), ``cpuss-0/1`` - per-core die temp of the 6+2 Kryo 660 cores (:doc:`/boot/base-dtb`) * - GPU - ``gpuss-0``, ``gpuss-1``, ``gpuss-max-step`` - Adreno GPU die * - DSP / compute - ``q6-hvx``, ``npu``, ``video``, ``camera``, ``audio`` - CDSP HVX, NPU, Venus, camera, ADSP audio * - Memory / always-on - ``ddr``, ``aoss-0``, ``aoss-1`` - DRAM die (AOP-managed) and the always-on subsystem * - Connectivity - ``cwlan`` - WCN3990 combo (:doc:`/wireless/bluetooth`) * - Board thermistors - ``chg-skin-therm``, ``conn-therm``, ``sdm-skin-therm``, ``rfc-cam-pa3`` - PCB skin/connector NTCs via PMIC ADC-TM5 * - Modem (dormant) - ``modem-mmw0``…``mmw3``, ``modem-pa``, ``mdm-core-0/1``, ``mdm-vec``, ``mdm-scl``, ``modem-wifi``, ``modem-ambient`` … - stock SM6350 modem/mmWave RF thermal zones — **unpopulated** (no cellular RF), the same reference-base leftovers as the RF assets in :doc:`/audio/dsp-firmware` The dormant ``modem-*`` set is the single largest category of thermal zones. Monitoring vs. mitigation — the two governors ============================================= Each actor typically has two zones on the **same** sensor, differing only in governor: ``*-usr`` — ``thermal-governor = "user_space"`` High trips (**115 °C** ``reset-mon-cfg`` / **125 °C** ``active-config0``, ``type = "passive"``), reported to the HLOS ``thermal-engine`` for policy. These are notification/monitor points, no in-kernel action. Example — ``cpu-0-0-usr`` on tsens0 sensor 1; ``ddr-usr`` on tsens1 sensor 3. ``*-step`` — ``thermal-governor = "step_wise"`` Lower trips (**95–110 °C**) that the **in-kernel** step-wise governor acts on directly by driving a bound **cooling device**. This is the automatic below-userspace mitigation. The cooling device each ``-step`` zone drives: .. list-table:: :header-rows: 1 :widths: 22 16 62 * - ``-step`` zone - Trip - Cooling device (throttle actor) * - ``cpu-0-0-step`` … per-core - 110 °C - the per-core CPU cooling device (cpufreq DCVS / core-isolation, e.g. ``cpu0-isolate`` phandle ``0x3f``) — backstopped in hardware by **LMh** (:doc:`/boot/base-dtb`) * - ``gpuss-max-step`` - 95 °C - Adreno GPU DCVS (GPU node phandle ``0x3d``) * - ``q6-hvx-step`` - 95–100 °C - a cascade from one compute sensor (tsens1 #4): **CDSP** DCVS (``0x53``), **NPU** (``0x57``), **GPU** (``0x3d``), CXIP limiter (``0x51``) and the (dormant) modem-PA/Tj devices — the CDSP side is the ``libsysmonhvxthrottle`` HVX clock throttle (:doc:`/audio/dsp-firmware`) (DDR has no ``-step`` cooling-map: DRAM thermal mitigation is done by the **AOP** DDR manager's own frequency/self-refresh control, ``ddr_temp`` in :doc:`/soc/aop`, not by the kernel governor.) The below-userspace thermal loop ================================ The closed loop that runs without any userspace involvement: 1. **Sense** — TSENS (die) / PMIC ADC-TM5 (board) sample temperature and raise threshold interrupts. 2. **Decide** — the kernel ``step_wise`` governor evaluates the ``-step`` zones' passive trips. 3. **Throttle** — it drives the bound cooling device, whose real effect is in firmware/hardware: **LMh** clamps CPU-cluster frequency (:doc:`/boot/base-dtb`), the **AOP** scales DDR (:doc:`/soc/aop`), the **CDSP** throttles HVX clocks (:doc:`/audio/dsp-firmware`), and GPU/NPU DCVS drop their operating points. The ``-usr`` zones run in parallel at higher trips purely to hand telemetry to the userspace policy daemon; the protective floor is the in-kernel/firmware path above. Provenance ========== :Source: ``artifacts/boot_a/board.dts`` — the ``tsens@c222000`` / ``tsens@c223000`` controllers, ``qcom,adc-tm5`` (phandle ``0x58``), and the ``thermal-zones`` node (95 zones: sensor bindings, ``trips`` temperatures, ``cooling-maps``). :Method: Node/zone enumeration and phandle resolution (sensors ``0x3a``/``0x3b``, cooling devices ``0x3d`` GPU, ``0x53`` CDSP, ``0x3f`` cpu-isolate, ``0x58`` ADC-TM5); millidegree trip values converted to °C. No code executed. :Cross-refs: :doc:`/boot/base-dtb` (LMh CPU limiter, CPU topology), :doc:`/soc/aop` (AOP DDR thermal manager), :doc:`/audio/dsp-firmware` (CDSP HVX/sysmon throttle, ADSP ``/therm/sensor``, modem/RF leftovers), :doc:`/soc/pmic` (PMIC ADC thermistor channels), :doc:`/wireless/bluetooth` (WCN3990 ``cwlan`` zone).