xref: /linux/Documentation/devicetree/bindings/thermal/imx-thermal.yaml (revision 98bcee251e608345c272fd89bccd948071fc0bf5)
16d97d497SAnson Huang# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
26d97d497SAnson Huang%YAML 1.2
36d97d497SAnson Huang---
46d97d497SAnson Huang$id: http://devicetree.org/schemas/thermal/imx-thermal.yaml#
56d97d497SAnson Huang$schema: http://devicetree.org/meta-schemas/core.yaml#
66d97d497SAnson Huang
784e85359SKrzysztof Kozlowskititle: NXP i.MX Thermal
86d97d497SAnson Huang
96d97d497SAnson Huangmaintainers:
10e65b85ddSFabio Estevam  - Shawn Guo <shawnguo@kernel.org>
116d97d497SAnson Huang  - Anson Huang <Anson.Huang@nxp.com>
126d97d497SAnson Huang
136d97d497SAnson Huangproperties:
146d97d497SAnson Huang  compatible:
15a8a23307SStefan Wahren    oneOf:
16a8a23307SStefan Wahren      - enum:
176d97d497SAnson Huang          - fsl,imx6q-tempmon
186d97d497SAnson Huang          - fsl,imx6sx-tempmon
196d97d497SAnson Huang          - fsl,imx7d-tempmon
20a8a23307SStefan Wahren      - items:
21a8a23307SStefan Wahren          - enum:
22a8a23307SStefan Wahren              - fsl,imx6sll-tempmon
23a8a23307SStefan Wahren              - fsl,imx6ul-tempmon
24a8a23307SStefan Wahren          - const: fsl,imx6sx-tempmon
256d97d497SAnson Huang
266d97d497SAnson Huang  interrupts:
276d97d497SAnson Huang    description: |
286d97d497SAnson Huang      The interrupt output of the controller, i.MX6Q has IRQ_HIGH which
296d97d497SAnson Huang      will be triggered when temperature is higher than high threshold,
306d97d497SAnson Huang      i.MX6SX and i.MX7S/D have two more IRQs than i.MX6Q, one is IRQ_LOW
316d97d497SAnson Huang      and the other is IRQ_PANIC, when temperature is lower than low
326d97d497SAnson Huang      threshold, IRQ_LOW will be triggered, when temperature is higher
336d97d497SAnson Huang      than panic threshold, IRQ_PANIC will be triggered, and system can
346d97d497SAnson Huang      be configured to auto reboot by SRC module for IRQ_PANIC. IRQ_HIGH,
356d97d497SAnson Huang      IRQ_LOW and IRQ_PANIC share same interrupt output of controller.
366d97d497SAnson Huang    maxItems: 1
376d97d497SAnson Huang
386d97d497SAnson Huang  nvmem-cells:
396d97d497SAnson Huang    items:
406d97d497SAnson Huang      - description: Phandle to the calibration data provided by ocotp
416d97d497SAnson Huang      - description: Phandle to the temperature grade provided by ocotp
426d97d497SAnson Huang
436d97d497SAnson Huang  nvmem-cell-names:
446d97d497SAnson Huang    items:
456d97d497SAnson Huang      - const: calib
466d97d497SAnson Huang      - const: temp_grade
476d97d497SAnson Huang
486d97d497SAnson Huang  fsl,tempmon:
49e4fdcfb1SRob Herring    $ref: /schemas/types.yaml#/definitions/phandle
506d97d497SAnson Huang    description: Phandle to anatop system controller node.
516d97d497SAnson Huang
526d97d497SAnson Huang  fsl,tempmon-data:
53e4fdcfb1SRob Herring    $ref: /schemas/types.yaml#/definitions/phandle
546d97d497SAnson Huang    description: |
556d97d497SAnson Huang      Deprecated property, phandle pointer to fuse controller that contains
566d97d497SAnson Huang      TEMPMON calibration data, e.g. OCOTP on imx6q. The details about
576d97d497SAnson Huang      calibration data can be found in SoC Reference Manual.
586d97d497SAnson Huang    deprecated: true
596d97d497SAnson Huang
606d97d497SAnson Huang  clocks:
616d97d497SAnson Huang    maxItems: 1
626d97d497SAnson Huang
63*98bcee25SAlexander Stein  "#thermal-sensor-cells":
64*98bcee25SAlexander Stein    const: 0
65*98bcee25SAlexander Stein
666d97d497SAnson Huangrequired:
676d97d497SAnson Huang  - compatible
686d97d497SAnson Huang  - interrupts
696d97d497SAnson Huang  - fsl,tempmon
706d97d497SAnson Huang  - nvmem-cells
716d97d497SAnson Huang  - nvmem-cell-names
726d97d497SAnson Huang
73*98bcee25SAlexander SteinallOf:
74*98bcee25SAlexander Stein  - $ref: thermal-sensor.yaml#
75*98bcee25SAlexander Stein
766d97d497SAnson HuangadditionalProperties: false
776d97d497SAnson Huang
786d97d497SAnson Huangexamples:
796d97d497SAnson Huang  - |
806d97d497SAnson Huang    #include <dt-bindings/clock/imx6sx-clock.h>
816d97d497SAnson Huang    #include <dt-bindings/interrupt-controller/arm-gic.h>
826d97d497SAnson Huang
836d97d497SAnson Huang    efuse@21bc000 {
846d97d497SAnson Huang         #address-cells = <1>;
856d97d497SAnson Huang         #size-cells = <1>;
866d97d497SAnson Huang         compatible = "fsl,imx6sx-ocotp", "syscon";
876d97d497SAnson Huang         reg = <0x021bc000 0x4000>;
886d97d497SAnson Huang         clocks = <&clks IMX6SX_CLK_OCOTP>;
896d97d497SAnson Huang
906d97d497SAnson Huang         tempmon_calib: calib@38 {
916d97d497SAnson Huang             reg = <0x38 4>;
926d97d497SAnson Huang         };
936d97d497SAnson Huang
946d97d497SAnson Huang         tempmon_temp_grade: temp-grade@20 {
956d97d497SAnson Huang             reg = <0x20 4>;
966d97d497SAnson Huang         };
976d97d497SAnson Huang    };
986d97d497SAnson Huang
996d97d497SAnson Huang    anatop@20c8000 {
1006d97d497SAnson Huang        compatible = "fsl,imx6q-anatop", "syscon", "simple-mfd";
1016d97d497SAnson Huang        reg = <0x020c8000 0x1000>;
1026d97d497SAnson Huang        interrupts = <0 49 IRQ_TYPE_LEVEL_HIGH>,
1036d97d497SAnson Huang                     <0 54 IRQ_TYPE_LEVEL_HIGH>,
1046d97d497SAnson Huang                     <0 127 IRQ_TYPE_LEVEL_HIGH>;
1056d97d497SAnson Huang
1066d97d497SAnson Huang        tempmon {
1076d97d497SAnson Huang             compatible = "fsl,imx6sx-tempmon";
1086d97d497SAnson Huang             interrupts = <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>;
1096d97d497SAnson Huang             fsl,tempmon = <&anatop>;
1106d97d497SAnson Huang             nvmem-cells = <&tempmon_calib>, <&tempmon_temp_grade>;
1116d97d497SAnson Huang             nvmem-cell-names = "calib", "temp_grade";
1126d97d497SAnson Huang             clocks = <&clks IMX6SX_CLK_PLL3_USB_OTG>;
113*98bcee25SAlexander Stein             #thermal-sensor-cells = <0>;
1146d97d497SAnson Huang        };
1156d97d497SAnson Huang    };
116