summaryrefslogtreecommitdiffstats
path: root/Documentation/devicetree/bindings/thermal/rcar-gen3-thermal.yaml
blob: 6a81cb6e11bc1e149af6152977239ac9c6a5b883 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
# SPDX-License-Identifier: GPL-2.0-only
# Copyright (C) 2020 Renesas Electronics Corp.
%YAML 1.2
---
$id: http://devicetree.org/schemas/thermal/rcar-gen3-thermal.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Renesas R-Car Gen3 Thermal Sensor

description:
  On most R-Car Gen3 and later SoCs, the thermal sensor controllers (TSC)
  control the thermal sensors (THS) which are the analog circuits for
  measuring temperature (Tj) inside the LSI.

maintainers:
  - Niklas Söderlund <niklas.soderlund@ragnatech.se>

properties:
  compatible:
    enum:
      - renesas,r8a774a1-thermal # RZ/G2M
      - renesas,r8a774b1-thermal # RZ/G2N
      - renesas,r8a774e1-thermal # RZ/G2H
      - renesas,r8a7795-thermal  # R-Car H3
      - renesas,r8a7796-thermal  # R-Car M3-W
      - renesas,r8a77961-thermal # R-Car M3-W+
      - renesas,r8a77965-thermal # R-Car M3-N
      - renesas,r8a77980-thermal # R-Car V3H
      - renesas,r8a779a0-thermal # R-Car V3U
      - renesas,r8a779f0-thermal # R-Car S4-8
      - renesas,r8a779g0-thermal # R-Car V4H
      - renesas,r8a779h0-thermal # R-Car V4M

  reg: true

  interrupts:
    items:
      - description: TEMP1 interrupt
      - description: TEMP2 interrupt
      - description: TEMP3 interrupt

  clocks:
    maxItems: 1

  power-domains:
    maxItems: 1

  resets:
    maxItems: 1

  "#thermal-sensor-cells":
    const: 1

required:
  - compatible
  - reg
  - clocks
  - power-domains
  - resets
  - "#thermal-sensor-cells"

if:
  properties:
    compatible:
      contains:
        enum:
          - renesas,r8a779a0-thermal
then:
  properties:
    reg:
      items:
        - description: TSC0 registers
        - description: TSC1 registers
        - description: TSC2 registers
        - description: TSC3 registers
        - description: TSC4 registers
else:
  properties:
    reg:
      minItems: 2
      items:
        - description: TSC1 registers
        - description: TSC2 registers
        - description: TSC3 registers
        - description: TSC4 registers
  if:
    not:
      properties:
        compatible:
          contains:
            enum:
              - renesas,r8a779f0-thermal
              - renesas,r8a779g0-thermal
              - renesas,r8a779h0-thermal
  then:
    required:
      - interrupts

additionalProperties: false

examples:
  - |
    #include <dt-bindings/clock/r8a7795-cpg-mssr.h>
    #include <dt-bindings/interrupt-controller/arm-gic.h>
    #include <dt-bindings/power/r8a7795-sysc.h>

    tsc: thermal@e6198000 {
            compatible = "renesas,r8a7795-thermal";
            reg = <0xe6198000 0x100>,
                  <0xe61a0000 0x100>,
                  <0xe61a8000 0x100>;
            interrupts = <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>,
                         <GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>,
                         <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>;
            clocks = <&cpg CPG_MOD 522>;
            power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
            resets = <&cpg 522>;
            #thermal-sensor-cells = <1>;
    };

    thermal-zones {
            sensor_thermal: sensor-thermal {
                    polling-delay-passive = <250>;
                    polling-delay = <1000>;
                    thermal-sensors = <&tsc 0>;

                    trips {
                            sensor1_crit: sensor1-crit {
                                    temperature = <90000>;
                                    hysteresis = <2000>;
                                    type = "critical";
                            };
                    };
            };
    };
  - |
    #include <dt-bindings/clock/r8a779a0-cpg-mssr.h>
    #include <dt-bindings/interrupt-controller/arm-gic.h>
    #include <dt-bindings/power/r8a779a0-sysc.h>

    tsc_r8a779a0: thermal@e6190000 {
            compatible = "renesas,r8a779a0-thermal";
            reg = <0xe6190000 0x200>,
                  <0xe6198000 0x200>,
                  <0xe61a0000 0x200>,
                  <0xe61a8000 0x200>,
                  <0xe61b0000 0x200>;
            clocks = <&cpg CPG_MOD 919>;
            power-domains = <&sysc R8A779A0_PD_ALWAYS_ON>;
            resets = <&cpg 919>;
            #thermal-sensor-cells = <1>;
    };