121f85718255e54c2debb37c0e38e8aaec25cf77
[openwrt/staging/zorun.git] / target / linux / ipq806x / patches-5.10 / 104-9-dt-bindings-thermal-tsens-Document-ipq8064-bindings.patch
1 From ac369071920d427dd484cf74cddba2774bba45f5 Mon Sep 17 00:00:00 2001
2 From: Ansuel Smith <ansuelsmth@gmail.com>
3 Date: Thu, 9 Jul 2020 22:35:54 +0200
4 Subject: [PATCH 09/10] dt-bindings: thermal: tsens: Document ipq8064 bindings
5
6 Document the use of bindings used for msm8960 tsens based devices.
7 msm8960 use the same gcc regs and is set as a child of the qcom gcc.
8
9 Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
10 Reviewed-by: Rob Herring <robh@kernel.org>
11 ---
12 .../bindings/thermal/qcom-tsens.yaml | 56 ++++++++++++++++---
13 1 file changed, 48 insertions(+), 8 deletions(-)
14
15 diff --git a/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml b/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml
16 index 95462e071ab4..1785b1c75a3c 100644
17 --- a/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml
18 +++ b/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml
19 @@ -19,6 +19,11 @@ description: |
20 properties:
21 compatible:
22 oneOf:
23 + - description: msm9860 TSENS based
24 + items:
25 + - enum:
26 + - qcom,ipq8064-tsens
27 +
28 - description: v0.1 of TSENS
29 items:
30 - enum:
31 @@ -73,7 +78,9 @@ properties:
32 maxItems: 2
33 items:
34 - const: calib
35 - - const: calib_sel
36 + - enum:
37 + - calib_backup
38 + - calib_sel
39
40 "#qcom,sensors":
41 description:
42 @@ -88,12 +95,20 @@ properties:
43 Number of cells required to uniquely identify the thermal sensors. Since
44 we have multiple sensors this is set to 1
45
46 +required:
47 + - compatible
48 + - interrupts
49 + - interrupt-names
50 + - "#thermal-sensor-cells"
51 + - "#qcom,sensors"
52 +
53 allOf:
54 - if:
55 properties:
56 compatible:
57 contains:
58 enum:
59 + - qcom,ipq8064-tsens
60 - qcom,msm8916-tsens
61 - qcom,msm8974-tsens
62 - qcom,msm8976-tsens
63 @@ -114,17 +129,42 @@ allOf:
64 interrupt-names:
65 minItems: 2
66
67 -required:
68 - - compatible
69 - - reg
70 - - "#qcom,sensors"
71 - - interrupts
72 - - interrupt-names
73 - - "#thermal-sensor-cells"
74 + - if:
75 + properties:
76 + compatible:
77 + contains:
78 + enum:
79 + - qcom,tsens-v0_1
80 + - qcom,tsens-v1
81 + - qcom,tsens-v2
82 +
83 + then:
84 + required:
85 + - reg
86
87 additionalProperties: false
88
89 examples:
90 + - |
91 + #include <dt-bindings/interrupt-controller/arm-gic.h>
92 + // Example msm9860 based SoC (ipq8064):
93 + gcc: clock-controller {
94 +
95 + /* ... */
96 +
97 + tsens: thermal-sensor {
98 + compatible = "qcom,ipq8064-tsens";
99 +
100 + nvmem-cells = <&tsens_calib>, <&tsens_calib_backup>;
101 + nvmem-cell-names = "calib", "calib_backup";
102 + interrupts = <GIC_SPI 178 IRQ_TYPE_LEVEL_HIGH>;
103 + interrupt-names = "uplow";
104 +
105 + #qcom,sensors = <11>;
106 + #thermal-sensor-cells = <1>;
107 + };
108 + };
109 +
110 - |
111 #include <dt-bindings/interrupt-controller/arm-gic.h>
112 // Example 1 (legacy: for pre v1 IP):
113 --
114 2.30.2
115