1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2%YAML 1.2 3--- 4$id: http://devicetree.org/schemas/thermal/qcom-spmi-adc-tm5.yaml# 5$schema: http://devicetree.org/meta-schemas/core.yaml# 6 7title: Qualcomm's SPMI PMIC ADC Thermal Monitoring 8maintainers: 9 - Dmitry Baryshkov <dmitry.baryshkov@linaro.org> 10 11properties: 12 compatible: 13 const: qcom,spmi-adc-tm5 14 15 reg: 16 maxItems: 1 17 18 interrupts: 19 maxItems: 1 20 21 "#thermal-sensor-cells": 22 const: 1 23 description: 24 Number of cells required to uniquely identify the thermal sensors. Since 25 we have multiple sensors this is set to 1 26 27 "#address-cells": 28 const: 1 29 30 "#size-cells": 31 const: 0 32 33 qcom,avg-samples: 34 $ref: /schemas/types.yaml#/definitions/uint32 35 description: Number of samples to be used for measurement. 36 enum: 37 - 1 38 - 2 39 - 4 40 - 8 41 - 16 42 default: 1 43 44 qcom,decimation: 45 $ref: /schemas/types.yaml#/definitions/uint32 46 description: This parameter is used to decrease ADC sampling rate. 47 Quicker measurements can be made by reducing decimation ratio. 48 enum: 49 - 250 50 - 420 51 - 840 52 default: 840 53 54patternProperties: 55 "^([-a-z0-9]*)@[0-7]$": 56 type: object 57 description: 58 Represent one thermal sensor. 59 60 properties: 61 reg: 62 $ref: /schemas/types.yaml#/definitions/uint32 63 description: Specify the sensor channel. There are 8 channels in PMIC5's ADC TM 64 minimum: 0 65 maximum: 7 66 67 io-channels: 68 description: 69 From common IIO binding. Used to pipe PMIC ADC channel to thermal monitor 70 71 qcom,ratiometric: 72 $ref: /schemas/types.yaml#/definitions/flag 73 description: 74 Channel calibration type. 75 If this property is specified VADC will use the VDD reference 76 (1.875V) and GND for channel calibration. If property is not found, 77 channel will be calibrated with 0V and 1.25V reference channels, 78 also known as absolute calibration. 79 80 qcom,hw-settle-time-us: 81 $ref: /schemas/types.yaml#/definitions/uint32 82 description: Time between AMUX getting configured and the ADC starting conversion. 83 enum: [15, 100, 200, 300, 400, 500, 600, 700, 1000, 2000, 4000, 8000, 16000, 32000, 64000, 128000] 84 85 qcom,pre-scaling: 86 $ref: /schemas/types.yaml#/definitions/uint32-array 87 description: Used for scaling the channel input signal before the 88 signal is fed to VADC. The configuration for this node is to know the 89 pre-determined ratio and use it for post scaling. It is a pair of 90 integers, denoting the numerator and denominator of the fraction by 91 which input signal is multiplied. For example, <1 3> indicates the 92 signal is scaled down to 1/3 of its value before ADC measurement. If 93 property is not found default value depending on chip will be used. 94 items: 95 - const: 1 96 - enum: [ 1, 3, 4, 6, 20, 8, 10 ] 97 98 required: 99 - reg 100 - io-channels 101 102 additionalProperties: 103 false 104 105required: 106 - compatible 107 - reg 108 - interrupts 109 - "#address-cells" 110 - "#size-cells" 111 - "#thermal-sensor-cells" 112 113additionalProperties: false 114 115examples: 116 - | 117 #include <dt-bindings/iio/qcom,spmi-vadc.h> 118 #include <dt-bindings/interrupt-controller/irq.h> 119 spmi_bus { 120 #address-cells = <1>; 121 #size-cells = <0>; 122 pm8150b_adc: adc@3100 { 123 reg = <0x3100>; 124 compatible = "qcom,spmi-adc5"; 125 #address-cells = <1>; 126 #size-cells = <0>; 127 #io-channel-cells = <1>; 128 129 /* Other propreties are omitted */ 130 conn-therm@4f { 131 reg = <ADC5_AMUX_THM3_100K_PU>; 132 qcom,ratiometric; 133 qcom,hw-settle-time = <200>; 134 }; 135 }; 136 137 pm8150b_adc_tm: adc-tm@3500 { 138 compatible = "qcom,spmi-adc-tm5"; 139 reg = <0x3500>; 140 interrupts = <0x2 0x35 0x0 IRQ_TYPE_EDGE_RISING>; 141 #thermal-sensor-cells = <1>; 142 #address-cells = <1>; 143 #size-cells = <0>; 144 145 conn-therm@0 { 146 reg = <0>; 147 io-channels = <&pm8150b_adc ADC5_AMUX_THM3_100K_PU>; 148 qcom,ratiometric; 149 qcom,hw-settle-time-us = <200>; 150 }; 151 }; 152 }; 153... 154