^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) * ZTE zx2967 family Thermal
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) Required Properties:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) - compatible: should be one of the following.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) * zte,zx296718-thermal
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) - reg: physical base address of the controller and length of memory mapped
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) region.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) - clocks : Pairs of phandle and specifier referencing the controller's clocks.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) - clock-names: "topcrm" for the topcrm clock.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) "apb" for the apb clock.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) - #thermal-sensor-cells: must be 0.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) Please note: slope coefficient defined in thermal-zones section need to be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) multiplied by 1000.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) Example for tempsensor:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) tempsensor: tempsensor@148a000 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) compatible = "zte,zx296718-thermal";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) reg = <0x0148a000 0x20>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) clocks = <&topcrm TEMPSENSOR_GATE>, <&audiocrm AUDIO_TS_PCLK>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) clock-names = "topcrm", "apb";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) #thermal-sensor-cells = <0>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) Example for cooling device:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) cooling_dev: cooling_dev {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) cluster0_cooling_dev: cluster0-cooling-dev {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) #cooling-cells = <2>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) cpumask = <0xf>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) capacitance = <1500>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) cluster1_cooling_dev: cluster1-cooling-dev {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) #cooling-cells = <2>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) cpumask = <0x30>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) capacitance = <2000>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) Example for thermal zones:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) thermal-zones {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) zx296718_thermal: zx296718_thermal {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) polling-delay-passive = <500>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) polling-delay = <1000>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) sustainable-power = <6500>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) thermal-sensors = <&tempsensor 0>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) * slope need to be multiplied by 1000.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) coefficients = <1951 (-922)>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) trips {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) trip0: switch_on_temperature {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) temperature = <90000>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) hysteresis = <2000>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) type = "passive";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) trip1: desired_temperature {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) temperature = <100000>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) hysteresis = <2000>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) type = "passive";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69) crit: critical_temperature {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70) temperature = <110000>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) hysteresis = <2000>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72) type = "critical";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76) cooling-maps {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77) map0 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78) trip = <&trip0>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79) cooling-device = <&gpu 2 5>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82) map1 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83) trip = <&trip0>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84) cooling-device = <&cluster0_cooling_dev 1 2>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 86)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 87) map2 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 88) trip = <&trip1>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 89) cooling-device = <&cluster0_cooling_dev 1 2>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 90) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 91)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 92) map3 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 93) trip = <&crit>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 94) cooling-device = <&cluster0_cooling_dev 1 2>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 95) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 96)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 97) map4 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 98) trip = <&trip0>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 99) cooling-device = <&cluster1_cooling_dev 1 2>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) contribution = <9000>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) map5 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) trip = <&trip1>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) cooling-device = <&cluster1_cooling_dev 1 2>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) contribution = <4096>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) map6 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) trip = <&crit>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) cooling-device = <&cluster1_cooling_dev 1 2>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) contribution = <4096>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) };