thermal: qcom: tsens: Allow number of sensors to come from DT
[muen/linux.git] / Documentation / devicetree / bindings / thermal / rcar-gen3-thermal.txt
1 * DT bindings for Renesas R-Car Gen3 Thermal Sensor driver
2
3 On R-Car Gen3 SoCs, the thermal sensor controllers (TSC) control the thermal
4 sensors (THS) which are the analog circuits for measuring temperature (Tj)
5 inside the LSI.
6
7 Required properties:
8 - compatible            : "renesas,<soctype>-thermal",
9                           Examples with soctypes are:
10                             - "renesas,r8a7795-thermal" (R-Car H3)
11                             - "renesas,r8a7796-thermal" (R-Car M3-W)
12                             - "renesas,r8a77965-thermal" (R-Car M3-N)
13 - reg                   : Address ranges of the thermal registers. Each sensor
14                           needs one address range. Sorting must be done in
15                           increasing order according to datasheet, i.e.
16                           TSC1, TSC2, ...
17 - clocks                : Must contain a reference to the functional clock.
18 - #thermal-sensor-cells : must be <1>.
19
20 Optional properties:
21
22 - interrupts           : interrupts routed to the TSC (3 for H3, M3-W and M3-N)
23 - power-domain          : Must contain a reference to the power domain. This
24                           property is mandatory if the thermal sensor instance
25                           is part of a controllable power domain.
26
27 Example:
28
29         tsc: thermal@e6198000 {
30                 compatible = "renesas,r8a7795-thermal";
31                 reg = <0 0xe6198000 0 0x68>,
32                       <0 0xe61a0000 0 0x5c>,
33                       <0 0xe61a8000 0 0x5c>;
34                 interrupts = <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>,
35                              <GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>,
36                              <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>;
37                 clocks = <&cpg CPG_MOD 522>;
38                 power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
39                 #thermal-sensor-cells = <1>;
40         };
41
42         thermal-zones {
43                 sensor_thermal1: sensor-thermal1 {
44                         polling-delay-passive = <250>;
45                         polling-delay = <1000>;
46                         thermal-sensors = <&tsc 0>;
47
48                         trips {
49                                 sensor1_crit: sensor1-crit {
50                                         temperature = <90000>;
51                                         hysteresis = <2000>;
52                                         type = "critical";
53                                 };
54                         };
55                 };
56         };