150 lines · yaml
1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)2%YAML 1.23---4$id: http://devicetree.org/schemas/thermal/qcom-spmi-adc-tm-hc.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: Qualcomm's SPMI PMIC ADC HC Thermal Monitoring8maintainers:9 - Dmitry Baryshkov <dmitry.baryshkov@linaro.org>10 11$ref: thermal-sensor.yaml#12 13properties:14 compatible:15 const: qcom,spmi-adc-tm-hc16 17 reg:18 maxItems: 119 20 interrupts:21 maxItems: 122 23 "#thermal-sensor-cells":24 const: 125 26 "#address-cells":27 const: 128 29 "#size-cells":30 const: 031 32 qcom,avg-samples:33 $ref: /schemas/types.yaml#/definitions/uint3234 description: Number of samples to be used for measurement.35 enum:36 - 137 - 238 - 439 - 840 - 1641 default: 142 43 qcom,decimation:44 $ref: /schemas/types.yaml#/definitions/uint3245 description: This parameter is used to decrease ADC sampling rate.46 Quicker measurements can be made by reducing decimation ratio.47 enum:48 - 25649 - 51250 - 102451 default: 102452 53patternProperties:54 "^([-a-z0-9]*)@[0-7]$":55 type: object56 description:57 Represent one thermal sensor.58 59 properties:60 reg:61 description: Specify the sensor channel. There are 8 channels in PMIC5's ADC TM62 minimum: 063 maximum: 764 65 io-channels:66 description:67 From common IIO binding. Used to pipe PMIC ADC channel to thermal monitor68 69 qcom,ratiometric:70 $ref: /schemas/types.yaml#/definitions/flag71 description:72 Channel calibration type.73 If this property is specified VADC will use the VDD reference74 (1.875V) and GND for channel calibration. If property is not found,75 channel will be calibrated with 0V and 1.25V reference channels,76 also known as absolute calibration.77 78 qcom,hw-settle-time-us:79 description: Time between AMUX getting configured and the ADC starting conversion.80 enum: [0, 100, 200, 300, 400, 500, 600, 700, 1000, 2000, 4000, 6000, 8000, 10000]81 82 qcom,pre-scaling:83 $ref: /schemas/types.yaml#/definitions/uint32-array84 description: Used for scaling the channel input signal before the85 signal is fed to VADC. The configuration for this node is to know the86 pre-determined ratio and use it for post scaling. It is a pair of87 integers, denoting the numerator and denominator of the fraction by88 which input signal is multiplied. For example, <1 3> indicates the89 signal is scaled down to 1/3 of its value before ADC measurement. If90 property is not found default value depending on chip will be used.91 items:92 - const: 193 - enum: [ 1, 3, 4, 6, 20, 8, 10 ]94 95 required:96 - reg97 - io-channels98 99 additionalProperties:100 false101 102required:103 - compatible104 - reg105 - interrupts106 - "#address-cells"107 - "#size-cells"108 109unevaluatedProperties: false110 111examples:112 - |113 #include <dt-bindings/iio/qcom,spmi-vadc.h>114 #include <dt-bindings/interrupt-controller/irq.h>115 116 pmic {117 #address-cells = <1>;118 #size-cells = <0>;119 120 pm8998_adc: adc@3100 {121 compatible = "qcom,spmi-adc-rev2";122 reg = <0x3100>;123 #address-cells = <1>;124 #size-cells = <0>;125 #io-channel-cells = <1>;126 127 /* Other properties are omitted */128 channel@4c {129 reg = <ADC5_XO_THERM_100K_PU>;130 };131 };132 133 adc-tm@3400 {134 compatible = "qcom,spmi-adc-tm-hc";135 reg = <0x3400>;136 interrupts = <0x2 0x34 0x0 IRQ_TYPE_EDGE_RISING>;137 #thermal-sensor-cells = <1>;138 #address-cells = <1>;139 #size-cells = <0>;140 141 thermistor@1 {142 reg = <1>;143 io-channels = <&pm8998_adc ADC5_XO_THERM_100K_PU>;144 qcom,ratiometric;145 qcom,hw-settle-time-us = <200>;146 };147 };148 };149...150