Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: thermal: qcom,spmi-temp-alarm: convert to dtschema

Convert the Qualcomm QPNP PMIC Temperature Alarm to DT Schema.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220608112702.80873-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>

authored by

Krzysztof Kozlowski and committed by
Daniel Lezcano
f16d3705 404dd7df

+85 -51
+85
Documentation/devicetree/bindings/thermal/qcom,spmi-temp-alarm.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/thermal/qcom,spmi-temp-alarm.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Qualcomm QPNP PMIC Temperature Alarm 8 + 9 + maintainers: 10 + - Bjorn Andersson <bjorn.andersson@linaro.org> 11 + 12 + description: 13 + QPNP temperature alarm peripherals are found inside of Qualcomm PMIC chips 14 + that utilize the Qualcomm SPMI implementation. These peripherals provide an 15 + interrupt signal and status register to identify high PMIC die temperature. 16 + 17 + allOf: 18 + - $ref: thermal-sensor.yaml# 19 + 20 + properties: 21 + compatible: 22 + const: qcom,spmi-temp-alarm 23 + 24 + reg: 25 + maxItems: 1 26 + 27 + interrupts: 28 + maxItems: 1 29 + 30 + io-channels: 31 + items: 32 + - description: ADC channel, which reports chip die temperature 33 + 34 + io-channel-names: 35 + items: 36 + - const: thermal 37 + 38 + '#thermal-sensor-cells': 39 + const: 0 40 + 41 + required: 42 + - compatible 43 + - reg 44 + - interrupts 45 + - '#thermal-sensor-cells' 46 + 47 + additionalProperties: false 48 + 49 + examples: 50 + - | 51 + #include <dt-bindings/interrupt-controller/arm-gic.h> 52 + 53 + pmic { 54 + #address-cells = <1>; 55 + #size-cells = <0>; 56 + 57 + pm8350_temp_alarm: temperature-sensor@a00 { 58 + compatible = "qcom,spmi-temp-alarm"; 59 + reg = <0xa00>; 60 + interrupts = <0x1 0xa 0x0 IRQ_TYPE_EDGE_BOTH>; 61 + #thermal-sensor-cells = <0>; 62 + }; 63 + }; 64 + 65 + thermal-zones { 66 + pm8350_thermal: pm8350c-thermal { 67 + polling-delay-passive = <100>; 68 + polling-delay = <0>; 69 + thermal-sensors = <&pm8350_temp_alarm>; 70 + 71 + trips { 72 + pm8350_trip0: trip0 { 73 + temperature = <95000>; 74 + hysteresis = <0>; 75 + type = "passive"; 76 + }; 77 + 78 + pm8350_crit: pm8350c-crit { 79 + temperature = <115000>; 80 + hysteresis = <0>; 81 + type = "critical"; 82 + }; 83 + }; 84 + }; 85 + };
-51
Documentation/devicetree/bindings/thermal/qcom-spmi-temp-alarm.txt
··· 1 - Qualcomm QPNP PMIC Temperature Alarm 2 - 3 - QPNP temperature alarm peripherals are found inside of Qualcomm PMIC chips 4 - that utilize the Qualcomm SPMI implementation. These peripherals provide an 5 - interrupt signal and status register to identify high PMIC die temperature. 6 - 7 - Required properties: 8 - - compatible: Should contain "qcom,spmi-temp-alarm". 9 - - reg: Specifies the SPMI address. 10 - - interrupts: PMIC temperature alarm interrupt. 11 - - #thermal-sensor-cells: Should be 0. See Documentation/devicetree/bindings/thermal/thermal-sensor.yaml for a description. 12 - 13 - Optional properties: 14 - - io-channels: Should contain IIO channel specifier for the ADC channel, 15 - which report chip die temperature. 16 - - io-channel-names: Should contain "thermal". 17 - 18 - Example: 19 - 20 - pm8941_temp: thermal-alarm@2400 { 21 - compatible = "qcom,spmi-temp-alarm"; 22 - reg = <0x2400>; 23 - interrupts = <0 0x24 0 IRQ_TYPE_EDGE_RISING>; 24 - #thermal-sensor-cells = <0>; 25 - 26 - io-channels = <&pm8941_vadc VADC_DIE_TEMP>; 27 - io-channel-names = "thermal"; 28 - }; 29 - 30 - thermal-zones { 31 - pm8941 { 32 - polling-delay-passive = <250>; 33 - polling-delay = <1000>; 34 - 35 - thermal-sensors = <&pm8941_temp>; 36 - 37 - trips { 38 - stage1 { 39 - temperature = <105000>; 40 - hysteresis = <2000>; 41 - type = "passive"; 42 - }; 43 - stage2 { 44 - temperature = <125000>; 45 - hysteresis = <2000>; 46 - type = "critical"; 47 - }; 48 - }; 49 - }; 50 - }; 51 -