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