]>
Commit | Line | Data |
---|---|---|
53633a89 TR |
1 | # SPDX-License-Identifier: GPL-2.0 |
2 | %YAML 1.2 | |
3 | --- | |
4 | $id: http://devicetree.org/schemas/thermal/allwinner,sun8i-a83t-ths.yaml# | |
5 | $schema: http://devicetree.org/meta-schemas/core.yaml# | |
6 | ||
7 | title: Allwinner SUN8I Thermal Controller | |
8 | ||
9 | maintainers: | |
10 | - Vasily Khoruzhick <anarsoul@gmail.com> | |
11 | - Yangtao Li <tiny.windzz@gmail.com> | |
12 | ||
13 | properties: | |
14 | compatible: | |
15 | enum: | |
16 | - allwinner,sun8i-a83t-ths | |
17 | - allwinner,sun8i-h3-ths | |
18 | - allwinner,sun8i-r40-ths | |
93743d24 | 19 | - allwinner,sun20i-d1-ths |
53633a89 TR |
20 | - allwinner,sun50i-a64-ths |
21 | - allwinner,sun50i-a100-ths | |
22 | - allwinner,sun50i-h5-ths | |
23 | - allwinner,sun50i-h6-ths | |
24 | ||
25 | clocks: | |
26 | minItems: 1 | |
27 | items: | |
28 | - description: Bus Clock | |
29 | - description: Module Clock | |
30 | ||
31 | clock-names: | |
32 | minItems: 1 | |
33 | items: | |
34 | - const: bus | |
35 | - const: mod | |
36 | ||
37 | reg: | |
38 | maxItems: 1 | |
39 | ||
40 | interrupts: | |
41 | maxItems: 1 | |
42 | ||
43 | resets: | |
44 | maxItems: 1 | |
45 | ||
46 | nvmem-cells: | |
47 | maxItems: 1 | |
48 | description: Calibration data for thermal sensors | |
49 | ||
50 | nvmem-cell-names: | |
51 | const: calibration | |
52 | ||
53 | # See Documentation/devicetree/bindings/thermal/thermal-sensor.yaml for details | |
54 | "#thermal-sensor-cells": | |
55 | enum: | |
56 | - 0 | |
57 | - 1 | |
58 | ||
59 | allOf: | |
60 | - if: | |
61 | properties: | |
62 | compatible: | |
63 | contains: | |
64 | enum: | |
93743d24 | 65 | - allwinner,sun20i-d1-ths |
53633a89 TR |
66 | - allwinner,sun50i-a100-ths |
67 | - allwinner,sun50i-h6-ths | |
68 | ||
69 | then: | |
70 | properties: | |
71 | clocks: | |
72 | maxItems: 1 | |
73 | ||
74 | clock-names: | |
75 | maxItems: 1 | |
76 | ||
77 | else: | |
78 | properties: | |
79 | clocks: | |
80 | minItems: 2 | |
81 | ||
82 | clock-names: | |
83 | minItems: 2 | |
84 | ||
85 | - if: | |
86 | properties: | |
87 | compatible: | |
88 | contains: | |
93743d24 TR |
89 | enum: |
90 | - allwinner,sun8i-h3-ths | |
91 | - allwinner,sun20i-d1-ths | |
53633a89 TR |
92 | |
93 | then: | |
94 | properties: | |
95 | "#thermal-sensor-cells": | |
96 | const: 0 | |
97 | ||
98 | else: | |
99 | properties: | |
100 | "#thermal-sensor-cells": | |
101 | const: 1 | |
102 | ||
103 | - if: | |
104 | properties: | |
105 | compatible: | |
106 | contains: | |
107 | enum: | |
108 | - allwinner,sun8i-h3-ths | |
109 | - allwinner,sun8i-r40-ths | |
93743d24 | 110 | - allwinner,sun20i-d1-ths |
53633a89 TR |
111 | - allwinner,sun50i-a64-ths |
112 | - allwinner,sun50i-a100-ths | |
113 | - allwinner,sun50i-h5-ths | |
114 | - allwinner,sun50i-h6-ths | |
115 | ||
116 | then: | |
117 | required: | |
118 | - clocks | |
119 | - clock-names | |
120 | - resets | |
121 | ||
122 | required: | |
123 | - compatible | |
124 | - reg | |
125 | - interrupts | |
126 | - '#thermal-sensor-cells' | |
127 | ||
128 | additionalProperties: false | |
129 | ||
130 | examples: | |
131 | - | | |
132 | thermal-sensor@1f04000 { | |
133 | compatible = "allwinner,sun8i-a83t-ths"; | |
134 | reg = <0x01f04000 0x100>; | |
135 | interrupts = <0 31 0>; | |
136 | nvmem-cells = <&ths_calibration>; | |
137 | nvmem-cell-names = "calibration"; | |
138 | #thermal-sensor-cells = <1>; | |
139 | }; | |
140 | ||
141 | - | | |
142 | thermal-sensor@1c25000 { | |
143 | compatible = "allwinner,sun8i-h3-ths"; | |
144 | reg = <0x01c25000 0x400>; | |
145 | clocks = <&ccu 0>, <&ccu 1>; | |
146 | clock-names = "bus", "mod"; | |
147 | resets = <&ccu 2>; | |
148 | interrupts = <0 31 0>; | |
149 | nvmem-cells = <&ths_calibration>; | |
150 | nvmem-cell-names = "calibration"; | |
151 | #thermal-sensor-cells = <0>; | |
152 | }; | |
153 | ||
154 | - | | |
155 | thermal-sensor@5070400 { | |
156 | compatible = "allwinner,sun50i-h6-ths"; | |
157 | reg = <0x05070400 0x100>; | |
158 | clocks = <&ccu 0>; | |
159 | clock-names = "bus"; | |
160 | resets = <&ccu 2>; | |
161 | interrupts = <0 15 0>; | |
162 | nvmem-cells = <&ths_calibration>; | |
163 | nvmem-cell-names = "calibration"; | |
164 | #thermal-sensor-cells = <1>; | |
165 | }; | |
166 | ||
167 | ... |