xref: /linux/Documentation/devicetree/bindings/thermal/imx-thermal.yaml (revision 0ea5c948cb64bab5bc7a5516774eb8536f05aa0d)
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/thermal/imx-thermal.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: NXP i.MX Thermal
8
9maintainers:
10  - Shawn Guo <shawnguo@kernel.org>
11  - Anson Huang <Anson.Huang@nxp.com>
12
13properties:
14  compatible:
15    oneOf:
16      - enum:
17          - fsl,imx6q-tempmon
18          - fsl,imx6sx-tempmon
19          - fsl,imx7d-tempmon
20      - items:
21          - enum:
22              - fsl,imx6sll-tempmon
23              - fsl,imx6ul-tempmon
24          - const: fsl,imx6sx-tempmon
25
26  interrupts:
27    description: |
28      The interrupt output of the controller, i.MX6Q has IRQ_HIGH which
29      will be triggered when temperature is higher than high threshold,
30      i.MX6SX and i.MX7S/D have two more IRQs than i.MX6Q, one is IRQ_LOW
31      and the other is IRQ_PANIC, when temperature is lower than low
32      threshold, IRQ_LOW will be triggered, when temperature is higher
33      than panic threshold, IRQ_PANIC will be triggered, and system can
34      be configured to auto reboot by SRC module for IRQ_PANIC. IRQ_HIGH,
35      IRQ_LOW and IRQ_PANIC share same interrupt output of controller.
36    maxItems: 1
37
38  nvmem-cells:
39    items:
40      - description: Phandle to the calibration data provided by ocotp
41      - description: Phandle to the temperature grade provided by ocotp
42
43  nvmem-cell-names:
44    items:
45      - const: calib
46      - const: temp_grade
47
48  fsl,tempmon:
49    $ref: /schemas/types.yaml#/definitions/phandle
50    description: Phandle to anatop system controller node.
51
52  fsl,tempmon-data:
53    $ref: /schemas/types.yaml#/definitions/phandle
54    description: |
55      Deprecated property, phandle pointer to fuse controller that contains
56      TEMPMON calibration data, e.g. OCOTP on imx6q. The details about
57      calibration data can be found in SoC Reference Manual.
58    deprecated: true
59
60  clocks:
61    maxItems: 1
62
63  "#thermal-sensor-cells":
64    const: 0
65
66required:
67  - compatible
68  - interrupts
69  - fsl,tempmon
70  - nvmem-cells
71  - nvmem-cell-names
72
73allOf:
74  - $ref: thermal-sensor.yaml#
75
76additionalProperties: false
77
78examples:
79  - |
80    #include <dt-bindings/clock/imx6sx-clock.h>
81    #include <dt-bindings/interrupt-controller/arm-gic.h>
82
83    efuse@21bc000 {
84         #address-cells = <1>;
85         #size-cells = <1>;
86         compatible = "fsl,imx6sx-ocotp", "syscon";
87         reg = <0x021bc000 0x4000>;
88         clocks = <&clks IMX6SX_CLK_OCOTP>;
89
90         tempmon_calib: calib@38 {
91             reg = <0x38 4>;
92         };
93
94         tempmon_temp_grade: temp-grade@20 {
95             reg = <0x20 4>;
96         };
97    };
98
99    anatop@20c8000 {
100        compatible = "fsl,imx6q-anatop", "syscon", "simple-mfd";
101        reg = <0x020c8000 0x1000>;
102        interrupts = <0 49 IRQ_TYPE_LEVEL_HIGH>,
103                     <0 54 IRQ_TYPE_LEVEL_HIGH>,
104                     <0 127 IRQ_TYPE_LEVEL_HIGH>;
105
106        tempmon {
107             compatible = "fsl,imx6sx-tempmon";
108             interrupts = <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>;
109             fsl,tempmon = <&anatop>;
110             nvmem-cells = <&tempmon_calib>, <&tempmon_temp_grade>;
111             nvmem-cell-names = "calib", "temp_grade";
112             clocks = <&clks IMX6SX_CLK_PLL3_USB_OTG>;
113             #thermal-sensor-cells = <0>;
114        };
115    };
116