18cc087a1SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 28cc087a1SEmmanuel Vadot%YAML 1.2 38cc087a1SEmmanuel Vadot--- 48cc087a1SEmmanuel Vadot$id: http://devicetree.org/schemas/thermal/qcom-spmi-adc-tm-hc.yaml# 58cc087a1SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 68cc087a1SEmmanuel Vadot 78cc087a1SEmmanuel Vadottitle: Qualcomm's SPMI PMIC ADC HC Thermal Monitoring 88cc087a1SEmmanuel Vadotmaintainers: 98cc087a1SEmmanuel Vadot - Dmitry Baryshkov <dmitry.baryshkov@linaro.org> 108cc087a1SEmmanuel Vadot 11*0e8011faSEmmanuel Vadot$ref: thermal-sensor.yaml# 12*0e8011faSEmmanuel Vadot 138cc087a1SEmmanuel Vadotproperties: 148cc087a1SEmmanuel Vadot compatible: 158cc087a1SEmmanuel Vadot const: qcom,spmi-adc-tm-hc 168cc087a1SEmmanuel Vadot 178cc087a1SEmmanuel Vadot reg: 188cc087a1SEmmanuel Vadot maxItems: 1 198cc087a1SEmmanuel Vadot 208cc087a1SEmmanuel Vadot interrupts: 218cc087a1SEmmanuel Vadot maxItems: 1 228cc087a1SEmmanuel Vadot 238cc087a1SEmmanuel Vadot "#thermal-sensor-cells": 248cc087a1SEmmanuel Vadot const: 1 258cc087a1SEmmanuel Vadot 268cc087a1SEmmanuel Vadot "#address-cells": 278cc087a1SEmmanuel Vadot const: 1 288cc087a1SEmmanuel Vadot 298cc087a1SEmmanuel Vadot "#size-cells": 308cc087a1SEmmanuel Vadot const: 0 318cc087a1SEmmanuel Vadot 328cc087a1SEmmanuel Vadot qcom,avg-samples: 338cc087a1SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 348cc087a1SEmmanuel Vadot description: Number of samples to be used for measurement. 358cc087a1SEmmanuel Vadot enum: 368cc087a1SEmmanuel Vadot - 1 378cc087a1SEmmanuel Vadot - 2 388cc087a1SEmmanuel Vadot - 4 398cc087a1SEmmanuel Vadot - 8 408cc087a1SEmmanuel Vadot - 16 418cc087a1SEmmanuel Vadot default: 1 428cc087a1SEmmanuel Vadot 438cc087a1SEmmanuel Vadot qcom,decimation: 448cc087a1SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 458cc087a1SEmmanuel Vadot description: This parameter is used to decrease ADC sampling rate. 468cc087a1SEmmanuel Vadot Quicker measurements can be made by reducing decimation ratio. 478cc087a1SEmmanuel Vadot enum: 488cc087a1SEmmanuel Vadot - 256 498cc087a1SEmmanuel Vadot - 512 508cc087a1SEmmanuel Vadot - 1024 518cc087a1SEmmanuel Vadot default: 1024 528cc087a1SEmmanuel Vadot 538cc087a1SEmmanuel VadotpatternProperties: 548cc087a1SEmmanuel Vadot "^([-a-z0-9]*)@[0-7]$": 558cc087a1SEmmanuel Vadot type: object 568cc087a1SEmmanuel Vadot description: 578cc087a1SEmmanuel Vadot Represent one thermal sensor. 588cc087a1SEmmanuel Vadot 598cc087a1SEmmanuel Vadot properties: 608cc087a1SEmmanuel Vadot reg: 618cc087a1SEmmanuel Vadot description: Specify the sensor channel. There are 8 channels in PMIC5's ADC TM 628cc087a1SEmmanuel Vadot minimum: 0 638cc087a1SEmmanuel Vadot maximum: 7 648cc087a1SEmmanuel Vadot 658cc087a1SEmmanuel Vadot io-channels: 668cc087a1SEmmanuel Vadot description: 678cc087a1SEmmanuel Vadot From common IIO binding. Used to pipe PMIC ADC channel to thermal monitor 688cc087a1SEmmanuel Vadot 698cc087a1SEmmanuel Vadot qcom,ratiometric: 708cc087a1SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/flag 718cc087a1SEmmanuel Vadot description: 728cc087a1SEmmanuel Vadot Channel calibration type. 738cc087a1SEmmanuel Vadot If this property is specified VADC will use the VDD reference 748cc087a1SEmmanuel Vadot (1.875V) and GND for channel calibration. If property is not found, 758cc087a1SEmmanuel Vadot channel will be calibrated with 0V and 1.25V reference channels, 768cc087a1SEmmanuel Vadot also known as absolute calibration. 778cc087a1SEmmanuel Vadot 788cc087a1SEmmanuel Vadot qcom,hw-settle-time-us: 798cc087a1SEmmanuel Vadot description: Time between AMUX getting configured and the ADC starting conversion. 808cc087a1SEmmanuel Vadot enum: [0, 100, 200, 300, 400, 500, 600, 700, 1000, 2000, 4000, 6000, 8000, 10000] 818cc087a1SEmmanuel Vadot 828cc087a1SEmmanuel Vadot qcom,pre-scaling: 838cc087a1SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32-array 848cc087a1SEmmanuel Vadot description: Used for scaling the channel input signal before the 858cc087a1SEmmanuel Vadot signal is fed to VADC. The configuration for this node is to know the 868cc087a1SEmmanuel Vadot pre-determined ratio and use it for post scaling. It is a pair of 878cc087a1SEmmanuel Vadot integers, denoting the numerator and denominator of the fraction by 888cc087a1SEmmanuel Vadot which input signal is multiplied. For example, <1 3> indicates the 898cc087a1SEmmanuel Vadot signal is scaled down to 1/3 of its value before ADC measurement. If 908cc087a1SEmmanuel Vadot property is not found default value depending on chip will be used. 918cc087a1SEmmanuel Vadot items: 928cc087a1SEmmanuel Vadot - const: 1 938cc087a1SEmmanuel Vadot - enum: [ 1, 3, 4, 6, 20, 8, 10 ] 948cc087a1SEmmanuel Vadot 958cc087a1SEmmanuel Vadot required: 968cc087a1SEmmanuel Vadot - reg 978cc087a1SEmmanuel Vadot - io-channels 988cc087a1SEmmanuel Vadot 998cc087a1SEmmanuel Vadot additionalProperties: 1008cc087a1SEmmanuel Vadot false 1018cc087a1SEmmanuel Vadot 1028cc087a1SEmmanuel Vadotrequired: 1038cc087a1SEmmanuel Vadot - compatible 1048cc087a1SEmmanuel Vadot - reg 1058cc087a1SEmmanuel Vadot - interrupts 1068cc087a1SEmmanuel Vadot - "#address-cells" 1078cc087a1SEmmanuel Vadot - "#size-cells" 1088cc087a1SEmmanuel Vadot 109*0e8011faSEmmanuel VadotunevaluatedProperties: false 1108cc087a1SEmmanuel Vadot 1118cc087a1SEmmanuel Vadotexamples: 1128cc087a1SEmmanuel Vadot - | 1138cc087a1SEmmanuel Vadot #include <dt-bindings/iio/qcom,spmi-vadc.h> 1148cc087a1SEmmanuel Vadot #include <dt-bindings/interrupt-controller/irq.h> 1158d13bc63SEmmanuel Vadot 1168d13bc63SEmmanuel Vadot pmic { 1178cc087a1SEmmanuel Vadot #address-cells = <1>; 1188cc087a1SEmmanuel Vadot #size-cells = <0>; 1198d13bc63SEmmanuel Vadot 1208cc087a1SEmmanuel Vadot pm8998_adc: adc@3100 { 1218cc087a1SEmmanuel Vadot compatible = "qcom,spmi-adc-rev2"; 1228d13bc63SEmmanuel Vadot reg = <0x3100>; 1238cc087a1SEmmanuel Vadot #address-cells = <1>; 1248cc087a1SEmmanuel Vadot #size-cells = <0>; 1258cc087a1SEmmanuel Vadot #io-channel-cells = <1>; 1268cc087a1SEmmanuel Vadot 127fac71e4eSEmmanuel Vadot /* Other properties are omitted */ 128fac71e4eSEmmanuel Vadot channel@4c { 1298cc087a1SEmmanuel Vadot reg = <ADC5_XO_THERM_100K_PU>; 1308cc087a1SEmmanuel Vadot }; 1318cc087a1SEmmanuel Vadot }; 1328cc087a1SEmmanuel Vadot 1338d13bc63SEmmanuel Vadot adc-tm@3400 { 1348cc087a1SEmmanuel Vadot compatible = "qcom,spmi-adc-tm-hc"; 1358cc087a1SEmmanuel Vadot reg = <0x3400>; 1368cc087a1SEmmanuel Vadot interrupts = <0x2 0x34 0x0 IRQ_TYPE_EDGE_RISING>; 1378cc087a1SEmmanuel Vadot #thermal-sensor-cells = <1>; 1388cc087a1SEmmanuel Vadot #address-cells = <1>; 1398cc087a1SEmmanuel Vadot #size-cells = <0>; 1408cc087a1SEmmanuel Vadot 1418cc087a1SEmmanuel Vadot thermistor@1 { 1428cc087a1SEmmanuel Vadot reg = <1>; 1438cc087a1SEmmanuel Vadot io-channels = <&pm8998_adc ADC5_XO_THERM_100K_PU>; 1448cc087a1SEmmanuel Vadot qcom,ratiometric; 1458cc087a1SEmmanuel Vadot qcom,hw-settle-time-us = <200>; 1468cc087a1SEmmanuel Vadot }; 1478cc087a1SEmmanuel Vadot }; 1488cc087a1SEmmanuel Vadot }; 1498cc087a1SEmmanuel Vadot... 150