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