xref: /freebsd-src/sys/contrib/device-tree/Bindings/thermal/qcom-spmi-temp-alarm.txt (revision c66ec88fed842fbaad62c30d510644ceb7bd2d71)
1*c66ec88fSEmmanuel VadotQualcomm QPNP PMIC Temperature Alarm
2*c66ec88fSEmmanuel Vadot
3*c66ec88fSEmmanuel VadotQPNP temperature alarm peripherals are found inside of Qualcomm PMIC chips
4*c66ec88fSEmmanuel Vadotthat utilize the Qualcomm SPMI implementation. These peripherals provide an
5*c66ec88fSEmmanuel Vadotinterrupt signal and status register to identify high PMIC die temperature.
6*c66ec88fSEmmanuel Vadot
7*c66ec88fSEmmanuel VadotRequired properties:
8*c66ec88fSEmmanuel Vadot- compatible:      Should contain "qcom,spmi-temp-alarm".
9*c66ec88fSEmmanuel Vadot- reg:             Specifies the SPMI address.
10*c66ec88fSEmmanuel Vadot- interrupts:      PMIC temperature alarm interrupt.
11*c66ec88fSEmmanuel Vadot- #thermal-sensor-cells: Should be 0. See Documentation/devicetree/bindings/thermal/thermal-sensor.yaml for a description.
12*c66ec88fSEmmanuel Vadot
13*c66ec88fSEmmanuel VadotOptional properties:
14*c66ec88fSEmmanuel Vadot- io-channels:     Should contain IIO channel specifier for the ADC channel,
15*c66ec88fSEmmanuel Vadot                   which report chip die temperature.
16*c66ec88fSEmmanuel Vadot- io-channel-names: Should contain "thermal".
17*c66ec88fSEmmanuel Vadot
18*c66ec88fSEmmanuel VadotExample:
19*c66ec88fSEmmanuel Vadot
20*c66ec88fSEmmanuel Vadot	pm8941_temp: thermal-alarm@2400 {
21*c66ec88fSEmmanuel Vadot		compatible = "qcom,spmi-temp-alarm";
22*c66ec88fSEmmanuel Vadot		reg = <0x2400>;
23*c66ec88fSEmmanuel Vadot		interrupts = <0 0x24 0 IRQ_TYPE_EDGE_RISING>;
24*c66ec88fSEmmanuel Vadot		#thermal-sensor-cells = <0>;
25*c66ec88fSEmmanuel Vadot
26*c66ec88fSEmmanuel Vadot		io-channels = <&pm8941_vadc VADC_DIE_TEMP>;
27*c66ec88fSEmmanuel Vadot		io-channel-names = "thermal";
28*c66ec88fSEmmanuel Vadot	};
29*c66ec88fSEmmanuel Vadot
30*c66ec88fSEmmanuel Vadot	thermal-zones {
31*c66ec88fSEmmanuel Vadot		pm8941 {
32*c66ec88fSEmmanuel Vadot			polling-delay-passive = <250>;
33*c66ec88fSEmmanuel Vadot			polling-delay = <1000>;
34*c66ec88fSEmmanuel Vadot
35*c66ec88fSEmmanuel Vadot			thermal-sensors = <&pm8941_temp>;
36*c66ec88fSEmmanuel Vadot
37*c66ec88fSEmmanuel Vadot			trips {
38*c66ec88fSEmmanuel Vadot				stage1 {
39*c66ec88fSEmmanuel Vadot					temperature = <105000>;
40*c66ec88fSEmmanuel Vadot					hysteresis = <2000>;
41*c66ec88fSEmmanuel Vadot					type = "passive";
42*c66ec88fSEmmanuel Vadot				};
43*c66ec88fSEmmanuel Vadot				stage2 {
44*c66ec88fSEmmanuel Vadot					temperature = <125000>;
45*c66ec88fSEmmanuel Vadot					hysteresis = <2000>;
46*c66ec88fSEmmanuel Vadot					type = "critical";
47*c66ec88fSEmmanuel Vadot				};
48*c66ec88fSEmmanuel Vadot			};
49*c66ec88fSEmmanuel Vadot		};
50*c66ec88fSEmmanuel Vadot	};
51*c66ec88fSEmmanuel Vadot
52