xref: /freebsd/sys/contrib/device-tree/Bindings/thermal/st,stm32-thermal.yaml (revision c66ec88fed842fbaad62c30d510644ceb7bd2d71)
1*c66ec88fSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*c66ec88fSEmmanuel Vadot%YAML 1.2
3*c66ec88fSEmmanuel Vadot---
4*c66ec88fSEmmanuel Vadot$id: http://devicetree.org/schemas/thermal/st,stm32-thermal.yaml#
5*c66ec88fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*c66ec88fSEmmanuel Vadot
7*c66ec88fSEmmanuel Vadottitle: STMicroelectronics STM32 digital thermal sensor (DTS) binding
8*c66ec88fSEmmanuel Vadot
9*c66ec88fSEmmanuel Vadotmaintainers:
10*c66ec88fSEmmanuel Vadot  - David Hernandez Sanchez <david.hernandezsanchez@st.com>
11*c66ec88fSEmmanuel Vadot
12*c66ec88fSEmmanuel Vadotproperties:
13*c66ec88fSEmmanuel Vadot  compatible:
14*c66ec88fSEmmanuel Vadot    const: st,stm32-thermal
15*c66ec88fSEmmanuel Vadot
16*c66ec88fSEmmanuel Vadot  reg:
17*c66ec88fSEmmanuel Vadot    maxItems: 1
18*c66ec88fSEmmanuel Vadot
19*c66ec88fSEmmanuel Vadot  interrupts:
20*c66ec88fSEmmanuel Vadot    maxItems: 1
21*c66ec88fSEmmanuel Vadot
22*c66ec88fSEmmanuel Vadot  clocks:
23*c66ec88fSEmmanuel Vadot    maxItems: 1
24*c66ec88fSEmmanuel Vadot
25*c66ec88fSEmmanuel Vadot  clock-names:
26*c66ec88fSEmmanuel Vadot    items:
27*c66ec88fSEmmanuel Vadot      - const: pclk
28*c66ec88fSEmmanuel Vadot
29*c66ec88fSEmmanuel Vadot  "#thermal-sensor-cells":
30*c66ec88fSEmmanuel Vadot    const: 0
31*c66ec88fSEmmanuel Vadot
32*c66ec88fSEmmanuel Vadotrequired:
33*c66ec88fSEmmanuel Vadot  - "#thermal-sensor-cells"
34*c66ec88fSEmmanuel Vadot  - compatible
35*c66ec88fSEmmanuel Vadot  - reg
36*c66ec88fSEmmanuel Vadot  - interrupts
37*c66ec88fSEmmanuel Vadot  - clocks
38*c66ec88fSEmmanuel Vadot  - clock-names
39*c66ec88fSEmmanuel Vadot
40*c66ec88fSEmmanuel VadotadditionalProperties: false
41*c66ec88fSEmmanuel Vadot
42*c66ec88fSEmmanuel Vadotexamples:
43*c66ec88fSEmmanuel Vadot  - |
44*c66ec88fSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
45*c66ec88fSEmmanuel Vadot    #include <dt-bindings/clock/stm32mp1-clks.h>
46*c66ec88fSEmmanuel Vadot    dts: thermal@50028000 {
47*c66ec88fSEmmanuel Vadot        compatible = "st,stm32-thermal";
48*c66ec88fSEmmanuel Vadot        reg = <0x50028000 0x100>;
49*c66ec88fSEmmanuel Vadot        clocks = <&rcc TMPSENS>;
50*c66ec88fSEmmanuel Vadot        clock-names = "pclk";
51*c66ec88fSEmmanuel Vadot        #thermal-sensor-cells = <0>;
52*c66ec88fSEmmanuel Vadot        interrupts = <GIC_SPI 147 IRQ_TYPE_LEVEL_HIGH>;
53*c66ec88fSEmmanuel Vadot    };
54*c66ec88fSEmmanuel Vadot
55*c66ec88fSEmmanuel Vadot    thermal-zones {
56*c66ec88fSEmmanuel Vadot        cpu_thermal: cpu-thermal {
57*c66ec88fSEmmanuel Vadot            polling-delay-passive = <0>;
58*c66ec88fSEmmanuel Vadot            polling-delay = <0>;
59*c66ec88fSEmmanuel Vadot
60*c66ec88fSEmmanuel Vadot            thermal-sensors = <&dts>;
61*c66ec88fSEmmanuel Vadot            trips {
62*c66ec88fSEmmanuel Vadot                cpu_alert1: cpu-alert1 {
63*c66ec88fSEmmanuel Vadot                    temperature = <85000>;
64*c66ec88fSEmmanuel Vadot                    hysteresis = <0>;
65*c66ec88fSEmmanuel Vadot                    type = "passive";
66*c66ec88fSEmmanuel Vadot                };
67*c66ec88fSEmmanuel Vadot
68*c66ec88fSEmmanuel Vadot                cpu_crit: cpu-crit {
69*c66ec88fSEmmanuel Vadot                    temperature = <120000>;
70*c66ec88fSEmmanuel Vadot                    hysteresis = <0>;
71*c66ec88fSEmmanuel Vadot                    type = "critical";
72*c66ec88fSEmmanuel Vadot                };
73*c66ec88fSEmmanuel Vadot            };
74*c66ec88fSEmmanuel Vadot
75*c66ec88fSEmmanuel Vadot            cooling-maps {
76*c66ec88fSEmmanuel Vadot            };
77*c66ec88fSEmmanuel Vadot        };
78*c66ec88fSEmmanuel Vadot    };
79*c66ec88fSEmmanuel Vadot...
80