blob: dad8de900495e892e9bf39a106ec9d0f32261008 [file] [log] [blame]
Tom Rini53633a82024-02-29 12:33:36 -05001# 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
7title: Allwinner SUN8I Thermal Controller
8
9maintainers:
10 - Vasily Khoruzhick <anarsoul@gmail.com>
11 - Yangtao Li <tiny.windzz@gmail.com>
12
Tom Rini6b642ac2024-10-01 12:20:28 -060013$ref: thermal-sensor.yaml#
14
Tom Rini53633a82024-02-29 12:33:36 -050015properties:
16 compatible:
17 enum:
18 - allwinner,sun8i-a83t-ths
19 - allwinner,sun8i-h3-ths
20 - allwinner,sun8i-r40-ths
Tom Rini93743d22024-04-01 09:08:13 -040021 - allwinner,sun20i-d1-ths
Tom Rini53633a82024-02-29 12:33:36 -050022 - allwinner,sun50i-a64-ths
23 - allwinner,sun50i-a100-ths
24 - allwinner,sun50i-h5-ths
25 - allwinner,sun50i-h6-ths
Tom Rini6bb92fc2024-05-20 09:54:58 -060026 - allwinner,sun50i-h616-ths
Tom Rini53633a82024-02-29 12:33:36 -050027
28 clocks:
29 minItems: 1
30 items:
31 - description: Bus Clock
32 - description: Module Clock
33
34 clock-names:
35 minItems: 1
36 items:
37 - const: bus
38 - const: mod
39
40 reg:
41 maxItems: 1
42
43 interrupts:
44 maxItems: 1
45
46 resets:
47 maxItems: 1
48
49 nvmem-cells:
50 maxItems: 1
51 description: Calibration data for thermal sensors
52
53 nvmem-cell-names:
54 const: calibration
55
Tom Rini6bb92fc2024-05-20 09:54:58 -060056 allwinner,sram:
57 maxItems: 1
58 description: phandle to device controlling temperate offset SYS_CFG register
59
Tom Rini53633a82024-02-29 12:33:36 -050060 "#thermal-sensor-cells":
61 enum:
62 - 0
63 - 1
64
65allOf:
66 - if:
67 properties:
68 compatible:
69 contains:
70 enum:
Tom Rini93743d22024-04-01 09:08:13 -040071 - allwinner,sun20i-d1-ths
Tom Rini53633a82024-02-29 12:33:36 -050072 - allwinner,sun50i-a100-ths
73 - allwinner,sun50i-h6-ths
Tom Rini6bb92fc2024-05-20 09:54:58 -060074 - allwinner,sun50i-h616-ths
Tom Rini53633a82024-02-29 12:33:36 -050075
76 then:
77 properties:
78 clocks:
79 maxItems: 1
80
81 clock-names:
82 maxItems: 1
83
84 else:
85 properties:
86 clocks:
87 minItems: 2
88
89 clock-names:
90 minItems: 2
91
92 - if:
Tom Rini6bb92fc2024-05-20 09:54:58 -060093 not:
94 properties:
95 compatible:
96 contains:
97 const: allwinner,sun50i-h616-ths
98
99 then:
100 properties:
101 allwinner,sram: false
102
103 - if:
Tom Rini53633a82024-02-29 12:33:36 -0500104 properties:
105 compatible:
106 contains:
Tom Rini93743d22024-04-01 09:08:13 -0400107 enum:
108 - allwinner,sun8i-h3-ths
109 - allwinner,sun20i-d1-ths
Tom Rini53633a82024-02-29 12:33:36 -0500110
111 then:
112 properties:
113 "#thermal-sensor-cells":
114 const: 0
115
116 else:
117 properties:
118 "#thermal-sensor-cells":
119 const: 1
120
121 - if:
Tom Rini6bb92fc2024-05-20 09:54:58 -0600122 not:
123 properties:
124 compatible:
125 contains:
126 enum:
127 - allwinner,sun8i-a83t-ths
Tom Rini53633a82024-02-29 12:33:36 -0500128
129 then:
130 required:
131 - clocks
132 - clock-names
133 - resets
134
135required:
136 - compatible
137 - reg
138 - interrupts
Tom Rini53633a82024-02-29 12:33:36 -0500139
Tom Rini6b642ac2024-10-01 12:20:28 -0600140unevaluatedProperties: false
Tom Rini53633a82024-02-29 12:33:36 -0500141
142examples:
143 - |
144 thermal-sensor@1f04000 {
145 compatible = "allwinner,sun8i-a83t-ths";
146 reg = <0x01f04000 0x100>;
147 interrupts = <0 31 0>;
148 nvmem-cells = <&ths_calibration>;
149 nvmem-cell-names = "calibration";
150 #thermal-sensor-cells = <1>;
151 };
152
153 - |
154 thermal-sensor@1c25000 {
155 compatible = "allwinner,sun8i-h3-ths";
156 reg = <0x01c25000 0x400>;
157 clocks = <&ccu 0>, <&ccu 1>;
158 clock-names = "bus", "mod";
159 resets = <&ccu 2>;
160 interrupts = <0 31 0>;
161 nvmem-cells = <&ths_calibration>;
162 nvmem-cell-names = "calibration";
163 #thermal-sensor-cells = <0>;
164 };
165
166 - |
167 thermal-sensor@5070400 {
168 compatible = "allwinner,sun50i-h6-ths";
169 reg = <0x05070400 0x100>;
170 clocks = <&ccu 0>;
171 clock-names = "bus";
172 resets = <&ccu 2>;
173 interrupts = <0 15 0>;
174 nvmem-cells = <&ths_calibration>;
175 nvmem-cell-names = "calibration";
176 #thermal-sensor-cells = <1>;
177 };
178
179...