Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
[sfrench/cifs-2.6.git] / Documentation / devicetree / bindings / thermal / rockchip-thermal.txt
1 * Temperature Sensor ADC (TSADC) on rockchip SoCs
2
3 Required properties:
4 - compatible : should be "rockchip,<name>-tsadc"
5    "rockchip,rk3228-tsadc": found on RK3228 SoCs
6    "rockchip,rk3288-tsadc": found on RK3288 SoCs
7    "rockchip,rk3328-tsadc": found on RK3328 SoCs
8    "rockchip,rk3368-tsadc": found on RK3368 SoCs
9    "rockchip,rk3399-tsadc": found on RK3399 SoCs
10 - reg : physical base address of the controller and length of memory mapped
11         region.
12 - interrupts : The interrupt number to the cpu. The interrupt specifier format
13                depends on the interrupt controller.
14 - clocks : Must contain an entry for each entry in clock-names.
15 - clock-names : Shall be "tsadc" for the converter-clock, and "apb_pclk" for
16                 the peripheral clock.
17 - resets : Must contain an entry for each entry in reset-names.
18            See ../reset/reset.txt for details.
19 - reset-names : Must include the name "tsadc-apb".
20 - pinctrl-names : The pin control state names;
21 - pinctrl-0 : The "init" pinctrl state, it will be set before device probe.
22 - pinctrl-1 : The "default" pinctrl state, it will be set after reset the
23               TSADC controller.
24 - pinctrl-2 : The "sleep" pinctrl state, it will be in for suspend.
25 - #thermal-sensor-cells : Should be 1. See ./thermal.txt for a description.
26
27 Optional properties:
28 - rockchip,hw-tshut-temp : The hardware-controlled shutdown temperature value.
29 - rockchip,hw-tshut-mode : The hardware-controlled shutdown mode 0:CRU 1:GPIO.
30 - rockchip,hw-tshut-polarity : The hardware-controlled active polarity 0:LOW
31                                1:HIGH.
32 - rockchip,grf : The phandle of the syscon node for the general register file.
33
34 Exiample:
35 tsadc: tsadc@ff280000 {
36         compatible = "rockchip,rk3288-tsadc";
37         reg = <0xff280000 0x100>;
38         interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
39         clocks = <&cru SCLK_TSADC>, <&cru PCLK_TSADC>;
40         clock-names = "tsadc", "apb_pclk";
41         resets = <&cru SRST_TSADC>;
42         reset-names = "tsadc-apb";
43         pinctrl-names = "init", "default", "sleep";
44         pinctrl-0 = <&otp_gpio>;
45         pinctrl-1 = <&otp_out>;
46         pinctrl-2 = <&otp_gpio>;
47         #thermal-sensor-cells = <1>;
48         rockchip,hw-tshut-temp = <95000>;
49         rockchip,hw-tshut-mode = <0>;
50         rockchip,hw-tshut-polarity = <0>;
51 };
52
53 Example: referring to thermal sensors:
54 thermal-zones {
55         cpu_thermal: cpu_thermal {
56                 polling-delay-passive = <1000>; /* milliseconds */
57                 polling-delay = <5000>; /* milliseconds */
58
59                 /* sensor       ID */
60                 thermal-sensors = <&tsadc       1>;
61
62                 trips {
63                         cpu_alert0: cpu_alert {
64                                 temperature = <70000>; /* millicelsius */
65                                 hysteresis = <2000>; /* millicelsius */
66                                 type = "passive";
67                         };
68                         cpu_crit: cpu_crit {
69                                 temperature = <90000>; /* millicelsius */
70                                 hysteresis = <2000>; /* millicelsius */
71                                 type = "critical";
72                         };
73                 };
74
75                 cooling-maps {
76                         map0 {
77                                 trip = <&cpu_alert0>;
78                                 cooling-device =
79                                     <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
80                         };
81                 };
82         };
83 };