of thermal

By describing the relationships of the modules among thermal zone, thermal sensor, trip point, and cooling device in the DTS file following a standard format, the of-thermal module will automatically register the DTS information and maintain the logic relations to reduce code complexity.

The following code block provides a thermal node of JH7110.
thermal-zones {
            cpu-thermal {
                polling-delay-passive = <250>;
                polling-delay = <15000>;

                thermal-sensors = <&sfctemp>;

                trips {
                    cpu_alert0: cpu_alert0 {
                        /* milliCelsius */
                        temperature = <85000>;
                        hysteresis = <2000>;
                        type = "passive";
                    };

                    cpu_crit: cpu_crit {
                        /* milliCelsius */
                        temperature = <100000>;
                        hysteresis = <2000>;
                        type = "critical";
                    };
                };

                cooling-maps {
                    map0 {
                        trip = <&cpu_alert0>;
                        cooling-device =
                            <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
                            <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
                            <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
                            <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
                    };
                };
            };
        };