| 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-tm-hc.yaml# |
| 5 |
$schema: http://devicetree.org/meta-schemas/core.yaml# |
| 6 |
|
| 7 |
title: Qualcomm's SPMI PMIC ADC HC Thermal Monitoring |
| 8 |
maintainers: |
| 9 |
- Dmitry Baryshkov <[email protected]> |
| 10 |
|
| 11 |
$ref: thermal-sensor.yaml# |
| 12 |
|
| 13 |
properties: |
| 14 |
compatible: |
| 15 |
const: qcom,spmi-adc-tm-hc |
| 16 |
|
| 17 |
reg: |
| 18 |
maxItems: 1 |
| 19 |
|
| 20 |
interrupts: |
| 21 |
maxItems: 1 |
| 22 |
|
| 23 |
"#thermal-sensor-cells": |
| 24 |
const: 1 |
| 25 |
|
| 26 |
"#address-cells": |
| 27 |
const: 1 |
| 28 |
|
| 29 |
"#size-cells": |
| 30 |
const: 0 |
| 31 |
|
| 32 |
qcom,avg-samples: |
| 33 |
$ref: /schemas/types.yaml#/definitions/uint32 |
| 34 |
description: Number of samples to be used for measurement. |
| 35 |
enum: |
| 36 |
- 1 |
| 37 |
- 2 |
| 38 |
- 4 |
| 39 |
- 8 |
| 40 |
- 16 |
| 41 |
default: 1 |
| 42 |
|
| 43 |
qcom,decimation: |
| 44 |
$ref: /schemas/types.yaml#/definitions/uint32 |
| 45 |
description: This parameter is used to decrease ADC sampling rate. |
| 46 |
Quicker measurements can be made by reducing decimation ratio. |
| 47 |
enum: |
| 48 |
- 256 |
| 49 |
- 512 |
| 50 |
- 1024 |
| 51 |
default: 1024 |
| 52 |
|
| 53 |
patternProperties: |
| 54 |
"^([-a-z0-9]*)@[0-7]$": |
| 55 |
type: object |
| 56 |
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 TM |
| 62 |
minimum: 0 |
| 63 |
maximum: 7 |
| 64 |
|
| 65 |
io-channels: |
| 66 |
description: |
| 67 |
From common IIO binding. Used to pipe PMIC ADC channel to thermal monitor |
| 68 |
|
| 69 |
qcom,ratiometric: |
| 70 |
$ref: /schemas/types.yaml#/definitions/flag |
| 71 |
description: |
| 72 |
Channel calibration type. |
| 73 |
If this property is specified VADC will use the VDD reference |
| 74 |
(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-array |
| 84 |
description: Used for scaling the channel input signal before the |
| 85 |
signal is fed to VADC. The configuration for this node is to know the |
| 86 |
pre-determined ratio and use it for post scaling. It is a pair of |
| 87 |
integers, denoting the numerator and denominator of the fraction by |
| 88 |
which input signal is multiplied. For example, <1 3> indicates the |
| 89 |
signal is scaled down to 1/3 of its value before ADC measurement. If |
| 90 |
property is not found default value depending on chip will be used. |
| 91 |
items: |
| 92 |
- const: 1 |
| 93 |
- enum: [ 1, 3, 4, 6, 20, 8, 10 ] |
| 94 |
|
| 95 |
required: |
| 96 |
- reg |
| 97 |
- io-channels |
| 98 |
|
| 99 |
additionalProperties: |
| 100 |
false |
| 101 |
|
| 102 |
required: |
| 103 |
- compatible |
| 104 |
- reg |
| 105 |
- interrupts |
| 106 |
- "#address-cells" |
| 107 |
- "#size-cells" |
| 108 |
|
| 109 |
unevaluatedProperties: false |
| 110 |
|
| 111 |
examples: |
| 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 |
... |