blob: d7d920e9e481154ac8636f8f6f20212b376d49f4 [file] [log] [blame]
Hans de Goededb325e82015-04-15 19:03:49 +02001/*
2 * Copyright 2013 Maxime Ripard
3 *
4 * Maxime Ripard <maxime.ripard@free-electrons.com>
5 *
6 * This file is dual-licensed: you can use it either under the terms
7 * of the GPL or the X11 license, at your option. Note that this dual
8 * licensing only applies to this file, and not this project as a
9 * whole.
10 *
11 * a) This file is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License as
13 * published by the Free Software Foundation; either version 2 of the
14 * License, or (at your option) any later version.
15 *
16 * This file is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
20 *
Hans de Goededb325e82015-04-15 19:03:49 +020021 * Or, alternatively,
22 *
23 * b) Permission is hereby granted, free of charge, to any person
24 * obtaining a copy of this software and associated documentation
25 * files (the "Software"), to deal in the Software without
26 * restriction, including without limitation the rights to use,
27 * copy, modify, merge, publish, distribute, sublicense, and/or
28 * sell copies of the Software, and to permit persons to whom the
29 * Software is furnished to do so, subject to the following
30 * conditions:
31 *
32 * The above copyright notice and this permission notice shall be
33 * included in all copies or substantial portions of the Software.
34 *
35 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
36 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
37 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
38 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
39 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
40 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
41 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
42 * OTHER DEALINGS IN THE SOFTWARE.
43 */
44
Hans de Goededb325e82015-04-15 19:03:49 +020045#include <dt-bindings/interrupt-controller/arm-gic.h>
46#include <dt-bindings/thermal/thermal.h>
47
Jagan Teki1e097442018-08-05 00:40:09 +053048#include <dt-bindings/clock/sun6i-a31-ccu.h>
49#include <dt-bindings/reset/sun6i-a31-ccu.h>
Hans de Goededb325e82015-04-15 19:03:49 +020050
51/ {
52 interrupt-parent = <&gic>;
Samuel Holland8d6fe612022-04-27 15:31:24 -050053 #address-cells = <1>;
54 #size-cells = <1>;
Hans de Goededb325e82015-04-15 19:03:49 +020055
56 aliases {
57 ethernet0 = &gmac;
58 };
59
60 chosen {
61 #address-cells = <1>;
62 #size-cells = <1>;
63 ranges;
64
Samuel Holland8d6fe612022-04-27 15:31:24 -050065 simplefb_hdmi: framebuffer-lcd0-hdmi {
Hans de Goede6ef1be32015-06-02 15:53:40 +020066 compatible = "allwinner,simple-framebuffer",
67 "simple-framebuffer";
Hans de Goededb325e82015-04-15 19:03:49 +020068 allwinner,pipeline = "de_be0-lcd0-hdmi";
Jagan Teki1e097442018-08-05 00:40:09 +053069 clocks = <&ccu CLK_AHB1_BE0>, <&ccu CLK_AHB1_LCD0>,
70 <&ccu CLK_AHB1_HDMI>, <&ccu CLK_DRAM_BE0>,
71 <&ccu CLK_IEP_DRC0>, <&ccu CLK_BE0>,
72 <&ccu CLK_LCD0_CH1>, <&ccu CLK_HDMI>;
Hans de Goededb325e82015-04-15 19:03:49 +020073 status = "disabled";
74 };
75
Samuel Holland8d6fe612022-04-27 15:31:24 -050076 simplefb_lcd: framebuffer-lcd0 {
Hans de Goededb325e82015-04-15 19:03:49 +020077 compatible = "allwinner,simple-framebuffer",
78 "simple-framebuffer";
79 allwinner,pipeline = "de_be0-lcd0";
Jagan Teki1e097442018-08-05 00:40:09 +053080 clocks = <&ccu CLK_AHB1_BE0>, <&ccu CLK_AHB1_LCD0>,
81 <&ccu CLK_DRAM_BE0>, <&ccu CLK_IEP_DRC0>,
82 <&ccu CLK_BE0>, <&ccu CLK_LCD0_CH0>;
Hans de Goededb325e82015-04-15 19:03:49 +020083 status = "disabled";
84 };
85 };
86
87 timer {
88 compatible = "arm,armv7-timer";
89 interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
90 <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
91 <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
92 <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>;
93 clock-frequency = <24000000>;
94 arm,cpu-registers-not-fw-configured;
95 };
96
97 cpus {
98 enable-method = "allwinner,sun6i-a31";
99 #address-cells = <1>;
100 #size-cells = <0>;
101
102 cpu0: cpu@0 {
103 compatible = "arm,cortex-a7";
104 device_type = "cpu";
105 reg = <0>;
Jagan Teki1e097442018-08-05 00:40:09 +0530106 clocks = <&ccu CLK_CPU>;
Hans de Goededb325e82015-04-15 19:03:49 +0200107 clock-latency = <244144>; /* 8 32k periods */
Samuel Holland8d6fe612022-04-27 15:31:24 -0500108 operating-points =
Hans de Goede6ef1be32015-06-02 15:53:40 +0200109 /* kHz uV */
Samuel Holland8d6fe612022-04-27 15:31:24 -0500110 <1008000 1200000>,
111 <864000 1200000>,
112 <720000 1100000>,
113 <480000 1000000>;
Hans de Goededb325e82015-04-15 19:03:49 +0200114 #cooling-cells = <2>;
Hans de Goededb325e82015-04-15 19:03:49 +0200115 };
116
Samuel Holland8d6fe612022-04-27 15:31:24 -0500117 cpu1: cpu@1 {
Hans de Goededb325e82015-04-15 19:03:49 +0200118 compatible = "arm,cortex-a7";
119 device_type = "cpu";
120 reg = <1>;
Samuel Holland8d6fe612022-04-27 15:31:24 -0500121 clocks = <&ccu CLK_CPU>;
122 clock-latency = <244144>; /* 8 32k periods */
123 operating-points =
124 /* kHz uV */
125 <1008000 1200000>,
126 <864000 1200000>,
127 <720000 1100000>,
128 <480000 1000000>;
129 #cooling-cells = <2>;
Hans de Goededb325e82015-04-15 19:03:49 +0200130 };
131
Samuel Holland8d6fe612022-04-27 15:31:24 -0500132 cpu2: cpu@2 {
Hans de Goededb325e82015-04-15 19:03:49 +0200133 compatible = "arm,cortex-a7";
134 device_type = "cpu";
135 reg = <2>;
Samuel Holland8d6fe612022-04-27 15:31:24 -0500136 clocks = <&ccu CLK_CPU>;
137 clock-latency = <244144>; /* 8 32k periods */
138 operating-points =
139 /* kHz uV */
140 <1008000 1200000>,
141 <864000 1200000>,
142 <720000 1100000>,
143 <480000 1000000>;
144 #cooling-cells = <2>;
Hans de Goededb325e82015-04-15 19:03:49 +0200145 };
146
Samuel Holland8d6fe612022-04-27 15:31:24 -0500147 cpu3: cpu@3 {
Hans de Goededb325e82015-04-15 19:03:49 +0200148 compatible = "arm,cortex-a7";
149 device_type = "cpu";
150 reg = <3>;
Samuel Holland8d6fe612022-04-27 15:31:24 -0500151 clocks = <&ccu CLK_CPU>;
152 clock-latency = <244144>; /* 8 32k periods */
153 operating-points =
154 /* kHz uV */
155 <1008000 1200000>,
156 <864000 1200000>,
157 <720000 1100000>,
158 <480000 1000000>;
159 #cooling-cells = <2>;
Hans de Goededb325e82015-04-15 19:03:49 +0200160 };
161 };
162
163 thermal-zones {
Samuel Holland8d6fe612022-04-27 15:31:24 -0500164 cpu-thermal {
Hans de Goededb325e82015-04-15 19:03:49 +0200165 /* milliseconds */
166 polling-delay-passive = <250>;
167 polling-delay = <1000>;
168 thermal-sensors = <&rtp>;
169
170 cooling-maps {
171 map0 {
172 trip = <&cpu_alert0>;
Samuel Holland8d6fe612022-04-27 15:31:24 -0500173 cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
174 <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
175 <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
176 <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
Hans de Goededb325e82015-04-15 19:03:49 +0200177 };
178 };
179
180 trips {
181 cpu_alert0: cpu_alert0 {
182 /* milliCelsius */
183 temperature = <70000>;
184 hysteresis = <2000>;
185 type = "passive";
186 };
187
188 cpu_crit: cpu_crit {
189 /* milliCelsius */
190 temperature = <100000>;
191 hysteresis = <2000>;
192 type = "critical";
193 };
194 };
195 };
196 };
197
Hans de Goededb325e82015-04-15 19:03:49 +0200198 pmu {
Samuel Holland8d6fe612022-04-27 15:31:24 -0500199 compatible = "arm,cortex-a7-pmu";
Hans de Goededb325e82015-04-15 19:03:49 +0200200 interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>,
201 <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>,
202 <GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>,
203 <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>;
204 };
205
206 clocks {
207 #address-cells = <1>;
208 #size-cells = <1>;
209 ranges;
210
Samuel Holland8d6fe612022-04-27 15:31:24 -0500211 osc24M: clk-24M {
Hans de Goededb325e82015-04-15 19:03:49 +0200212 #clock-cells = <0>;
213 compatible = "fixed-clock";
214 clock-frequency = <24000000>;
Samuel Holland8d6fe612022-04-27 15:31:24 -0500215 clock-accuracy = <50000>;
216 clock-output-names = "osc24M";
Hans de Goededb325e82015-04-15 19:03:49 +0200217 };
218
Samuel Holland8d6fe612022-04-27 15:31:24 -0500219 osc32k: clk-32k {
Hans de Goededb325e82015-04-15 19:03:49 +0200220 #clock-cells = <0>;
221 compatible = "fixed-clock";
222 clock-frequency = <32768>;
Samuel Holland8d6fe612022-04-27 15:31:24 -0500223 clock-accuracy = <50000>;
224 clock-output-names = "ext_osc32k";
Hans de Goededb325e82015-04-15 19:03:49 +0200225 };
226
Hans de Goededb325e82015-04-15 19:03:49 +0200227 /*
Hans de Goede6ef1be32015-06-02 15:53:40 +0200228 * The following two are dummy clocks, placeholders
229 * used in the gmac_tx clock. The gmac driver will
230 * choose one parent depending on the PHY interface
231 * mode, using clk_set_rate auto-reparenting.
232 *
233 * The actual TX clock rate is not controlled by the
234 * gmac_tx clock.
Hans de Goededb325e82015-04-15 19:03:49 +0200235 */
Samuel Holland8d6fe612022-04-27 15:31:24 -0500236 mii_phy_tx_clk: clk-mii-phy-tx {
Hans de Goededb325e82015-04-15 19:03:49 +0200237 #clock-cells = <0>;
238 compatible = "fixed-clock";
239 clock-frequency = <25000000>;
240 clock-output-names = "mii_phy_tx";
241 };
242
Samuel Holland8d6fe612022-04-27 15:31:24 -0500243 gmac_int_tx_clk: clk-gmac-int-tx {
Hans de Goededb325e82015-04-15 19:03:49 +0200244 #clock-cells = <0>;
245 compatible = "fixed-clock";
246 clock-frequency = <125000000>;
247 clock-output-names = "gmac_int_tx";
248 };
249
Jagan Teki1e097442018-08-05 00:40:09 +0530250 gmac_tx_clk: clk@1c200d0 {
Hans de Goededb325e82015-04-15 19:03:49 +0200251 #clock-cells = <0>;
252 compatible = "allwinner,sun7i-a20-gmac-clk";
253 reg = <0x01c200d0 0x4>;
254 clocks = <&mii_phy_tx_clk>, <&gmac_int_tx_clk>;
255 clock-output-names = "gmac_tx";
256 };
257 };
258
Jagan Teki1e097442018-08-05 00:40:09 +0530259 de: display-engine {
260 compatible = "allwinner,sun6i-a31-display-engine";
261 allwinner,pipelines = <&fe0>, <&fe1>;
262 status = "disabled";
263 };
264
Samuel Holland8d6fe612022-04-27 15:31:24 -0500265 soc {
Hans de Goededb325e82015-04-15 19:03:49 +0200266 compatible = "simple-bus";
267 #address-cells = <1>;
268 #size-cells = <1>;
269 ranges;
270
Jagan Teki1e097442018-08-05 00:40:09 +0530271 dma: dma-controller@1c02000 {
Hans de Goededb325e82015-04-15 19:03:49 +0200272 compatible = "allwinner,sun6i-a31-dma";
273 reg = <0x01c02000 0x1000>;
274 interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>;
Jagan Teki1e097442018-08-05 00:40:09 +0530275 clocks = <&ccu CLK_AHB1_DMA>;
276 resets = <&ccu RST_AHB1_DMA>;
Hans de Goededb325e82015-04-15 19:03:49 +0200277 #dma-cells = <1>;
Hans de Goededb325e82015-04-15 19:03:49 +0200278 };
279
Jagan Teki1e097442018-08-05 00:40:09 +0530280 tcon0: lcd-controller@1c0c000 {
281 compatible = "allwinner,sun6i-a31-tcon";
282 reg = <0x01c0c000 0x1000>;
283 interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
Samuel Holland8d6fe612022-04-27 15:31:24 -0500284 dmas = <&dma 11>;
285 resets = <&ccu RST_AHB1_LCD0>,
286 <&ccu RST_AHB1_LVDS>;
287 reset-names = "lcd",
288 "lvds";
Jagan Teki1e097442018-08-05 00:40:09 +0530289 clocks = <&ccu CLK_AHB1_LCD0>,
290 <&ccu CLK_LCD0_CH0>,
Samuel Holland8d6fe612022-04-27 15:31:24 -0500291 <&ccu CLK_LCD0_CH1>,
292 <&ccu 15>;
Jagan Teki1e097442018-08-05 00:40:09 +0530293 clock-names = "ahb",
294 "tcon-ch0",
Samuel Holland8d6fe612022-04-27 15:31:24 -0500295 "tcon-ch1",
296 "lvds-alt";
Jagan Teki1e097442018-08-05 00:40:09 +0530297 clock-output-names = "tcon0-pixel-clock";
Samuel Holland8d6fe612022-04-27 15:31:24 -0500298 #clock-cells = <0>;
Jagan Teki1e097442018-08-05 00:40:09 +0530299
300 ports {
301 #address-cells = <1>;
302 #size-cells = <0>;
303
304 tcon0_in: port@0 {
305 #address-cells = <1>;
306 #size-cells = <0>;
307 reg = <0>;
308
309 tcon0_in_drc0: endpoint@0 {
310 reg = <0>;
311 remote-endpoint = <&drc0_out_tcon0>;
312 };
313
314 tcon0_in_drc1: endpoint@1 {
315 reg = <1>;
316 remote-endpoint = <&drc1_out_tcon0>;
317 };
318 };
319
320 tcon0_out: port@1 {
321 #address-cells = <1>;
322 #size-cells = <0>;
323 reg = <1>;
324
325 tcon0_out_hdmi: endpoint@1 {
326 reg = <1>;
327 remote-endpoint = <&hdmi_in_tcon0>;
328 allwinner,tcon-channel = <1>;
329 };
330 };
331 };
332 };
333
334 tcon1: lcd-controller@1c0d000 {
335 compatible = "allwinner,sun6i-a31-tcon";
336 reg = <0x01c0d000 0x1000>;
337 interrupts = <GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH>;
Samuel Holland8d6fe612022-04-27 15:31:24 -0500338 dmas = <&dma 12>;
339 resets = <&ccu RST_AHB1_LCD1>,
340 <&ccu RST_AHB1_LVDS>;
341 reset-names = "lcd", "lvds";
Jagan Teki1e097442018-08-05 00:40:09 +0530342 clocks = <&ccu CLK_AHB1_LCD1>,
343 <&ccu CLK_LCD1_CH0>,
Samuel Holland8d6fe612022-04-27 15:31:24 -0500344 <&ccu CLK_LCD1_CH1>,
345 <&ccu 15>;
Jagan Teki1e097442018-08-05 00:40:09 +0530346 clock-names = "ahb",
347 "tcon-ch0",
Samuel Holland8d6fe612022-04-27 15:31:24 -0500348 "tcon-ch1",
349 "lvds-alt";
Jagan Teki1e097442018-08-05 00:40:09 +0530350 clock-output-names = "tcon1-pixel-clock";
Samuel Holland8d6fe612022-04-27 15:31:24 -0500351 #clock-cells = <0>;
Jagan Teki1e097442018-08-05 00:40:09 +0530352
353 ports {
354 #address-cells = <1>;
355 #size-cells = <0>;
356
357 tcon1_in: port@0 {
358 #address-cells = <1>;
359 #size-cells = <0>;
360 reg = <0>;
361
362 tcon1_in_drc0: endpoint@0 {
363 reg = <0>;
364 remote-endpoint = <&drc0_out_tcon1>;
365 };
366
367 tcon1_in_drc1: endpoint@1 {
368 reg = <1>;
369 remote-endpoint = <&drc1_out_tcon1>;
370 };
371 };
372
373 tcon1_out: port@1 {
374 #address-cells = <1>;
375 #size-cells = <0>;
376 reg = <1>;
377
378 tcon1_out_hdmi: endpoint@1 {
379 reg = <1>;
380 remote-endpoint = <&hdmi_in_tcon1>;
381 allwinner,tcon-channel = <1>;
382 };
383 };
384 };
385 };
386
387 mmc0: mmc@1c0f000 {
388 compatible = "allwinner,sun7i-a20-mmc";
Hans de Goededb325e82015-04-15 19:03:49 +0200389 reg = <0x01c0f000 0x1000>;
Jagan Teki1e097442018-08-05 00:40:09 +0530390 clocks = <&ccu CLK_AHB1_MMC0>,
391 <&ccu CLK_MMC0>,
392 <&ccu CLK_MMC0_OUTPUT>,
393 <&ccu CLK_MMC0_SAMPLE>;
Hans de Goededb325e82015-04-15 19:03:49 +0200394 clock-names = "ahb",
395 "mmc",
396 "output",
397 "sample";
Jagan Teki1e097442018-08-05 00:40:09 +0530398 resets = <&ccu RST_AHB1_MMC0>;
Hans de Goededb325e82015-04-15 19:03:49 +0200399 reset-names = "ahb";
400 interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>;
Samuel Holland8d6fe612022-04-27 15:31:24 -0500401 pinctrl-names = "default";
402 pinctrl-0 = <&mmc0_pins>;
Hans de Goededb325e82015-04-15 19:03:49 +0200403 status = "disabled";
404 #address-cells = <1>;
405 #size-cells = <0>;
406 };
407
Jagan Teki1e097442018-08-05 00:40:09 +0530408 mmc1: mmc@1c10000 {
409 compatible = "allwinner,sun7i-a20-mmc";
Hans de Goededb325e82015-04-15 19:03:49 +0200410 reg = <0x01c10000 0x1000>;
Jagan Teki1e097442018-08-05 00:40:09 +0530411 clocks = <&ccu CLK_AHB1_MMC1>,
412 <&ccu CLK_MMC1>,
413 <&ccu CLK_MMC1_OUTPUT>,
414 <&ccu CLK_MMC1_SAMPLE>;
Hans de Goededb325e82015-04-15 19:03:49 +0200415 clock-names = "ahb",
416 "mmc",
417 "output",
418 "sample";
Jagan Teki1e097442018-08-05 00:40:09 +0530419 resets = <&ccu RST_AHB1_MMC1>;
Hans de Goededb325e82015-04-15 19:03:49 +0200420 reset-names = "ahb";
421 interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>;
Samuel Holland8d6fe612022-04-27 15:31:24 -0500422 pinctrl-names = "default";
423 pinctrl-0 = <&mmc1_pins>;
Hans de Goededb325e82015-04-15 19:03:49 +0200424 status = "disabled";
425 #address-cells = <1>;
426 #size-cells = <0>;
427 };
428
Jagan Teki1e097442018-08-05 00:40:09 +0530429 mmc2: mmc@1c11000 {
430 compatible = "allwinner,sun7i-a20-mmc";
Hans de Goededb325e82015-04-15 19:03:49 +0200431 reg = <0x01c11000 0x1000>;
Jagan Teki1e097442018-08-05 00:40:09 +0530432 clocks = <&ccu CLK_AHB1_MMC2>,
433 <&ccu CLK_MMC2>,
434 <&ccu CLK_MMC2_OUTPUT>,
435 <&ccu CLK_MMC2_SAMPLE>;
Hans de Goededb325e82015-04-15 19:03:49 +0200436 clock-names = "ahb",
437 "mmc",
438 "output",
439 "sample";
Jagan Teki1e097442018-08-05 00:40:09 +0530440 resets = <&ccu RST_AHB1_MMC2>;
Hans de Goededb325e82015-04-15 19:03:49 +0200441 reset-names = "ahb";
442 interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>;
443 status = "disabled";
444 #address-cells = <1>;
445 #size-cells = <0>;
446 };
447
Jagan Teki1e097442018-08-05 00:40:09 +0530448 mmc3: mmc@1c12000 {
449 compatible = "allwinner,sun7i-a20-mmc";
Hans de Goededb325e82015-04-15 19:03:49 +0200450 reg = <0x01c12000 0x1000>;
Jagan Teki1e097442018-08-05 00:40:09 +0530451 clocks = <&ccu CLK_AHB1_MMC3>,
452 <&ccu CLK_MMC3>,
453 <&ccu CLK_MMC3_OUTPUT>,
454 <&ccu CLK_MMC3_SAMPLE>;
Hans de Goededb325e82015-04-15 19:03:49 +0200455 clock-names = "ahb",
456 "mmc",
457 "output",
458 "sample";
Jagan Teki1e097442018-08-05 00:40:09 +0530459 resets = <&ccu RST_AHB1_MMC3>;
Hans de Goededb325e82015-04-15 19:03:49 +0200460 reset-names = "ahb";
461 interrupts = <GIC_SPI 63 IRQ_TYPE_LEVEL_HIGH>;
462 status = "disabled";
463 #address-cells = <1>;
464 #size-cells = <0>;
465 };
466
Jagan Teki1e097442018-08-05 00:40:09 +0530467 hdmi: hdmi@1c16000 {
468 compatible = "allwinner,sun6i-a31-hdmi";
469 reg = <0x01c16000 0x1000>;
470 interrupts = <GIC_SPI 88 IRQ_TYPE_LEVEL_HIGH>;
471 clocks = <&ccu CLK_AHB1_HDMI>, <&ccu CLK_HDMI>,
472 <&ccu CLK_HDMI_DDC>,
473 <&ccu CLK_PLL_VIDEO0_2X>,
474 <&ccu CLK_PLL_VIDEO1_2X>;
475 clock-names = "ahb", "mod", "ddc", "pll-0", "pll-1";
476 resets = <&ccu RST_AHB1_HDMI>;
Jagan Teki1e097442018-08-05 00:40:09 +0530477 dma-names = "ddc-tx", "ddc-rx", "audio-tx";
478 dmas = <&dma 13>, <&dma 13>, <&dma 14>;
479 status = "disabled";
480
481 ports {
482 #address-cells = <1>;
483 #size-cells = <0>;
484
485 hdmi_in: port@0 {
486 #address-cells = <1>;
487 #size-cells = <0>;
488 reg = <0>;
489
490 hdmi_in_tcon0: endpoint@0 {
491 reg = <0>;
492 remote-endpoint = <&tcon0_out_hdmi>;
493 };
494
495 hdmi_in_tcon1: endpoint@1 {
496 reg = <1>;
497 remote-endpoint = <&tcon1_out_hdmi>;
498 };
499 };
500
501 hdmi_out: port@1 {
Jagan Teki1e097442018-08-05 00:40:09 +0530502 reg = <1>;
503 };
504 };
505 };
506
507 usb_otg: usb@1c19000 {
Hans de Goede7d831822015-08-05 17:39:14 +0200508 compatible = "allwinner,sun6i-a31-musb";
509 reg = <0x01c19000 0x0400>;
Jagan Teki1e097442018-08-05 00:40:09 +0530510 clocks = <&ccu CLK_AHB1_OTG>;
511 resets = <&ccu RST_AHB1_OTG>;
Hans de Goede7d831822015-08-05 17:39:14 +0200512 interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
513 interrupt-names = "mc";
514 phys = <&usbphy 0>;
515 phy-names = "usb";
516 extcon = <&usbphy 0>;
Samuel Holland8d6fe612022-04-27 15:31:24 -0500517 dr_mode = "otg";
Hans de Goede7d831822015-08-05 17:39:14 +0200518 status = "disabled";
519 };
520
Jagan Teki1e097442018-08-05 00:40:09 +0530521 usbphy: phy@1c19400 {
Hans de Goededb325e82015-04-15 19:03:49 +0200522 compatible = "allwinner,sun6i-a31-usb-phy";
523 reg = <0x01c19400 0x10>,
524 <0x01c1a800 0x4>,
525 <0x01c1b800 0x4>;
526 reg-names = "phy_ctrl",
527 "pmu1",
528 "pmu2";
Jagan Teki1e097442018-08-05 00:40:09 +0530529 clocks = <&ccu CLK_USB_PHY0>,
530 <&ccu CLK_USB_PHY1>,
531 <&ccu CLK_USB_PHY2>;
Hans de Goededb325e82015-04-15 19:03:49 +0200532 clock-names = "usb0_phy",
533 "usb1_phy",
534 "usb2_phy";
Jagan Teki1e097442018-08-05 00:40:09 +0530535 resets = <&ccu RST_USB_PHY0>,
536 <&ccu RST_USB_PHY1>,
537 <&ccu RST_USB_PHY2>;
Hans de Goededb325e82015-04-15 19:03:49 +0200538 reset-names = "usb0_reset",
539 "usb1_reset",
540 "usb2_reset";
541 status = "disabled";
542 #phy-cells = <1>;
543 };
544
Jagan Teki1e097442018-08-05 00:40:09 +0530545 ehci0: usb@1c1a000 {
Hans de Goededb325e82015-04-15 19:03:49 +0200546 compatible = "allwinner,sun6i-a31-ehci", "generic-ehci";
547 reg = <0x01c1a000 0x100>;
548 interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>;
Jagan Teki1e097442018-08-05 00:40:09 +0530549 clocks = <&ccu CLK_AHB1_EHCI0>;
550 resets = <&ccu RST_AHB1_EHCI0>;
Hans de Goededb325e82015-04-15 19:03:49 +0200551 phys = <&usbphy 1>;
552 phy-names = "usb";
553 status = "disabled";
554 };
555
Jagan Teki1e097442018-08-05 00:40:09 +0530556 ohci0: usb@1c1a400 {
Hans de Goededb325e82015-04-15 19:03:49 +0200557 compatible = "allwinner,sun6i-a31-ohci", "generic-ohci";
558 reg = <0x01c1a400 0x100>;
559 interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>;
Jagan Teki1e097442018-08-05 00:40:09 +0530560 clocks = <&ccu CLK_AHB1_OHCI0>, <&ccu CLK_USB_OHCI0>;
561 resets = <&ccu RST_AHB1_OHCI0>;
Hans de Goededb325e82015-04-15 19:03:49 +0200562 phys = <&usbphy 1>;
563 phy-names = "usb";
564 status = "disabled";
565 };
566
Jagan Teki1e097442018-08-05 00:40:09 +0530567 ehci1: usb@1c1b000 {
Hans de Goededb325e82015-04-15 19:03:49 +0200568 compatible = "allwinner,sun6i-a31-ehci", "generic-ehci";
569 reg = <0x01c1b000 0x100>;
570 interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>;
Jagan Teki1e097442018-08-05 00:40:09 +0530571 clocks = <&ccu CLK_AHB1_EHCI1>;
572 resets = <&ccu RST_AHB1_EHCI1>;
Hans de Goededb325e82015-04-15 19:03:49 +0200573 phys = <&usbphy 2>;
574 phy-names = "usb";
575 status = "disabled";
576 };
577
Jagan Teki1e097442018-08-05 00:40:09 +0530578 ohci1: usb@1c1b400 {
Hans de Goededb325e82015-04-15 19:03:49 +0200579 compatible = "allwinner,sun6i-a31-ohci", "generic-ohci";
580 reg = <0x01c1b400 0x100>;
581 interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>;
Jagan Teki1e097442018-08-05 00:40:09 +0530582 clocks = <&ccu CLK_AHB1_OHCI1>, <&ccu CLK_USB_OHCI1>;
583 resets = <&ccu RST_AHB1_OHCI1>;
Hans de Goededb325e82015-04-15 19:03:49 +0200584 phys = <&usbphy 2>;
585 phy-names = "usb";
586 status = "disabled";
587 };
588
Jagan Teki1e097442018-08-05 00:40:09 +0530589 ohci2: usb@1c1c400 {
Hans de Goededb325e82015-04-15 19:03:49 +0200590 compatible = "allwinner,sun6i-a31-ohci", "generic-ohci";
591 reg = <0x01c1c400 0x100>;
592 interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>;
Jagan Teki1e097442018-08-05 00:40:09 +0530593 clocks = <&ccu CLK_AHB1_OHCI2>, <&ccu CLK_USB_OHCI2>;
594 resets = <&ccu RST_AHB1_OHCI2>;
Hans de Goededb325e82015-04-15 19:03:49 +0200595 status = "disabled";
596 };
597
Jagan Teki1e097442018-08-05 00:40:09 +0530598 ccu: clock@1c20000 {
599 compatible = "allwinner,sun6i-a31-ccu";
600 reg = <0x01c20000 0x400>;
Samuel Holland8d6fe612022-04-27 15:31:24 -0500601 clocks = <&osc24M>, <&rtc 0>;
Jagan Teki1e097442018-08-05 00:40:09 +0530602 clock-names = "hosc", "losc";
603 #clock-cells = <1>;
604 #reset-cells = <1>;
605 };
606
607 pio: pinctrl@1c20800 {
Hans de Goededb325e82015-04-15 19:03:49 +0200608 compatible = "allwinner,sun6i-a31-pinctrl";
609 reg = <0x01c20800 0x400>;
610 interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>,
611 <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>,
612 <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>,
613 <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
Samuel Holland8d6fe612022-04-27 15:31:24 -0500614 clocks = <&ccu CLK_APB1_PIO>, <&osc24M>, <&rtc 0>;
Jagan Teki1e097442018-08-05 00:40:09 +0530615 clock-names = "apb", "hosc", "losc";
Hans de Goededb325e82015-04-15 19:03:49 +0200616 gpio-controller;
617 interrupt-controller;
Hans de Goede7d831822015-08-05 17:39:14 +0200618 #interrupt-cells = <3>;
Hans de Goededb325e82015-04-15 19:03:49 +0200619 #gpio-cells = <3>;
620
Samuel Holland8d6fe612022-04-27 15:31:24 -0500621 gmac_gmii_pins: gmac-gmii-pins {
Jagan Teki1e097442018-08-05 00:40:09 +0530622 pins = "PA0", "PA1", "PA2", "PA3",
623 "PA4", "PA5", "PA6", "PA7",
624 "PA8", "PA9", "PA10", "PA11",
625 "PA12", "PA13", "PA14", "PA15",
626 "PA16", "PA17", "PA18", "PA19",
627 "PA20", "PA21", "PA22", "PA23",
628 "PA24", "PA25", "PA26", "PA27";
629 function = "gmac";
630 /*
631 * data lines in GMII mode run at 125MHz and
632 * might need a higher signal drive strength
633 */
634 drive-strength = <30>;
Hans de Goededb325e82015-04-15 19:03:49 +0200635 };
636
Samuel Holland8d6fe612022-04-27 15:31:24 -0500637 gmac_mii_pins: gmac-mii-pins {
Jagan Teki1e097442018-08-05 00:40:09 +0530638 pins = "PA0", "PA1", "PA2", "PA3",
639 "PA8", "PA9", "PA11",
640 "PA12", "PA13", "PA14", "PA19",
641 "PA20", "PA21", "PA22", "PA23",
642 "PA24", "PA26", "PA27";
643 function = "gmac";
644 };
645
Samuel Holland8d6fe612022-04-27 15:31:24 -0500646 gmac_rgmii_pins: gmac-rgmii-pins {
Jagan Teki1e097442018-08-05 00:40:09 +0530647 pins = "PA0", "PA1", "PA2", "PA3",
648 "PA9", "PA10", "PA11",
649 "PA12", "PA13", "PA14", "PA19",
650 "PA20", "PA25", "PA26", "PA27";
651 function = "gmac";
652 /*
653 * data lines in RGMII mode use DDR mode
654 * and need a higher signal drive strength
655 */
656 drive-strength = <40>;
657 };
658
Samuel Holland8d6fe612022-04-27 15:31:24 -0500659 i2c0_pins: i2c0-pins {
Jagan Teki1e097442018-08-05 00:40:09 +0530660 pins = "PH14", "PH15";
661 function = "i2c0";
Hans de Goededb325e82015-04-15 19:03:49 +0200662 };
663
Samuel Holland8d6fe612022-04-27 15:31:24 -0500664 i2c1_pins: i2c1-pins {
Jagan Teki1e097442018-08-05 00:40:09 +0530665 pins = "PH16", "PH17";
666 function = "i2c1";
Hans de Goededb325e82015-04-15 19:03:49 +0200667 };
668
Samuel Holland8d6fe612022-04-27 15:31:24 -0500669 i2c2_pins: i2c2-pins {
Jagan Teki1e097442018-08-05 00:40:09 +0530670 pins = "PH18", "PH19";
671 function = "i2c2";
672 };
673
Samuel Holland8d6fe612022-04-27 15:31:24 -0500674 lcd0_rgb888_pins: lcd0-rgb888-pins {
Jagan Teki1e097442018-08-05 00:40:09 +0530675 pins = "PD0", "PD1", "PD2", "PD3",
676 "PD4", "PD5", "PD6", "PD7",
677 "PD8", "PD9", "PD10", "PD11",
678 "PD12", "PD13", "PD14", "PD15",
679 "PD16", "PD17", "PD18", "PD19",
680 "PD20", "PD21", "PD22", "PD23",
681 "PD24", "PD25", "PD26", "PD27";
682 function = "lcd0";
Hans de Goededb325e82015-04-15 19:03:49 +0200683 };
684
Samuel Holland8d6fe612022-04-27 15:31:24 -0500685 mmc0_pins: mmc0-pins {
Jagan Teki1e097442018-08-05 00:40:09 +0530686 pins = "PF0", "PF1", "PF2",
Hans de Goede6ef1be32015-06-02 15:53:40 +0200687 "PF3", "PF4", "PF5";
Jagan Teki1e097442018-08-05 00:40:09 +0530688 function = "mmc0";
689 drive-strength = <30>;
690 bias-pull-up;
Hans de Goededb325e82015-04-15 19:03:49 +0200691 };
692
Samuel Holland8d6fe612022-04-27 15:31:24 -0500693 mmc1_pins: mmc1-pins {
Jagan Teki1e097442018-08-05 00:40:09 +0530694 pins = "PG0", "PG1", "PG2", "PG3",
Hans de Goededb325e82015-04-15 19:03:49 +0200695 "PG4", "PG5";
Jagan Teki1e097442018-08-05 00:40:09 +0530696 function = "mmc1";
697 drive-strength = <30>;
698 bias-pull-up;
Hans de Goededb325e82015-04-15 19:03:49 +0200699 };
700
Samuel Holland8d6fe612022-04-27 15:31:24 -0500701 mmc2_4bit_pins: mmc2-4bit-pins {
Jagan Teki1e097442018-08-05 00:40:09 +0530702 pins = "PC6", "PC7", "PC8", "PC9",
Hans de Goede5834fe32015-10-13 23:57:03 +0200703 "PC10", "PC11";
Jagan Teki1e097442018-08-05 00:40:09 +0530704 function = "mmc2";
705 drive-strength = <30>;
706 bias-pull-up;
Hans de Goede5834fe32015-10-13 23:57:03 +0200707 };
708
Samuel Holland8d6fe612022-04-27 15:31:24 -0500709 mmc2_8bit_emmc_pins: mmc2-8bit-emmc-pins {
Jagan Teki1e097442018-08-05 00:40:09 +0530710 pins = "PC6", "PC7", "PC8", "PC9",
Hans de Goede5834fe32015-10-13 23:57:03 +0200711 "PC10", "PC11", "PC12",
712 "PC13", "PC14", "PC15",
713 "PC24";
Jagan Teki1e097442018-08-05 00:40:09 +0530714 function = "mmc2";
715 drive-strength = <30>;
716 bias-pull-up;
Hans de Goede5834fe32015-10-13 23:57:03 +0200717 };
718
Samuel Holland8d6fe612022-04-27 15:31:24 -0500719 mmc3_8bit_emmc_pins: mmc3-8bit-emmc-pins {
Jagan Teki1e097442018-08-05 00:40:09 +0530720 pins = "PC6", "PC7", "PC8", "PC9",
Hans de Goede19888a42016-03-14 17:37:09 +0100721 "PC10", "PC11", "PC12",
722 "PC13", "PC14", "PC15",
723 "PC24";
Jagan Teki1e097442018-08-05 00:40:09 +0530724 function = "mmc3";
725 drive-strength = <40>;
726 bias-pull-up;
Hans de Goededb325e82015-04-15 19:03:49 +0200727 };
728
Samuel Holland8d6fe612022-04-27 15:31:24 -0500729 spdif_tx_pin: spdif-tx-pin {
Jagan Teki1e097442018-08-05 00:40:09 +0530730 pins = "PH28";
731 function = "spdif";
Hans de Goededb325e82015-04-15 19:03:49 +0200732 };
733
Samuel Holland8d6fe612022-04-27 15:31:24 -0500734 uart0_ph_pins: uart0-ph-pins {
Jagan Teki1e097442018-08-05 00:40:09 +0530735 pins = "PH20", "PH21";
736 function = "uart0";
Hans de Goededb325e82015-04-15 19:03:49 +0200737 };
738 };
739
Jagan Teki1e097442018-08-05 00:40:09 +0530740 timer@1c20c00 {
Hans de Goededb325e82015-04-15 19:03:49 +0200741 compatible = "allwinner,sun4i-a10-timer";
742 reg = <0x01c20c00 0xa0>;
743 interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>,
744 <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>,
745 <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>,
746 <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>,
Samuel Holland8d6fe612022-04-27 15:31:24 -0500747 <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>,
748 <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
Hans de Goededb325e82015-04-15 19:03:49 +0200749 clocks = <&osc24M>;
750 };
751
Jagan Teki1e097442018-08-05 00:40:09 +0530752 wdt1: watchdog@1c20ca0 {
Hans de Goededb325e82015-04-15 19:03:49 +0200753 compatible = "allwinner,sun6i-a31-wdt";
754 reg = <0x01c20ca0 0x20>;
Samuel Holland8d6fe612022-04-27 15:31:24 -0500755 interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
756 clocks = <&osc24M>;
Hans de Goededb325e82015-04-15 19:03:49 +0200757 };
758
Jagan Teki1e097442018-08-05 00:40:09 +0530759 spdif: spdif@1c21000 {
760 #sound-dai-cells = <0>;
761 compatible = "allwinner,sun6i-a31-spdif";
762 reg = <0x01c21000 0x400>;
763 interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>;
764 clocks = <&ccu CLK_APB1_SPDIF>, <&ccu CLK_SPDIF>;
765 resets = <&ccu RST_APB1_SPDIF>;
766 clock-names = "apb", "spdif";
767 dmas = <&dma 2>, <&dma 2>;
768 dma-names = "rx", "tx";
769 status = "disabled";
770 };
771
772 i2s0: i2s@1c22000 {
773 #sound-dai-cells = <0>;
774 compatible = "allwinner,sun6i-a31-i2s";
775 reg = <0x01c22000 0x400>;
776 interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>;
777 clocks = <&ccu CLK_APB1_DAUDIO0>, <&ccu CLK_DAUDIO0>;
778 resets = <&ccu RST_APB1_DAUDIO0>;
779 clock-names = "apb", "mod";
780 dmas = <&dma 3>, <&dma 3>;
781 dma-names = "rx", "tx";
782 status = "disabled";
783 };
784
785 i2s1: i2s@1c22400 {
786 #sound-dai-cells = <0>;
787 compatible = "allwinner,sun6i-a31-i2s";
788 reg = <0x01c22400 0x400>;
789 interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
790 clocks = <&ccu CLK_APB1_DAUDIO1>, <&ccu CLK_DAUDIO1>;
791 resets = <&ccu RST_APB1_DAUDIO1>;
792 clock-names = "apb", "mod";
793 dmas = <&dma 4>, <&dma 4>;
794 dma-names = "rx", "tx";
795 status = "disabled";
796 };
797
798 lradc: lradc@1c22800 {
Hans de Goede19888a42016-03-14 17:37:09 +0100799 compatible = "allwinner,sun4i-a10-lradc-keys";
800 reg = <0x01c22800 0x100>;
801 interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
802 status = "disabled";
803 };
804
Jagan Teki1e097442018-08-05 00:40:09 +0530805 rtp: rtp@1c25000 {
Hans de Goededb325e82015-04-15 19:03:49 +0200806 compatible = "allwinner,sun6i-a31-ts";
807 reg = <0x01c25000 0x100>;
808 interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;
809 #thermal-sensor-cells = <0>;
810 };
811
Jagan Teki1e097442018-08-05 00:40:09 +0530812 uart0: serial@1c28000 {
Hans de Goededb325e82015-04-15 19:03:49 +0200813 compatible = "snps,dw-apb-uart";
814 reg = <0x01c28000 0x400>;
815 interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>;
816 reg-shift = <2>;
817 reg-io-width = <4>;
Jagan Teki1e097442018-08-05 00:40:09 +0530818 clocks = <&ccu CLK_APB2_UART0>;
819 resets = <&ccu RST_APB2_UART0>;
Hans de Goededb325e82015-04-15 19:03:49 +0200820 dmas = <&dma 6>, <&dma 6>;
821 dma-names = "rx", "tx";
822 status = "disabled";
823 };
824
Jagan Teki1e097442018-08-05 00:40:09 +0530825 uart1: serial@1c28400 {
Hans de Goededb325e82015-04-15 19:03:49 +0200826 compatible = "snps,dw-apb-uart";
827 reg = <0x01c28400 0x400>;
828 interrupts = <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>;
829 reg-shift = <2>;
830 reg-io-width = <4>;
Jagan Teki1e097442018-08-05 00:40:09 +0530831 clocks = <&ccu CLK_APB2_UART1>;
832 resets = <&ccu RST_APB2_UART1>;
Hans de Goededb325e82015-04-15 19:03:49 +0200833 dmas = <&dma 7>, <&dma 7>;
834 dma-names = "rx", "tx";
835 status = "disabled";
836 };
837
Jagan Teki1e097442018-08-05 00:40:09 +0530838 uart2: serial@1c28800 {
Hans de Goededb325e82015-04-15 19:03:49 +0200839 compatible = "snps,dw-apb-uart";
840 reg = <0x01c28800 0x400>;
841 interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
842 reg-shift = <2>;
843 reg-io-width = <4>;
Jagan Teki1e097442018-08-05 00:40:09 +0530844 clocks = <&ccu CLK_APB2_UART2>;
845 resets = <&ccu RST_APB2_UART2>;
Hans de Goededb325e82015-04-15 19:03:49 +0200846 dmas = <&dma 8>, <&dma 8>;
847 dma-names = "rx", "tx";
848 status = "disabled";
849 };
850
Jagan Teki1e097442018-08-05 00:40:09 +0530851 uart3: serial@1c28c00 {
Hans de Goededb325e82015-04-15 19:03:49 +0200852 compatible = "snps,dw-apb-uart";
853 reg = <0x01c28c00 0x400>;
854 interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
855 reg-shift = <2>;
856 reg-io-width = <4>;
Jagan Teki1e097442018-08-05 00:40:09 +0530857 clocks = <&ccu CLK_APB2_UART3>;
858 resets = <&ccu RST_APB2_UART3>;
Hans de Goededb325e82015-04-15 19:03:49 +0200859 dmas = <&dma 9>, <&dma 9>;
860 dma-names = "rx", "tx";
861 status = "disabled";
862 };
863
Jagan Teki1e097442018-08-05 00:40:09 +0530864 uart4: serial@1c29000 {
Hans de Goededb325e82015-04-15 19:03:49 +0200865 compatible = "snps,dw-apb-uart";
866 reg = <0x01c29000 0x400>;
867 interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
868 reg-shift = <2>;
869 reg-io-width = <4>;
Jagan Teki1e097442018-08-05 00:40:09 +0530870 clocks = <&ccu CLK_APB2_UART4>;
871 resets = <&ccu RST_APB2_UART4>;
Hans de Goededb325e82015-04-15 19:03:49 +0200872 dmas = <&dma 10>, <&dma 10>;
873 dma-names = "rx", "tx";
874 status = "disabled";
875 };
876
Jagan Teki1e097442018-08-05 00:40:09 +0530877 uart5: serial@1c29400 {
Hans de Goededb325e82015-04-15 19:03:49 +0200878 compatible = "snps,dw-apb-uart";
879 reg = <0x01c29400 0x400>;
880 interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>;
881 reg-shift = <2>;
882 reg-io-width = <4>;
Jagan Teki1e097442018-08-05 00:40:09 +0530883 clocks = <&ccu CLK_APB2_UART5>;
884 resets = <&ccu RST_APB2_UART5>;
Hans de Goededb325e82015-04-15 19:03:49 +0200885 dmas = <&dma 22>, <&dma 22>;
886 dma-names = "rx", "tx";
887 status = "disabled";
888 };
889
Jagan Teki1e097442018-08-05 00:40:09 +0530890 i2c0: i2c@1c2ac00 {
Hans de Goededb325e82015-04-15 19:03:49 +0200891 compatible = "allwinner,sun6i-a31-i2c";
892 reg = <0x01c2ac00 0x400>;
893 interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>;
Jagan Teki1e097442018-08-05 00:40:09 +0530894 clocks = <&ccu CLK_APB2_I2C0>;
895 resets = <&ccu RST_APB2_I2C0>;
Samuel Holland8d6fe612022-04-27 15:31:24 -0500896 pinctrl-names = "default";
897 pinctrl-0 = <&i2c0_pins>;
Hans de Goededb325e82015-04-15 19:03:49 +0200898 status = "disabled";
899 #address-cells = <1>;
900 #size-cells = <0>;
901 };
902
Jagan Teki1e097442018-08-05 00:40:09 +0530903 i2c1: i2c@1c2b000 {
Hans de Goededb325e82015-04-15 19:03:49 +0200904 compatible = "allwinner,sun6i-a31-i2c";
905 reg = <0x01c2b000 0x400>;
906 interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
Jagan Teki1e097442018-08-05 00:40:09 +0530907 clocks = <&ccu CLK_APB2_I2C1>;
908 resets = <&ccu RST_APB2_I2C1>;
Samuel Holland8d6fe612022-04-27 15:31:24 -0500909 pinctrl-names = "default";
910 pinctrl-0 = <&i2c1_pins>;
Hans de Goededb325e82015-04-15 19:03:49 +0200911 status = "disabled";
912 #address-cells = <1>;
913 #size-cells = <0>;
914 };
915
Jagan Teki1e097442018-08-05 00:40:09 +0530916 i2c2: i2c@1c2b400 {
Hans de Goededb325e82015-04-15 19:03:49 +0200917 compatible = "allwinner,sun6i-a31-i2c";
918 reg = <0x01c2b400 0x400>;
919 interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
Jagan Teki1e097442018-08-05 00:40:09 +0530920 clocks = <&ccu CLK_APB2_I2C2>;
921 resets = <&ccu RST_APB2_I2C2>;
Samuel Holland8d6fe612022-04-27 15:31:24 -0500922 pinctrl-names = "default";
923 pinctrl-0 = <&i2c2_pins>;
Hans de Goededb325e82015-04-15 19:03:49 +0200924 status = "disabled";
925 #address-cells = <1>;
926 #size-cells = <0>;
927 };
928
Jagan Teki1e097442018-08-05 00:40:09 +0530929 i2c3: i2c@1c2b800 {
Hans de Goededb325e82015-04-15 19:03:49 +0200930 compatible = "allwinner,sun6i-a31-i2c";
931 reg = <0x01c2b800 0x400>;
932 interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>;
Jagan Teki1e097442018-08-05 00:40:09 +0530933 clocks = <&ccu CLK_APB2_I2C3>;
934 resets = <&ccu RST_APB2_I2C3>;
Hans de Goededb325e82015-04-15 19:03:49 +0200935 status = "disabled";
936 #address-cells = <1>;
937 #size-cells = <0>;
938 };
939
Jagan Teki1e097442018-08-05 00:40:09 +0530940 gmac: ethernet@1c30000 {
Hans de Goededb325e82015-04-15 19:03:49 +0200941 compatible = "allwinner,sun7i-a20-gmac";
942 reg = <0x01c30000 0x1054>;
943 interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>;
944 interrupt-names = "macirq";
Jagan Teki1e097442018-08-05 00:40:09 +0530945 clocks = <&ccu CLK_AHB1_EMAC>, <&gmac_tx_clk>;
Hans de Goededb325e82015-04-15 19:03:49 +0200946 clock-names = "stmmaceth", "allwinner_gmac_tx";
Jagan Teki1e097442018-08-05 00:40:09 +0530947 resets = <&ccu RST_AHB1_EMAC>;
Hans de Goededb325e82015-04-15 19:03:49 +0200948 reset-names = "stmmaceth";
949 snps,pbl = <2>;
950 snps,fixed-burst;
951 snps,force_sf_dma_mode;
952 status = "disabled";
Samuel Holland8d6fe612022-04-27 15:31:24 -0500953
954 mdio: mdio {
955 compatible = "snps,dwmac-mdio";
956 #address-cells = <1>;
957 #size-cells = <0>;
958 };
Hans de Goededb325e82015-04-15 19:03:49 +0200959 };
960
Jagan Teki1e097442018-08-05 00:40:09 +0530961 crypto: crypto-engine@1c15000 {
962 compatible = "allwinner,sun6i-a31-crypto",
963 "allwinner,sun4i-a10-crypto";
Hans de Goede19888a42016-03-14 17:37:09 +0100964 reg = <0x01c15000 0x1000>;
965 interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>;
Jagan Teki1e097442018-08-05 00:40:09 +0530966 clocks = <&ccu CLK_AHB1_SS>, <&ccu CLK_SS>;
Hans de Goede19888a42016-03-14 17:37:09 +0100967 clock-names = "ahb", "mod";
Jagan Teki1e097442018-08-05 00:40:09 +0530968 resets = <&ccu RST_AHB1_SS>;
Hans de Goede19888a42016-03-14 17:37:09 +0100969 reset-names = "ahb";
970 };
971
Jagan Teki1e097442018-08-05 00:40:09 +0530972 codec: codec@1c22c00 {
973 #sound-dai-cells = <0>;
974 compatible = "allwinner,sun6i-a31-codec";
975 reg = <0x01c22c00 0x400>;
976 interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
977 clocks = <&ccu CLK_APB1_CODEC>, <&ccu CLK_CODEC>;
978 clock-names = "apb", "codec";
979 resets = <&ccu RST_APB1_CODEC>;
980 dmas = <&dma 15>, <&dma 15>;
981 dma-names = "rx", "tx";
982 status = "disabled";
983 };
984
985 timer@1c60000 {
Hans de Goede6ef1be32015-06-02 15:53:40 +0200986 compatible = "allwinner,sun6i-a31-hstimer",
987 "allwinner,sun7i-a20-hstimer";
Hans de Goededb325e82015-04-15 19:03:49 +0200988 reg = <0x01c60000 0x1000>;
989 interrupts = <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>,
990 <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>,
991 <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>,
992 <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>;
Jagan Teki1e097442018-08-05 00:40:09 +0530993 clocks = <&ccu CLK_AHB1_HSTIMER>;
994 resets = <&ccu RST_AHB1_HSTIMER>;
Hans de Goededb325e82015-04-15 19:03:49 +0200995 };
996
Jagan Teki1e097442018-08-05 00:40:09 +0530997 spi0: spi@1c68000 {
Hans de Goededb325e82015-04-15 19:03:49 +0200998 compatible = "allwinner,sun6i-a31-spi";
999 reg = <0x01c68000 0x1000>;
1000 interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>;
Jagan Teki1e097442018-08-05 00:40:09 +05301001 clocks = <&ccu CLK_AHB1_SPI0>, <&ccu CLK_SPI0>;
Hans de Goededb325e82015-04-15 19:03:49 +02001002 clock-names = "ahb", "mod";
1003 dmas = <&dma 23>, <&dma 23>;
1004 dma-names = "rx", "tx";
Jagan Teki1e097442018-08-05 00:40:09 +05301005 resets = <&ccu RST_AHB1_SPI0>;
Hans de Goededb325e82015-04-15 19:03:49 +02001006 status = "disabled";
Samuel Holland8d6fe612022-04-27 15:31:24 -05001007 #address-cells = <1>;
1008 #size-cells = <0>;
Hans de Goededb325e82015-04-15 19:03:49 +02001009 };
1010
Jagan Teki1e097442018-08-05 00:40:09 +05301011 spi1: spi@1c69000 {
Hans de Goededb325e82015-04-15 19:03:49 +02001012 compatible = "allwinner,sun6i-a31-spi";
1013 reg = <0x01c69000 0x1000>;
1014 interrupts = <GIC_SPI 66 IRQ_TYPE_LEVEL_HIGH>;
Jagan Teki1e097442018-08-05 00:40:09 +05301015 clocks = <&ccu CLK_AHB1_SPI1>, <&ccu CLK_SPI1>;
Hans de Goededb325e82015-04-15 19:03:49 +02001016 clock-names = "ahb", "mod";
1017 dmas = <&dma 24>, <&dma 24>;
1018 dma-names = "rx", "tx";
Jagan Teki1e097442018-08-05 00:40:09 +05301019 resets = <&ccu RST_AHB1_SPI1>;
Hans de Goededb325e82015-04-15 19:03:49 +02001020 status = "disabled";
Samuel Holland8d6fe612022-04-27 15:31:24 -05001021 #address-cells = <1>;
1022 #size-cells = <0>;
Hans de Goededb325e82015-04-15 19:03:49 +02001023 };
1024
Jagan Teki1e097442018-08-05 00:40:09 +05301025 spi2: spi@1c6a000 {
Hans de Goededb325e82015-04-15 19:03:49 +02001026 compatible = "allwinner,sun6i-a31-spi";
1027 reg = <0x01c6a000 0x1000>;
1028 interrupts = <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>;
Jagan Teki1e097442018-08-05 00:40:09 +05301029 clocks = <&ccu CLK_AHB1_SPI2>, <&ccu CLK_SPI2>;
Hans de Goededb325e82015-04-15 19:03:49 +02001030 clock-names = "ahb", "mod";
1031 dmas = <&dma 25>, <&dma 25>;
1032 dma-names = "rx", "tx";
Jagan Teki1e097442018-08-05 00:40:09 +05301033 resets = <&ccu RST_AHB1_SPI2>;
Hans de Goededb325e82015-04-15 19:03:49 +02001034 status = "disabled";
Samuel Holland8d6fe612022-04-27 15:31:24 -05001035 #address-cells = <1>;
1036 #size-cells = <0>;
Hans de Goededb325e82015-04-15 19:03:49 +02001037 };
1038
Jagan Teki1e097442018-08-05 00:40:09 +05301039 spi3: spi@1c6b000 {
Hans de Goededb325e82015-04-15 19:03:49 +02001040 compatible = "allwinner,sun6i-a31-spi";
1041 reg = <0x01c6b000 0x1000>;
1042 interrupts = <GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>;
Jagan Teki1e097442018-08-05 00:40:09 +05301043 clocks = <&ccu CLK_AHB1_SPI3>, <&ccu CLK_SPI3>;
Hans de Goededb325e82015-04-15 19:03:49 +02001044 clock-names = "ahb", "mod";
1045 dmas = <&dma 26>, <&dma 26>;
1046 dma-names = "rx", "tx";
Jagan Teki1e097442018-08-05 00:40:09 +05301047 resets = <&ccu RST_AHB1_SPI3>;
Hans de Goededb325e82015-04-15 19:03:49 +02001048 status = "disabled";
Samuel Holland8d6fe612022-04-27 15:31:24 -05001049 #address-cells = <1>;
1050 #size-cells = <0>;
Hans de Goededb325e82015-04-15 19:03:49 +02001051 };
1052
Jagan Teki1e097442018-08-05 00:40:09 +05301053 gic: interrupt-controller@1c81000 {
Samuel Holland8d6fe612022-04-27 15:31:24 -05001054 compatible = "arm,gic-400";
Hans de Goededb325e82015-04-15 19:03:49 +02001055 reg = <0x01c81000 0x1000>,
Jagan Teki1e097442018-08-05 00:40:09 +05301056 <0x01c82000 0x2000>,
Hans de Goededb325e82015-04-15 19:03:49 +02001057 <0x01c84000 0x2000>,
1058 <0x01c86000 0x2000>;
1059 interrupt-controller;
1060 #interrupt-cells = <3>;
1061 interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
1062 };
1063
Jagan Teki1e097442018-08-05 00:40:09 +05301064 fe0: display-frontend@1e00000 {
1065 compatible = "allwinner,sun6i-a31-display-frontend";
1066 reg = <0x01e00000 0x20000>;
1067 interrupts = <GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH>;
1068 clocks = <&ccu CLK_AHB1_FE0>, <&ccu CLK_FE0>,
1069 <&ccu CLK_DRAM_FE0>;
1070 clock-names = "ahb", "mod",
1071 "ram";
1072 resets = <&ccu RST_AHB1_FE0>;
1073
1074 ports {
1075 #address-cells = <1>;
1076 #size-cells = <0>;
1077
1078 fe0_out: port@1 {
1079 #address-cells = <1>;
1080 #size-cells = <0>;
1081 reg = <1>;
1082
1083 fe0_out_be0: endpoint@0 {
1084 reg = <0>;
1085 remote-endpoint = <&be0_in_fe0>;
1086 };
1087
1088 fe0_out_be1: endpoint@1 {
1089 reg = <1>;
1090 remote-endpoint = <&be1_in_fe0>;
1091 };
1092 };
1093 };
1094 };
1095
1096 fe1: display-frontend@1e20000 {
1097 compatible = "allwinner,sun6i-a31-display-frontend";
1098 reg = <0x01e20000 0x20000>;
1099 interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>;
1100 clocks = <&ccu CLK_AHB1_FE1>, <&ccu CLK_FE1>,
1101 <&ccu CLK_DRAM_FE1>;
1102 clock-names = "ahb", "mod",
1103 "ram";
1104 resets = <&ccu RST_AHB1_FE1>;
1105
1106 ports {
1107 #address-cells = <1>;
1108 #size-cells = <0>;
1109
1110 fe1_out: port@1 {
1111 #address-cells = <1>;
1112 #size-cells = <0>;
1113 reg = <1>;
1114
1115 fe1_out_be0: endpoint@0 {
1116 reg = <0>;
1117 remote-endpoint = <&be0_in_fe1>;
1118 };
1119
1120 fe1_out_be1: endpoint@1 {
1121 reg = <1>;
1122 remote-endpoint = <&be1_in_fe1>;
1123 };
1124 };
1125 };
1126 };
1127
1128 be1: display-backend@1e40000 {
1129 compatible = "allwinner,sun6i-a31-display-backend";
1130 reg = <0x01e40000 0x10000>;
1131 interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>;
1132 clocks = <&ccu CLK_AHB1_BE1>, <&ccu CLK_BE1>,
1133 <&ccu CLK_DRAM_BE1>;
1134 clock-names = "ahb", "mod",
1135 "ram";
1136 resets = <&ccu RST_AHB1_BE1>;
1137
Jagan Teki1e097442018-08-05 00:40:09 +05301138 ports {
1139 #address-cells = <1>;
1140 #size-cells = <0>;
1141
1142 be1_in: port@0 {
1143 #address-cells = <1>;
1144 #size-cells = <0>;
1145 reg = <0>;
1146
1147 be1_in_fe0: endpoint@0 {
1148 reg = <0>;
1149 remote-endpoint = <&fe0_out_be1>;
1150 };
1151
1152 be1_in_fe1: endpoint@1 {
1153 reg = <1>;
1154 remote-endpoint = <&fe1_out_be1>;
1155 };
1156 };
1157
1158 be1_out: port@1 {
1159 #address-cells = <1>;
1160 #size-cells = <0>;
1161 reg = <1>;
1162
1163 be1_out_drc1: endpoint@1 {
1164 reg = <1>;
1165 remote-endpoint = <&drc1_in_be1>;
1166 };
1167 };
1168 };
1169 };
1170
1171 drc1: drc@1e50000 {
1172 compatible = "allwinner,sun6i-a31-drc";
1173 reg = <0x01e50000 0x10000>;
1174 interrupts = <GIC_SPI 91 IRQ_TYPE_LEVEL_HIGH>;
1175 clocks = <&ccu CLK_AHB1_DRC1>, <&ccu CLK_IEP_DRC1>,
1176 <&ccu CLK_DRAM_DRC1>;
1177 clock-names = "ahb", "mod",
1178 "ram";
1179 resets = <&ccu RST_AHB1_DRC1>;
1180
Jagan Teki1e097442018-08-05 00:40:09 +05301181 ports {
1182 #address-cells = <1>;
1183 #size-cells = <0>;
1184
1185 drc1_in: port@0 {
1186 #address-cells = <1>;
1187 #size-cells = <0>;
1188 reg = <0>;
1189
1190 drc1_in_be1: endpoint@1 {
1191 reg = <1>;
1192 remote-endpoint = <&be1_out_drc1>;
1193 };
1194 };
1195
1196 drc1_out: port@1 {
1197 #address-cells = <1>;
1198 #size-cells = <0>;
1199 reg = <1>;
1200
1201 drc1_out_tcon0: endpoint@0 {
1202 reg = <0>;
1203 remote-endpoint = <&tcon0_in_drc1>;
1204 };
1205
1206 drc1_out_tcon1: endpoint@1 {
1207 reg = <1>;
1208 remote-endpoint = <&tcon1_in_drc1>;
1209 };
1210 };
1211 };
1212 };
1213
1214 be0: display-backend@1e60000 {
1215 compatible = "allwinner,sun6i-a31-display-backend";
1216 reg = <0x01e60000 0x10000>;
1217 interrupts = <GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>;
1218 clocks = <&ccu CLK_AHB1_BE0>, <&ccu CLK_BE0>,
1219 <&ccu CLK_DRAM_BE0>;
1220 clock-names = "ahb", "mod",
1221 "ram";
1222 resets = <&ccu RST_AHB1_BE0>;
1223
Jagan Teki1e097442018-08-05 00:40:09 +05301224 ports {
1225 #address-cells = <1>;
1226 #size-cells = <0>;
1227
1228 be0_in: port@0 {
1229 #address-cells = <1>;
1230 #size-cells = <0>;
1231 reg = <0>;
1232
1233 be0_in_fe0: endpoint@0 {
1234 reg = <0>;
1235 remote-endpoint = <&fe0_out_be0>;
1236 };
1237
1238 be0_in_fe1: endpoint@1 {
1239 reg = <1>;
1240 remote-endpoint = <&fe1_out_be0>;
1241 };
1242 };
1243
1244 be0_out: port@1 {
Jagan Teki1e097442018-08-05 00:40:09 +05301245 reg = <1>;
1246
Samuel Holland8d6fe612022-04-27 15:31:24 -05001247 be0_out_drc0: endpoint {
Jagan Teki1e097442018-08-05 00:40:09 +05301248 remote-endpoint = <&drc0_in_be0>;
1249 };
1250 };
1251 };
1252 };
1253
1254 drc0: drc@1e70000 {
1255 compatible = "allwinner,sun6i-a31-drc";
1256 reg = <0x01e70000 0x10000>;
1257 interrupts = <GIC_SPI 91 IRQ_TYPE_LEVEL_HIGH>;
1258 clocks = <&ccu CLK_AHB1_DRC0>, <&ccu CLK_IEP_DRC0>,
1259 <&ccu CLK_DRAM_DRC0>;
1260 clock-names = "ahb", "mod",
1261 "ram";
1262 resets = <&ccu RST_AHB1_DRC0>;
1263
Jagan Teki1e097442018-08-05 00:40:09 +05301264 ports {
1265 #address-cells = <1>;
1266 #size-cells = <0>;
1267
1268 drc0_in: port@0 {
Jagan Teki1e097442018-08-05 00:40:09 +05301269 reg = <0>;
1270
Samuel Holland8d6fe612022-04-27 15:31:24 -05001271 drc0_in_be0: endpoint {
Jagan Teki1e097442018-08-05 00:40:09 +05301272 remote-endpoint = <&be0_out_drc0>;
1273 };
1274 };
1275
1276 drc0_out: port@1 {
1277 #address-cells = <1>;
1278 #size-cells = <0>;
1279 reg = <1>;
1280
1281 drc0_out_tcon0: endpoint@0 {
1282 reg = <0>;
1283 remote-endpoint = <&tcon0_in_drc0>;
1284 };
1285
1286 drc0_out_tcon1: endpoint@1 {
1287 reg = <1>;
1288 remote-endpoint = <&tcon1_in_drc0>;
1289 };
1290 };
1291 };
1292 };
1293
1294 rtc: rtc@1f00000 {
Samuel Holland8d6fe612022-04-27 15:31:24 -05001295 #clock-cells = <1>;
Hans de Goededb325e82015-04-15 19:03:49 +02001296 compatible = "allwinner,sun6i-a31-rtc";
1297 reg = <0x01f00000 0x54>;
1298 interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>,
1299 <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
Samuel Holland8d6fe612022-04-27 15:31:24 -05001300 clocks = <&osc32k>;
1301 clock-output-names = "osc32k";
Hans de Goededb325e82015-04-15 19:03:49 +02001302 };
1303
Samuel Holland8d6fe612022-04-27 15:31:24 -05001304 r_intc: interrupt-controller@1f00c00 {
Jagan Teki1e097442018-08-05 00:40:09 +05301305 compatible = "allwinner,sun6i-a31-r-intc";
Hans de Goededb325e82015-04-15 19:03:49 +02001306 interrupt-controller;
1307 #interrupt-cells = <2>;
Jagan Teki1e097442018-08-05 00:40:09 +05301308 reg = <0x01f00c00 0x400>;
Hans de Goededb325e82015-04-15 19:03:49 +02001309 interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
1310 };
1311
Jagan Teki1e097442018-08-05 00:40:09 +05301312 prcm@1f01400 {
Hans de Goededb325e82015-04-15 19:03:49 +02001313 compatible = "allwinner,sun6i-a31-prcm";
1314 reg = <0x01f01400 0x200>;
1315
1316 ar100: ar100_clk {
1317 compatible = "allwinner,sun6i-a31-ar100-clk";
1318 #clock-cells = <0>;
Samuel Holland8d6fe612022-04-27 15:31:24 -05001319 clocks = <&rtc 0>, <&osc24M>,
Jagan Teki1e097442018-08-05 00:40:09 +05301320 <&ccu CLK_PLL_PERIPH>,
1321 <&ccu CLK_PLL_PERIPH>;
Hans de Goededb325e82015-04-15 19:03:49 +02001322 clock-output-names = "ar100";
1323 };
1324
1325 ahb0: ahb0_clk {
1326 compatible = "fixed-factor-clock";
1327 #clock-cells = <0>;
1328 clock-div = <1>;
1329 clock-mult = <1>;
1330 clocks = <&ar100>;
1331 clock-output-names = "ahb0";
1332 };
1333
1334 apb0: apb0_clk {
1335 compatible = "allwinner,sun6i-a31-apb0-clk";
1336 #clock-cells = <0>;
1337 clocks = <&ahb0>;
1338 clock-output-names = "apb0";
1339 };
1340
1341 apb0_gates: apb0_gates_clk {
1342 compatible = "allwinner,sun6i-a31-apb0-gates-clk";
1343 #clock-cells = <1>;
1344 clocks = <&apb0>;
1345 clock-output-names = "apb0_pio", "apb0_ir",
1346 "apb0_timer", "apb0_p2wi",
1347 "apb0_uart", "apb0_1wire",
1348 "apb0_i2c";
1349 };
1350
1351 ir_clk: ir_clk {
1352 #clock-cells = <0>;
1353 compatible = "allwinner,sun4i-a10-mod0-clk";
Samuel Holland8d6fe612022-04-27 15:31:24 -05001354 clocks = <&rtc 0>, <&osc24M>;
Hans de Goededb325e82015-04-15 19:03:49 +02001355 clock-output-names = "ir";
1356 };
1357
1358 apb0_rst: apb0_rst {
1359 compatible = "allwinner,sun6i-a31-clock-reset";
1360 #reset-cells = <1>;
1361 };
1362 };
1363
Jagan Teki1e097442018-08-05 00:40:09 +05301364 cpucfg@1f01c00 {
Hans de Goededb325e82015-04-15 19:03:49 +02001365 compatible = "allwinner,sun6i-a31-cpuconfig";
1366 reg = <0x01f01c00 0x300>;
1367 };
1368
Jagan Teki1e097442018-08-05 00:40:09 +05301369 ir: ir@1f02000 {
Samuel Holland8d6fe612022-04-27 15:31:24 -05001370 compatible = "allwinner,sun6i-a31-ir";
Hans de Goededb325e82015-04-15 19:03:49 +02001371 clocks = <&apb0_gates 1>, <&ir_clk>;
1372 clock-names = "apb", "ir";
1373 resets = <&apb0_rst 1>;
1374 interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
1375 reg = <0x01f02000 0x40>;
1376 status = "disabled";
1377 };
1378
Jagan Teki1e097442018-08-05 00:40:09 +05301379 r_pio: pinctrl@1f02c00 {
Hans de Goededb325e82015-04-15 19:03:49 +02001380 compatible = "allwinner,sun6i-a31-r-pinctrl";
1381 reg = <0x01f02c00 0x400>;
1382 interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>,
1383 <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
Samuel Holland8d6fe612022-04-27 15:31:24 -05001384 clocks = <&apb0_gates 0>, <&osc24M>, <&rtc 0>;
Jagan Teki1e097442018-08-05 00:40:09 +05301385 clock-names = "apb", "hosc", "losc";
Hans de Goededb325e82015-04-15 19:03:49 +02001386 resets = <&apb0_rst 0>;
1387 gpio-controller;
1388 interrupt-controller;
Hans de Goede19888a42016-03-14 17:37:09 +01001389 #interrupt-cells = <3>;
Hans de Goededb325e82015-04-15 19:03:49 +02001390 #gpio-cells = <3>;
1391
Samuel Holland8d6fe612022-04-27 15:31:24 -05001392 s_ir_rx_pin: s-ir-rx-pin {
Jagan Teki1e097442018-08-05 00:40:09 +05301393 pins = "PL4";
1394 function = "s_ir";
Hans de Goededb325e82015-04-15 19:03:49 +02001395 };
1396
Samuel Holland8d6fe612022-04-27 15:31:24 -05001397 s_p2wi_pins: s-p2wi-pins {
Jagan Teki1e097442018-08-05 00:40:09 +05301398 pins = "PL0", "PL1";
1399 function = "s_p2wi";
Hans de Goededb325e82015-04-15 19:03:49 +02001400 };
1401 };
1402
Jagan Teki1e097442018-08-05 00:40:09 +05301403 p2wi: i2c@1f03400 {
Hans de Goededb325e82015-04-15 19:03:49 +02001404 compatible = "allwinner,sun6i-a31-p2wi";
1405 reg = <0x01f03400 0x400>;
1406 interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>;
1407 clocks = <&apb0_gates 3>;
1408 clock-frequency = <100000>;
1409 resets = <&apb0_rst 3>;
1410 pinctrl-names = "default";
Samuel Holland8d6fe612022-04-27 15:31:24 -05001411 pinctrl-0 = <&s_p2wi_pins>;
Hans de Goededb325e82015-04-15 19:03:49 +02001412 status = "disabled";
1413 #address-cells = <1>;
1414 #size-cells = <0>;
1415 };
1416 };
1417};