# Customize

For optimal performance of your product or application, it is important
to customize and control its thermal behavior. You can configure a new
thermal zone for a newly added external thermistor to control the
surface temperature of Qualcomm Linux.

The following sample code shows how to configure a thermal zone using a
device tree.

In the example, a temperature threshold of 50°C is monitored and
mitigation is applied on the CPU cooling devices.

Note

By default a stepwise thermal governor is configured.

## Configure a new thermal zone

Parameters that are specific to the thermal zone are explained in
[index:
kernel/git/torvalds/linux.git](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/thermal/thermal-zones.yaml?h=v6.6).

thermal-zones {
        <thermal zone name> {
            polling-delay-passive = <2000>;
            polling-delay = <0>;
            thermal-sensors = < thermal sensor phandle and sensor specifier used to monitor this thermal zone>;
            trips {
                trip0: apc-trip {
                    temperature = <50000>;  /*Threshold to trigger thermal mitigation */
                    hysteresis = <2000>;    /*The offset of clear threshold, the clear threshold is 48000 */
                };
            };
            cooling-maps {
                map0 {
                     trip = <&apc_trip>;
                     cooling-device = <&cpufreq-cpu4 THERMAL_NO_LIMIT 5>; /* Reduce Gold cluster CPU fmax freq by 5 levels */
                };
            };
        };
    };
    Copy to clipboard

Last Published: Jan 26, 2025

[Previous Topic
Notification to user space](https://docs.qualcomm.com/bundle/publicresource/80-70017-30/topics/notificationtouserspace.md) [Next Topic
Debug](https://docs.qualcomm.com/bundle/publicresource/80-70017-30/topics/thermal-debug.md)