blob: fc8ec87c4644f9d33718a47c1a7c5de53910cf23 [file] [log] [blame]
Qualcomm Technologies, Inc. QPNP Temperature Alarm
QPNP temperature alarm peripherals are found inside of Qualcomm Technologies,
Inc. PMIC chips that utilize the MSM SPMI implementation. These peripherals
provide an interrupt signal and status register to identify high PMIC die
temperature.
Required properties:
- compatible: Must be "qcom,qpnp-temp-alarm".
- reg: Specifies the SPMI address and size for this temperature
alarm device.
- interrupts: PMIC temperature alarm interrupt
- label: A string used as a descriptive name for this thermal device.
This name should be 19 characters or less.
- #thermal-sensor-cells: Must be 0. Please refer to
<devicetree/bindings/thermal/thermal.txt> for more
details.
Required structure:
- A qcom,qpnp-temp-alarm node must be a child of an SPMI node that has specified
the spmi-slave-container property
- A top level device tree node named "thermal-zones" must exist. It must
contain a subnode with a property named "thermal-sensors" which is assigned
a phandle to the qpnp-temp-alarm device node. See
<devicetree/bindings/thermal/thermal.txt> for more details.
Optional properties:
- qcom,channel-num: VADC channel number associated PMIC DIE_TEMP thermistor.
If no channel is specified, then the die temperature
must be estimated based on the over temperature stage.
- qcom,threshold-set: Integer value which specifies which set of threshold
temperatures to use for the over temperature stages.
Possible values (x = {stage 1 threshold temperature,
stage 2 threshold temperature,
stage 3 threshold temperature}):
0 = {105 C, 125 C, 145 C}
1 = {110 C, 130 C, 150 C}
2 = {115 C, 135 C, 155 C}
3 = {120 C, 140 C, 160 C}
- qcom,clock-rate: Integer value which specifies the temperature monitoring
clock rate. This property is only supported on GEN2
temperature alarm peripherals.
Supported values:
0 = 100 Hz
1 = 50 Hz
2 = 25 Hz
3 = 12.5 Hz
- qcom,default-temp: Specifies the default temperature in millicelcius to use
if no ADC channel is present to read the real time
temperature.
- qcom,temp_alarm-vadc: Corresponding VADC device's phandle.
Note, if a given optional qcom,* binding is not present, then the default
hardware state for that feature will be maintained.
Example:
&spmi_bus {
#address-cells = <1>;
#size-cells = <0>;
interrupt-controller;
#interrupt-cells = <3>;
qcom,pm8941@0 {
spmi-slave-container;
reg = <0x0>;
#address-cells = <1>;
#size-cells = <1>;
pm8941_tz: qcom,temp-alarm@2400 {
compatible = "qcom,qpnp-temp-alarm";
reg = <0x2400 0x100>;
interrupts = <0x0 0x24 0x0>;
label = "pm8941_tz";
qcom,channel-num = <8>;
qcom,threshold-set = <0>;
qcom,temp_alarm-vadc = <&pm8941_vadc>;
#thermal-sensor-cells = <0>;
};
};
};
Below is an example thermal zone definition for the temperature alarm
peripheral.
thermal-zones {
pm8941_tz {
polling-delay-passive = <0>;
polling-delay = <0>;
thermal-governor = "step_wise";
thermal-sensors = <&pm8941_tz>;
trips {
pm8941-trip0 {
temperature = <105000>;
hysteresis = <0>;
type = "passive";
};
pm8941-trip1 {
temperature = <125000>;
hysteresis = <0>;
type = "passive";
};
pm8941-trip2 {
temperature = <145000>;
hysteresis = <0>;
type = "critical";
};
};
};
};