ath25: switch default kernel to 5.15
[openwrt/staging/ldir.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 --- a/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml
16 +++ b/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml
17 @@ -19,6 +19,11 @@ description: |
18 properties:
19 compatible:
20 oneOf:
21 + - description: msm9860 TSENS based
22 + items:
23 + - enum:
24 + - qcom,ipq8064-tsens
25 +
26 - description: v0.1 of TSENS
27 items:
28 - enum:
29 @@ -73,7 +78,9 @@ properties:
30 maxItems: 2
31 items:
32 - const: calib
33 - - const: calib_sel
34 + - enum:
35 + - calib_backup
36 + - calib_sel
37
38 "#qcom,sensors":
39 description:
40 @@ -88,12 +95,20 @@ properties:
41 Number of cells required to uniquely identify the thermal sensors. Since
42 we have multiple sensors this is set to 1
43
44 +required:
45 + - compatible
46 + - interrupts
47 + - interrupt-names
48 + - "#thermal-sensor-cells"
49 + - "#qcom,sensors"
50 +
51 allOf:
52 - if:
53 properties:
54 compatible:
55 contains:
56 enum:
57 + - qcom,ipq8064-tsens
58 - qcom,msm8916-tsens
59 - qcom,msm8974-tsens
60 - qcom,msm8976-tsens
61 @@ -114,19 +129,44 @@ allOf:
62 interrupt-names:
63 minItems: 2
64
65 -required:
66 - - compatible
67 - - reg
68 - - "#qcom,sensors"
69 - - interrupts
70 - - interrupt-names
71 - - "#thermal-sensor-cells"
72 + - if:
73 + properties:
74 + compatible:
75 + contains:
76 + enum:
77 + - qcom,tsens-v0_1
78 + - qcom,tsens-v1
79 + - qcom,tsens-v2
80 +
81 + then:
82 + required:
83 + - reg
84
85 additionalProperties: false
86
87 examples:
88 - |
89 #include <dt-bindings/interrupt-controller/arm-gic.h>
90 + // Example msm9860 based SoC (ipq8064):
91 + gcc: clock-controller {
92 +
93 + /* ... */
94 +
95 + tsens: thermal-sensor {
96 + compatible = "qcom,ipq8064-tsens";
97 +
98 + nvmem-cells = <&tsens_calib>, <&tsens_calib_backup>;
99 + nvmem-cell-names = "calib", "calib_backup";
100 + interrupts = <GIC_SPI 178 IRQ_TYPE_LEVEL_HIGH>;
101 + interrupt-names = "uplow";
102 +
103 + #qcom,sensors = <11>;
104 + #thermal-sensor-cells = <1>;
105 + };
106 + };
107 +
108 + - |
109 + #include <dt-bindings/interrupt-controller/arm-gic.h>
110 // Example 1 (legacy: for pre v1 IP):
111 tsens1: thermal-sensor@900000 {
112 compatible = "qcom,msm8916-tsens", "qcom,tsens-v0_1";