xref: /freebsd/sys/contrib/device-tree/Bindings/thermal/nvidia,tegra124-soctherm.yaml (revision 0e8011faf58b743cc652e3b2ad0f7671227610df)
1aa1a8ff2SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2aa1a8ff2SEmmanuel Vadot%YAML 1.2
3aa1a8ff2SEmmanuel Vadot---
4aa1a8ff2SEmmanuel Vadot$id: http://devicetree.org/schemas/thermal/nvidia,tegra124-soctherm.yaml#
5aa1a8ff2SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6aa1a8ff2SEmmanuel Vadot
7aa1a8ff2SEmmanuel Vadottitle: NVIDIA Tegra124 SOCTHERM Thermal Management System
8aa1a8ff2SEmmanuel Vadot
9aa1a8ff2SEmmanuel Vadotmaintainers:
10aa1a8ff2SEmmanuel Vadot  - Thierry Reding <thierry.reding@gmail.com>
11aa1a8ff2SEmmanuel Vadot  - Jon Hunter <jonathanh@nvidia.com>
12aa1a8ff2SEmmanuel Vadot
13aa1a8ff2SEmmanuel Vadotdescription: The SOCTHERM IP block contains thermal sensors, support for
14aa1a8ff2SEmmanuel Vadot  polled or interrupt-based thermal monitoring, CPU and GPU throttling based
15aa1a8ff2SEmmanuel Vadot  on temperature trip points, and handling external overcurrent notifications.
16aa1a8ff2SEmmanuel Vadot  It is also used to manage emergency shutdown in an overheating situation.
17aa1a8ff2SEmmanuel Vadot
18aa1a8ff2SEmmanuel Vadotproperties:
19aa1a8ff2SEmmanuel Vadot  compatible:
20aa1a8ff2SEmmanuel Vadot    enum:
21aa1a8ff2SEmmanuel Vadot      - nvidia,tegra124-soctherm
22aa1a8ff2SEmmanuel Vadot      - nvidia,tegra132-soctherm
23aa1a8ff2SEmmanuel Vadot      - nvidia,tegra210-soctherm
24aa1a8ff2SEmmanuel Vadot
25aa1a8ff2SEmmanuel Vadot  reg:
26aa1a8ff2SEmmanuel Vadot    maxItems: 2
27aa1a8ff2SEmmanuel Vadot
28aa1a8ff2SEmmanuel Vadot  reg-names:
29aa1a8ff2SEmmanuel Vadot    maxItems: 2
30aa1a8ff2SEmmanuel Vadot
31aa1a8ff2SEmmanuel Vadot  interrupts:
32aa1a8ff2SEmmanuel Vadot    items:
33aa1a8ff2SEmmanuel Vadot      - description: module interrupt
34aa1a8ff2SEmmanuel Vadot      - description: EDP interrupt
35aa1a8ff2SEmmanuel Vadot
36aa1a8ff2SEmmanuel Vadot  interrupt-names:
37aa1a8ff2SEmmanuel Vadot    items:
38aa1a8ff2SEmmanuel Vadot      - const: thermal
39aa1a8ff2SEmmanuel Vadot      - const: edp
40aa1a8ff2SEmmanuel Vadot
41aa1a8ff2SEmmanuel Vadot  clocks:
42aa1a8ff2SEmmanuel Vadot    items:
43aa1a8ff2SEmmanuel Vadot      - description: thermal sensor clock
44aa1a8ff2SEmmanuel Vadot      - description: module clock
45aa1a8ff2SEmmanuel Vadot
46aa1a8ff2SEmmanuel Vadot  clock-names:
47aa1a8ff2SEmmanuel Vadot    items:
48aa1a8ff2SEmmanuel Vadot      - const: tsensor
49aa1a8ff2SEmmanuel Vadot      - const: soctherm
50aa1a8ff2SEmmanuel Vadot
51aa1a8ff2SEmmanuel Vadot  resets:
52aa1a8ff2SEmmanuel Vadot    items:
53aa1a8ff2SEmmanuel Vadot      - description: module reset
54aa1a8ff2SEmmanuel Vadot
55aa1a8ff2SEmmanuel Vadot  reset-names:
56aa1a8ff2SEmmanuel Vadot    items:
57aa1a8ff2SEmmanuel Vadot      - const: soctherm
58aa1a8ff2SEmmanuel Vadot
59aa1a8ff2SEmmanuel Vadot  "#thermal-sensor-cells":
60aa1a8ff2SEmmanuel Vadot    const: 1
61aa1a8ff2SEmmanuel Vadot
62aa1a8ff2SEmmanuel Vadot  throttle-cfgs:
63aa1a8ff2SEmmanuel Vadot    $ref: thermal-cooling-devices.yaml
64aa1a8ff2SEmmanuel Vadot    description: A sub-node which is a container of configuration for each
65aa1a8ff2SEmmanuel Vadot      hardware throttle events. These events can be set as cooling devices.
66aa1a8ff2SEmmanuel Vadot      Throttle event sub-nodes must be named as "light" or "heavy".
67aa1a8ff2SEmmanuel Vadot    unevaluatedProperties: false
68aa1a8ff2SEmmanuel Vadot    patternProperties:
69aa1a8ff2SEmmanuel Vadot      "^(light|heavy|oc1)$":
70aa1a8ff2SEmmanuel Vadot        type: object
71*84943d6fSEmmanuel Vadot        additionalProperties: false
72*84943d6fSEmmanuel Vadot
73aa1a8ff2SEmmanuel Vadot        properties:
74*84943d6fSEmmanuel Vadot          "#cooling-cells":
75*84943d6fSEmmanuel Vadot            const: 2
76*84943d6fSEmmanuel Vadot
77aa1a8ff2SEmmanuel Vadot          nvidia,priority:
78aa1a8ff2SEmmanuel Vadot            $ref: /schemas/types.yaml#/definitions/uint32
79aa1a8ff2SEmmanuel Vadot            minimum: 1
80aa1a8ff2SEmmanuel Vadot            maximum: 100
81aa1a8ff2SEmmanuel Vadot            description: Each throttles has its own throttle settings, so the
82aa1a8ff2SEmmanuel Vadot              SW need to set priorities for various throttle, the HW arbiter
83aa1a8ff2SEmmanuel Vadot              can select the final throttle settings. Bigger value indicates
84aa1a8ff2SEmmanuel Vadot              higher priority, In general, higher priority translates to lower
85aa1a8ff2SEmmanuel Vadot              target frequency. SW needs to ensure that critical thermal
86aa1a8ff2SEmmanuel Vadot              alarms are given higher priority, and ensure that there is no
87aa1a8ff2SEmmanuel Vadot              race if priority of two vectors is set to the same value.
88aa1a8ff2SEmmanuel Vadot
89aa1a8ff2SEmmanuel Vadot          nvidia,cpu-throt-percent:
90aa1a8ff2SEmmanuel Vadot            description: This property is for Tegra124 and Tegra210. It is the
91aa1a8ff2SEmmanuel Vadot              throttling depth of pulse skippers, it's the percentage
92aa1a8ff2SEmmanuel Vadot              throttling.
93aa1a8ff2SEmmanuel Vadot            minimum: 0
94aa1a8ff2SEmmanuel Vadot            maximum: 100
95aa1a8ff2SEmmanuel Vadot
96aa1a8ff2SEmmanuel Vadot          nvidia,cpu-throt-level:
97aa1a8ff2SEmmanuel Vadot            $ref: /schemas/types.yaml#/definitions/uint32
98aa1a8ff2SEmmanuel Vadot            description: This property is only for Tegra132, it is the level
99aa1a8ff2SEmmanuel Vadot              of pulse skippers, which used to throttle clock frequencies. It
100aa1a8ff2SEmmanuel Vadot              indicates cpu clock throttling depth, and the depth can be
101aa1a8ff2SEmmanuel Vadot              programmed.
102aa1a8ff2SEmmanuel Vadot            enum:
103aa1a8ff2SEmmanuel Vadot              # none (TEGRA_SOCTHERM_THROT_LEVEL_NONE)
104aa1a8ff2SEmmanuel Vadot              - 0
105aa1a8ff2SEmmanuel Vadot              # low (TEGRA_SOCTHERM_THROT_LEVEL_LOW)
106aa1a8ff2SEmmanuel Vadot              - 1
107aa1a8ff2SEmmanuel Vadot              # medium (TEGRA_SOCTHERM_THROT_LEVEL_MED)
108aa1a8ff2SEmmanuel Vadot              - 2
109aa1a8ff2SEmmanuel Vadot              # high (TEGRA_SOCTHERM_THROT_LEVEL_HIGH)
110aa1a8ff2SEmmanuel Vadot              - 3
111aa1a8ff2SEmmanuel Vadot
112aa1a8ff2SEmmanuel Vadot          nvidia,gpu-throt-level:
113aa1a8ff2SEmmanuel Vadot            $ref: /schemas/types.yaml#/definitions/uint32
114aa1a8ff2SEmmanuel Vadot            description: This property is for Tegra124 and Tegra210. It is the
115aa1a8ff2SEmmanuel Vadot              level of pulse skippers, which used to throttle clock
116aa1a8ff2SEmmanuel Vadot              frequencies. It indicates gpu clock throttling depth and can be
117aa1a8ff2SEmmanuel Vadot              programmed to any of the following values which represent a
118aa1a8ff2SEmmanuel Vadot              throttling percentage.
119aa1a8ff2SEmmanuel Vadot            enum:
120aa1a8ff2SEmmanuel Vadot              # none (0%, TEGRA_SOCTHERM_THROT_LEVEL_NONE)
121aa1a8ff2SEmmanuel Vadot              - 0
122aa1a8ff2SEmmanuel Vadot              # low (50%, TEGRA_SOCTHERM_THROT_LEVEL_LOW)
123aa1a8ff2SEmmanuel Vadot              - 1
124aa1a8ff2SEmmanuel Vadot              # medium (75%, TEGRA_SOCTHERM_THROT_LEVEL_MED)
125aa1a8ff2SEmmanuel Vadot              - 2
126aa1a8ff2SEmmanuel Vadot              # high (85%, TEGRA_SOCTHERM_THROT_LEVEL_HIGH)
127aa1a8ff2SEmmanuel Vadot              - 3
128aa1a8ff2SEmmanuel Vadot
129aa1a8ff2SEmmanuel Vadot          # optional
130aa1a8ff2SEmmanuel Vadot          # Tegra210 specific and valid only for OCx throttle events
131aa1a8ff2SEmmanuel Vadot          nvidia,count-threshold:
132aa1a8ff2SEmmanuel Vadot            $ref: /schemas/types.yaml#/definitions/uint32
133aa1a8ff2SEmmanuel Vadot            description: Specifies the number of OC events that are required
134aa1a8ff2SEmmanuel Vadot              for triggering an interrupt. Interrupts are not triggered if the
135aa1a8ff2SEmmanuel Vadot              property is missing. A value of 0 will interrupt on every OC
136aa1a8ff2SEmmanuel Vadot              alarm.
137aa1a8ff2SEmmanuel Vadot
138aa1a8ff2SEmmanuel Vadot          nvidia,polarity-active-low:
139aa1a8ff2SEmmanuel Vadot            $ref: /schemas/types.yaml#/definitions/flag
140aa1a8ff2SEmmanuel Vadot            description: Configures the polarity of the OC alaram signal. If
141aa1a8ff2SEmmanuel Vadot              present, this means assert low, otherwise assert high.
142aa1a8ff2SEmmanuel Vadot
143aa1a8ff2SEmmanuel Vadot          nvidia,alarm-filter:
144aa1a8ff2SEmmanuel Vadot            $ref: /schemas/types.yaml#/definitions/uint32
145aa1a8ff2SEmmanuel Vadot            description: Number of clocks to filter event. When the filter
146aa1a8ff2SEmmanuel Vadot              expires (which means the OC event has not occurred for a long
147aa1a8ff2SEmmanuel Vadot              time), the counter is cleared and filter is rearmed.
148aa1a8ff2SEmmanuel Vadot            default: 0
149aa1a8ff2SEmmanuel Vadot
150aa1a8ff2SEmmanuel Vadot          nvidia,throttle-period-us:
151aa1a8ff2SEmmanuel Vadot            description: Specifies the number of microseconds for which
152aa1a8ff2SEmmanuel Vadot              throttling is engaged after the OC event is deasserted.
153aa1a8ff2SEmmanuel Vadot            default: 0
154aa1a8ff2SEmmanuel Vadot
155aa1a8ff2SEmmanuel Vadot  # optional
156aa1a8ff2SEmmanuel Vadot  nvidia,thermtrips:
157aa1a8ff2SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32-matrix
158aa1a8ff2SEmmanuel Vadot    description: |
159aa1a8ff2SEmmanuel Vadot      When present, this property specifies the temperature at which the
160aa1a8ff2SEmmanuel Vadot      SOCTHERM hardware will assert the thermal trigger signal to the Power
161aa1a8ff2SEmmanuel Vadot      Management IC, which can be configured to reset or shutdown the device.
162aa1a8ff2SEmmanuel Vadot      It is an array of pairs where each pair represents a tsensor ID followed
163aa1a8ff2SEmmanuel Vadot      by a temperature in milli Celcius. In the absence of this property the
164aa1a8ff2SEmmanuel Vadot      critical trip point will be used for thermtrip temperature.
165aa1a8ff2SEmmanuel Vadot
166aa1a8ff2SEmmanuel Vadot      Note:
167aa1a8ff2SEmmanuel Vadot      - the "critical" type trip points will be used to set the temperature at
168aa1a8ff2SEmmanuel Vadot        which the SOCTHERM hardware will assert a thermal trigger if the
169aa1a8ff2SEmmanuel Vadot        "nvidia,thermtrips" property is missing.  When the thermtrips property
170aa1a8ff2SEmmanuel Vadot        is present, the breach of a critical trip point is reported back to
171aa1a8ff2SEmmanuel Vadot        the thermal framework to implement software shutdown.
172aa1a8ff2SEmmanuel Vadot
173aa1a8ff2SEmmanuel Vadot      - the "hot" type trip points will be set to SOCTHERM hardware as the
174aa1a8ff2SEmmanuel Vadot        throttle temperature.  Once the temperature of this thermal zone is
175aa1a8ff2SEmmanuel Vadot        higher than it, it will trigger the HW throttle event.
176aa1a8ff2SEmmanuel Vadot    items:
177aa1a8ff2SEmmanuel Vadot      items:
178aa1a8ff2SEmmanuel Vadot        - description: sensor ID
179aa1a8ff2SEmmanuel Vadot          oneOf:
180aa1a8ff2SEmmanuel Vadot            - description: CPU sensor
181aa1a8ff2SEmmanuel Vadot              const: 0
182aa1a8ff2SEmmanuel Vadot            - description: MEM sensor
183aa1a8ff2SEmmanuel Vadot              const: 1
184aa1a8ff2SEmmanuel Vadot            - description: GPU sensor
185aa1a8ff2SEmmanuel Vadot              const: 2
186aa1a8ff2SEmmanuel Vadot            - description: PLLX sensor
187aa1a8ff2SEmmanuel Vadot              const: 3
188aa1a8ff2SEmmanuel Vadot        - description: temperature threshold (in millidegree Celsius)
189aa1a8ff2SEmmanuel Vadot
190aa1a8ff2SEmmanuel Vadotrequired:
191aa1a8ff2SEmmanuel Vadot  - compatible
192aa1a8ff2SEmmanuel Vadot  - reg
193aa1a8ff2SEmmanuel Vadot  - reg-names
194aa1a8ff2SEmmanuel Vadot  - interrupts
195aa1a8ff2SEmmanuel Vadot  - interrupt-names
196aa1a8ff2SEmmanuel Vadot  - clocks
197aa1a8ff2SEmmanuel Vadot  - clock-names
198aa1a8ff2SEmmanuel Vadot  - resets
199aa1a8ff2SEmmanuel Vadot  - reset-names
200aa1a8ff2SEmmanuel Vadot
201aa1a8ff2SEmmanuel VadotallOf:
202aa1a8ff2SEmmanuel Vadot  - $ref: thermal-sensor.yaml
203aa1a8ff2SEmmanuel Vadot  - if:
204aa1a8ff2SEmmanuel Vadot      properties:
205aa1a8ff2SEmmanuel Vadot        compatible:
206aa1a8ff2SEmmanuel Vadot          contains:
207aa1a8ff2SEmmanuel Vadot            enum:
208aa1a8ff2SEmmanuel Vadot              - nvidia,tegra124-soctherm
209aa1a8ff2SEmmanuel Vadot              - nvidia,tegra210-soctherm
210aa1a8ff2SEmmanuel Vadot    then:
211aa1a8ff2SEmmanuel Vadot      properties:
212aa1a8ff2SEmmanuel Vadot        reg:
213aa1a8ff2SEmmanuel Vadot          items:
214aa1a8ff2SEmmanuel Vadot            - description: SOCTHERM register set
215aa1a8ff2SEmmanuel Vadot            - description: clock and reset controller registers
216aa1a8ff2SEmmanuel Vadot
217aa1a8ff2SEmmanuel Vadot        reg-names:
218aa1a8ff2SEmmanuel Vadot          items:
219aa1a8ff2SEmmanuel Vadot            - const: soctherm-reg
220aa1a8ff2SEmmanuel Vadot            - const: car-reg
221aa1a8ff2SEmmanuel Vadot
222aa1a8ff2SEmmanuel Vadot    else:
223aa1a8ff2SEmmanuel Vadot      properties:
224aa1a8ff2SEmmanuel Vadot        reg:
225aa1a8ff2SEmmanuel Vadot          items:
226aa1a8ff2SEmmanuel Vadot            - description: SOCTHERM register set
227aa1a8ff2SEmmanuel Vadot            - description: CCROC registers
228aa1a8ff2SEmmanuel Vadot
229aa1a8ff2SEmmanuel Vadot        reg-names:
230aa1a8ff2SEmmanuel Vadot          items:
231aa1a8ff2SEmmanuel Vadot            - const: soctherm-reg
232aa1a8ff2SEmmanuel Vadot            - const: ccroc-reg
233aa1a8ff2SEmmanuel Vadot
234aa1a8ff2SEmmanuel VadotadditionalProperties: false
235aa1a8ff2SEmmanuel Vadot
236aa1a8ff2SEmmanuel Vadotexamples:
237aa1a8ff2SEmmanuel Vadot  - |
238aa1a8ff2SEmmanuel Vadot    #include <dt-bindings/clock/tegra124-car.h>
239aa1a8ff2SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
240aa1a8ff2SEmmanuel Vadot    #include <dt-bindings/thermal/tegra124-soctherm.h>
241aa1a8ff2SEmmanuel Vadot
242aa1a8ff2SEmmanuel Vadot    soctherm@700e2000 {
243aa1a8ff2SEmmanuel Vadot        compatible = "nvidia,tegra124-soctherm";
244aa1a8ff2SEmmanuel Vadot        reg = <0x700e2000 0x600>, /* SOC_THERM reg_base */
245aa1a8ff2SEmmanuel Vadot              <0x60006000 0x400>; /* CAR reg_base */
246aa1a8ff2SEmmanuel Vadot        reg-names = "soctherm-reg", "car-reg";
247aa1a8ff2SEmmanuel Vadot        interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>,
248aa1a8ff2SEmmanuel Vadot                     <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>;
249aa1a8ff2SEmmanuel Vadot        interrupt-names = "thermal", "edp";
250aa1a8ff2SEmmanuel Vadot        clocks = <&tegra_car TEGRA124_CLK_TSENSOR>,
251aa1a8ff2SEmmanuel Vadot                 <&tegra_car TEGRA124_CLK_SOC_THERM>;
252aa1a8ff2SEmmanuel Vadot        clock-names = "tsensor", "soctherm";
253aa1a8ff2SEmmanuel Vadot        resets = <&tegra_car 78>;
254aa1a8ff2SEmmanuel Vadot        reset-names = "soctherm";
255aa1a8ff2SEmmanuel Vadot
256aa1a8ff2SEmmanuel Vadot        #thermal-sensor-cells = <1>;
257aa1a8ff2SEmmanuel Vadot
258aa1a8ff2SEmmanuel Vadot        nvidia,thermtrips = <TEGRA124_SOCTHERM_SENSOR_CPU 102500>,
259aa1a8ff2SEmmanuel Vadot                            <TEGRA124_SOCTHERM_SENSOR_GPU 103000>;
260aa1a8ff2SEmmanuel Vadot
261aa1a8ff2SEmmanuel Vadot        throttle-cfgs {
262aa1a8ff2SEmmanuel Vadot            /*
263aa1a8ff2SEmmanuel Vadot             * When the "heavy" cooling device triggered,
264aa1a8ff2SEmmanuel Vadot             * the HW will skip cpu clock's pulse in 85% depth,
265aa1a8ff2SEmmanuel Vadot             * skip gpu clock's pulse in 85% level
266aa1a8ff2SEmmanuel Vadot             */
267aa1a8ff2SEmmanuel Vadot            heavy {
268aa1a8ff2SEmmanuel Vadot                nvidia,priority = <100>;
269aa1a8ff2SEmmanuel Vadot                nvidia,cpu-throt-percent = <85>;
270aa1a8ff2SEmmanuel Vadot                nvidia,gpu-throt-level = <TEGRA_SOCTHERM_THROT_LEVEL_HIGH>;
271aa1a8ff2SEmmanuel Vadot
272aa1a8ff2SEmmanuel Vadot                #cooling-cells = <2>;
273aa1a8ff2SEmmanuel Vadot            };
274aa1a8ff2SEmmanuel Vadot
275aa1a8ff2SEmmanuel Vadot            /*
276aa1a8ff2SEmmanuel Vadot             * When the "light" cooling device triggered,
277aa1a8ff2SEmmanuel Vadot             * the HW will skip cpu clock's pulse in 50% depth,
278aa1a8ff2SEmmanuel Vadot             * skip gpu clock's pulse in 50% level
279aa1a8ff2SEmmanuel Vadot             */
280aa1a8ff2SEmmanuel Vadot            light {
281aa1a8ff2SEmmanuel Vadot                nvidia,priority = <80>;
282aa1a8ff2SEmmanuel Vadot                nvidia,cpu-throt-percent = <50>;
283aa1a8ff2SEmmanuel Vadot                nvidia,gpu-throt-level = <TEGRA_SOCTHERM_THROT_LEVEL_LOW>;
284aa1a8ff2SEmmanuel Vadot
285aa1a8ff2SEmmanuel Vadot                #cooling-cells = <2>;
286aa1a8ff2SEmmanuel Vadot            };
287aa1a8ff2SEmmanuel Vadot
288aa1a8ff2SEmmanuel Vadot            /*
289aa1a8ff2SEmmanuel Vadot             * If these two devices are triggered in same time, the HW throttle
290aa1a8ff2SEmmanuel Vadot             * arbiter will select the highest priority as the final throttle
291aa1a8ff2SEmmanuel Vadot             * settings to skip cpu pulse.
292aa1a8ff2SEmmanuel Vadot             */
293aa1a8ff2SEmmanuel Vadot
294aa1a8ff2SEmmanuel Vadot            oc1 {
295aa1a8ff2SEmmanuel Vadot                nvidia,priority = <50>;
296aa1a8ff2SEmmanuel Vadot                nvidia,polarity-active-low;
297aa1a8ff2SEmmanuel Vadot                nvidia,count-threshold = <100>;
298aa1a8ff2SEmmanuel Vadot                nvidia,alarm-filter = <5100000>;
299aa1a8ff2SEmmanuel Vadot                nvidia,throttle-period-us = <0>;
300aa1a8ff2SEmmanuel Vadot                nvidia,cpu-throt-percent = <75>;
301aa1a8ff2SEmmanuel Vadot                nvidia,gpu-throt-level = <TEGRA_SOCTHERM_THROT_LEVEL_MED>;
302aa1a8ff2SEmmanuel Vadot            };
303aa1a8ff2SEmmanuel Vadot        };
304aa1a8ff2SEmmanuel Vadot    };
305aa1a8ff2SEmmanuel Vadot
306aa1a8ff2SEmmanuel Vadot  # referring to Tegra132's "reg", "reg-names" and "throttle-cfgs"
307aa1a8ff2SEmmanuel Vadot  - |
308aa1a8ff2SEmmanuel Vadot    thermal-sensor@700e2000 {
309aa1a8ff2SEmmanuel Vadot        compatible = "nvidia,tegra132-soctherm";
310aa1a8ff2SEmmanuel Vadot        reg = <0x700e2000 0x600>, /* SOC_THERM reg_base */
311aa1a8ff2SEmmanuel Vadot              <0x70040000 0x200>; /* CCROC reg_base */
312aa1a8ff2SEmmanuel Vadot        reg-names = "soctherm-reg", "ccroc-reg";
313aa1a8ff2SEmmanuel Vadot        interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>,
314aa1a8ff2SEmmanuel Vadot                     <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>;
315aa1a8ff2SEmmanuel Vadot        interrupt-names = "thermal", "edp";
316aa1a8ff2SEmmanuel Vadot        clocks = <&tegra_car TEGRA124_CLK_TSENSOR>,
317aa1a8ff2SEmmanuel Vadot                 <&tegra_car TEGRA124_CLK_SOC_THERM>;
318aa1a8ff2SEmmanuel Vadot        clock-names = "tsensor", "soctherm";
319aa1a8ff2SEmmanuel Vadot        resets = <&tegra_car 78>;
320aa1a8ff2SEmmanuel Vadot        reset-names = "soctherm";
321aa1a8ff2SEmmanuel Vadot        #thermal-sensor-cells = <1>;
322aa1a8ff2SEmmanuel Vadot
323aa1a8ff2SEmmanuel Vadot        throttle-cfgs {
324aa1a8ff2SEmmanuel Vadot            /*
325aa1a8ff2SEmmanuel Vadot             * When the "heavy" cooling device triggered,
326aa1a8ff2SEmmanuel Vadot             * the HW will skip cpu clock's pulse in HIGH level
327aa1a8ff2SEmmanuel Vadot             */
328aa1a8ff2SEmmanuel Vadot            heavy {
329aa1a8ff2SEmmanuel Vadot                nvidia,priority = <100>;
330aa1a8ff2SEmmanuel Vadot                nvidia,cpu-throt-level = <TEGRA_SOCTHERM_THROT_LEVEL_HIGH>;
331aa1a8ff2SEmmanuel Vadot
332aa1a8ff2SEmmanuel Vadot                #cooling-cells = <2>;
333aa1a8ff2SEmmanuel Vadot            };
334aa1a8ff2SEmmanuel Vadot
335aa1a8ff2SEmmanuel Vadot            /*
336aa1a8ff2SEmmanuel Vadot             * When the "light" cooling device triggered,
337aa1a8ff2SEmmanuel Vadot             * the HW will skip cpu clock's pulse in MED level
338aa1a8ff2SEmmanuel Vadot             */
339aa1a8ff2SEmmanuel Vadot            light {
340aa1a8ff2SEmmanuel Vadot                nvidia,priority = <80>;
341aa1a8ff2SEmmanuel Vadot                nvidia,cpu-throt-level = <TEGRA_SOCTHERM_THROT_LEVEL_MED>;
342aa1a8ff2SEmmanuel Vadot
343aa1a8ff2SEmmanuel Vadot                #cooling-cells = <2>;
344aa1a8ff2SEmmanuel Vadot            };
345aa1a8ff2SEmmanuel Vadot
346aa1a8ff2SEmmanuel Vadot            /*
347aa1a8ff2SEmmanuel Vadot             * If these two devices are triggered in same time, the HW throttle
348aa1a8ff2SEmmanuel Vadot             * arbiter will select the highest priority as the final throttle
349aa1a8ff2SEmmanuel Vadot             * settings to skip cpu pulse.
350aa1a8ff2SEmmanuel Vadot             */
351aa1a8ff2SEmmanuel Vadot        };
352aa1a8ff2SEmmanuel Vadot    };
353aa1a8ff2SEmmanuel Vadot
354aa1a8ff2SEmmanuel Vadot  # referring to thermal sensors
355aa1a8ff2SEmmanuel Vadot  - |
356aa1a8ff2SEmmanuel Vadot    thermal-zones {
357aa1a8ff2SEmmanuel Vadot        cpu-thermal {
358aa1a8ff2SEmmanuel Vadot            polling-delay-passive = <1000>;
359aa1a8ff2SEmmanuel Vadot            polling-delay = <1000>;
360aa1a8ff2SEmmanuel Vadot
361aa1a8ff2SEmmanuel Vadot            thermal-sensors = <&soctherm TEGRA124_SOCTHERM_SENSOR_CPU>;
362aa1a8ff2SEmmanuel Vadot
363aa1a8ff2SEmmanuel Vadot            trips {
364aa1a8ff2SEmmanuel Vadot                cpu_shutdown_trip: shutdown-trip {
365aa1a8ff2SEmmanuel Vadot                    temperature = <102500>;
366aa1a8ff2SEmmanuel Vadot                    hysteresis = <1000>;
367aa1a8ff2SEmmanuel Vadot                    type = "critical";
368aa1a8ff2SEmmanuel Vadot                };
369aa1a8ff2SEmmanuel Vadot
370aa1a8ff2SEmmanuel Vadot                cpu_throttle_trip: throttle-trip {
371aa1a8ff2SEmmanuel Vadot                    temperature = <100000>;
372aa1a8ff2SEmmanuel Vadot                    hysteresis = <1000>;
373aa1a8ff2SEmmanuel Vadot                    type = "hot";
374aa1a8ff2SEmmanuel Vadot                };
375aa1a8ff2SEmmanuel Vadot            };
376aa1a8ff2SEmmanuel Vadot
377aa1a8ff2SEmmanuel Vadot            cooling-maps {
378aa1a8ff2SEmmanuel Vadot                map0 {
379aa1a8ff2SEmmanuel Vadot                    trip = <&cpu_throttle_trip>;
380aa1a8ff2SEmmanuel Vadot                    cooling-device = <&throttle_heavy 1 1>;
381aa1a8ff2SEmmanuel Vadot                };
382aa1a8ff2SEmmanuel Vadot            };
383aa1a8ff2SEmmanuel Vadot        };
384aa1a8ff2SEmmanuel Vadot    };
385