Skip to content

Commit 26b2f03

Browse files
Ansueldlezcano
authored andcommitted
dt-bindings: thermal: tsens: Document ipq8064 bindings
Document the use of bindings used for msm8960 tsens based devices. msm8960 use the same gcc regs and is set as a child of the qcom gcc. Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20210420183343.2272-10-ansuelsmth@gmail.com
1 parent 6b3aeaf commit 26b2f03

1 file changed

Lines changed: 48 additions & 8 deletions

File tree

Documentation/devicetree/bindings/thermal/qcom-tsens.yaml

Lines changed: 48 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ description: |
1919
properties:
2020
compatible:
2121
oneOf:
22+
- description: msm9860 TSENS based
23+
items:
24+
- enum:
25+
- qcom,ipq8064-tsens
26+
2227
- description: v0.1 of TSENS
2328
items:
2429
- enum:
@@ -75,7 +80,9 @@ properties:
7580
maxItems: 2
7681
items:
7782
- const: calib
78-
- const: calib_sel
83+
- enum:
84+
- calib_backup
85+
- calib_sel
7986

8087
"#qcom,sensors":
8188
description:
@@ -90,12 +97,20 @@ properties:
9097
Number of cells required to uniquely identify the thermal sensors. Since
9198
we have multiple sensors this is set to 1
9299

100+
required:
101+
- compatible
102+
- interrupts
103+
- interrupt-names
104+
- "#thermal-sensor-cells"
105+
- "#qcom,sensors"
106+
93107
allOf:
94108
- if:
95109
properties:
96110
compatible:
97111
contains:
98112
enum:
113+
- qcom,ipq8064-tsens
99114
- qcom,mdm9607-tsens
100115
- qcom,msm8916-tsens
101116
- qcom,msm8974-tsens
@@ -117,17 +132,42 @@ allOf:
117132
interrupt-names:
118133
minItems: 2
119134

120-
required:
121-
- compatible
122-
- reg
123-
- "#qcom,sensors"
124-
- interrupts
125-
- interrupt-names
126-
- "#thermal-sensor-cells"
135+
- if:
136+
properties:
137+
compatible:
138+
contains:
139+
enum:
140+
- qcom,tsens-v0_1
141+
- qcom,tsens-v1
142+
- qcom,tsens-v2
143+
144+
then:
145+
required:
146+
- reg
127147

128148
additionalProperties: false
129149

130150
examples:
151+
- |
152+
#include <dt-bindings/interrupt-controller/arm-gic.h>
153+
// Example msm9860 based SoC (ipq8064):
154+
gcc: clock-controller {
155+
156+
/* ... */
157+
158+
tsens: thermal-sensor {
159+
compatible = "qcom,ipq8064-tsens";
160+
161+
nvmem-cells = <&tsens_calib>, <&tsens_calib_backup>;
162+
nvmem-cell-names = "calib", "calib_backup";
163+
interrupts = <GIC_SPI 178 IRQ_TYPE_LEVEL_HIGH>;
164+
interrupt-names = "uplow";
165+
166+
#qcom,sensors = <11>;
167+
#thermal-sensor-cells = <1>;
168+
};
169+
};
170+
131171
- |
132172
#include <dt-bindings/interrupt-controller/arm-gic.h>
133173
// Example 1 (legacy: for pre v1 IP):

0 commit comments

Comments
 (0)