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