xref: /linux/Documentation/devicetree/bindings/thermal/qcom,spmi-temp-alarm.yaml (revision a1ff5a7d78a036d6c2178ee5acd6ba4946243800)
1*f16d3705SKrzysztof Kozlowski# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2*f16d3705SKrzysztof Kozlowski%YAML 1.2
3*f16d3705SKrzysztof Kozlowski---
4*f16d3705SKrzysztof Kozlowski$id: http://devicetree.org/schemas/thermal/qcom,spmi-temp-alarm.yaml#
5*f16d3705SKrzysztof Kozlowski$schema: http://devicetree.org/meta-schemas/core.yaml#
6*f16d3705SKrzysztof Kozlowski
7*f16d3705SKrzysztof Kozlowskititle: Qualcomm QPNP PMIC Temperature Alarm
8*f16d3705SKrzysztof Kozlowski
9*f16d3705SKrzysztof Kozlowskimaintainers:
10*f16d3705SKrzysztof Kozlowski  - Bjorn Andersson <bjorn.andersson@linaro.org>
11*f16d3705SKrzysztof Kozlowski
12*f16d3705SKrzysztof Kozlowskidescription:
13*f16d3705SKrzysztof Kozlowski  QPNP temperature alarm peripherals are found inside of Qualcomm PMIC chips
14*f16d3705SKrzysztof Kozlowski  that utilize the Qualcomm SPMI implementation. These peripherals provide an
15*f16d3705SKrzysztof Kozlowski  interrupt signal and status register to identify high PMIC die temperature.
16*f16d3705SKrzysztof Kozlowski
17*f16d3705SKrzysztof KozlowskiallOf:
18*f16d3705SKrzysztof Kozlowski  - $ref: thermal-sensor.yaml#
19*f16d3705SKrzysztof Kozlowski
20*f16d3705SKrzysztof Kozlowskiproperties:
21*f16d3705SKrzysztof Kozlowski  compatible:
22*f16d3705SKrzysztof Kozlowski    const: qcom,spmi-temp-alarm
23*f16d3705SKrzysztof Kozlowski
24*f16d3705SKrzysztof Kozlowski  reg:
25*f16d3705SKrzysztof Kozlowski    maxItems: 1
26*f16d3705SKrzysztof Kozlowski
27*f16d3705SKrzysztof Kozlowski  interrupts:
28*f16d3705SKrzysztof Kozlowski    maxItems: 1
29*f16d3705SKrzysztof Kozlowski
30*f16d3705SKrzysztof Kozlowski  io-channels:
31*f16d3705SKrzysztof Kozlowski    items:
32*f16d3705SKrzysztof Kozlowski      - description: ADC channel, which reports chip die temperature
33*f16d3705SKrzysztof Kozlowski
34*f16d3705SKrzysztof Kozlowski  io-channel-names:
35*f16d3705SKrzysztof Kozlowski    items:
36*f16d3705SKrzysztof Kozlowski      - const: thermal
37*f16d3705SKrzysztof Kozlowski
38*f16d3705SKrzysztof Kozlowski  '#thermal-sensor-cells':
39*f16d3705SKrzysztof Kozlowski    const: 0
40*f16d3705SKrzysztof Kozlowski
41*f16d3705SKrzysztof Kozlowskirequired:
42*f16d3705SKrzysztof Kozlowski  - compatible
43*f16d3705SKrzysztof Kozlowski  - reg
44*f16d3705SKrzysztof Kozlowski  - interrupts
45*f16d3705SKrzysztof Kozlowski
46*f16d3705SKrzysztof KozlowskiadditionalProperties: false
47*f16d3705SKrzysztof Kozlowski
48*f16d3705SKrzysztof Kozlowskiexamples:
49*f16d3705SKrzysztof Kozlowski  - |
50*f16d3705SKrzysztof Kozlowski    #include <dt-bindings/interrupt-controller/arm-gic.h>
51*f16d3705SKrzysztof Kozlowski
52*f16d3705SKrzysztof Kozlowski    pmic {
53*f16d3705SKrzysztof Kozlowski        #address-cells = <1>;
54*f16d3705SKrzysztof Kozlowski        #size-cells = <0>;
55*f16d3705SKrzysztof Kozlowski
56*f16d3705SKrzysztof Kozlowski        pm8350_temp_alarm: temperature-sensor@a00 {
57*f16d3705SKrzysztof Kozlowski            compatible = "qcom,spmi-temp-alarm";
58*f16d3705SKrzysztof Kozlowski            reg = <0xa00>;
59*f16d3705SKrzysztof Kozlowski            interrupts = <0x1 0xa 0x0 IRQ_TYPE_EDGE_BOTH>;
60*f16d3705SKrzysztof Kozlowski            #thermal-sensor-cells = <0>;
61*f16d3705SKrzysztof Kozlowski        };
62*f16d3705SKrzysztof Kozlowski    };
63*f16d3705SKrzysztof Kozlowski
64*f16d3705SKrzysztof Kozlowski    thermal-zones {
65*f16d3705SKrzysztof Kozlowski        pm8350_thermal: pm8350c-thermal {
66*f16d3705SKrzysztof Kozlowski            polling-delay-passive = <100>;
67*f16d3705SKrzysztof Kozlowski            polling-delay = <0>;
68*f16d3705SKrzysztof Kozlowski            thermal-sensors = <&pm8350_temp_alarm>;
69*f16d3705SKrzysztof Kozlowski
70*f16d3705SKrzysztof Kozlowski            trips {
71*f16d3705SKrzysztof Kozlowski                pm8350_trip0: trip0 {
72*f16d3705SKrzysztof Kozlowski                    temperature = <95000>;
73*f16d3705SKrzysztof Kozlowski                    hysteresis = <0>;
74*f16d3705SKrzysztof Kozlowski                    type = "passive";
75*f16d3705SKrzysztof Kozlowski                };
76*f16d3705SKrzysztof Kozlowski
77*f16d3705SKrzysztof Kozlowski                pm8350_crit: pm8350c-crit {
78*f16d3705SKrzysztof Kozlowski                    temperature = <115000>;
79*f16d3705SKrzysztof Kozlowski                    hysteresis = <0>;
80*f16d3705SKrzysztof Kozlowski                    type = "critical";
81*f16d3705SKrzysztof Kozlowski                };
82*f16d3705SKrzysztof Kozlowski            };
83*f16d3705SKrzysztof Kozlowski        };
84*f16d3705SKrzysztof Kozlowski    };
85