blob: ff1200973c3f9d3f3f6460576fcdd7e40e510d05 [file] [log] [blame]
Carlo Caione15abee82016-10-04 17:37:09 +02001/*
2 * Copyright (c) 2016 Endless Computers, Inc.
3 * Author: Carlo Caione <carlo@endlessm.com>
4 *
5 * This file is dual-licensed: you can use it either under the terms
6 * of the GPL or the X11 license, at your option. Note that this dual
7 * licensing only applies to this file, and not this project as a
8 * whole.
9 *
10 * a) This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License as
12 * published by the Free Software Foundation; either version 2 of the
13 * License, or (at your option) any later version.
14 *
15 * This library is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * Or, alternatively,
21 *
22 * b) Permission is hereby granted, free of charge, to any person
23 * obtaining a copy of this software and associated documentation
24 * files (the "Software"), to deal in the Software without
25 * restriction, including without limitation the rights to use,
26 * copy, modify, merge, publish, distribute, sublicense, and/or
27 * sell copies of the Software, and to permit persons to whom the
28 * Software is furnished to do so, subject to the following
29 * conditions:
30 *
31 * The above copyright notice and this permission notice shall be
32 * included in all copies or substantial portions of the Software.
33 *
34 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
35 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
36 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
37 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
38 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
39 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
40 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
41 * OTHER DEALINGS IN THE SOFTWARE.
42 */
43
44#include "meson-gx.dtsi"
Neil Armstrong973fbd52016-10-31 17:44:41 +010045#include <dt-bindings/clock/gxbb-clkc.h>
Kevin Hilman1cf3df82016-11-07 14:35:50 -080046#include <dt-bindings/gpio/meson-gxl-gpio.h>
Neil Armstrong6939db72017-03-21 16:25:46 +010047#include <dt-bindings/reset/amlogic,meson-gxbb-reset.h>
Carlo Caione15abee82016-10-04 17:37:09 +020048
49/ {
50 compatible = "amlogic,meson-gxl";
51};
Neil Armstrongfb0fe922016-10-31 17:44:40 +010052
Neil Armstronge9e27c62016-11-07 11:43:55 +010053&ethmac {
54 reg = <0x0 0xc9410000 0x0 0x10000
55 0x0 0xc8834540 0x0 0x4>;
56
57 clocks = <&clkc CLKID_ETH>,
58 <&clkc CLKID_FCLK_DIV2>,
59 <&clkc CLKID_MPLL2>;
60 clock-names = "stmmaceth", "clkin0", "clkin1";
61
62 mdio0: mdio {
63 #address-cells = <1>;
64 #size-cells = <0>;
65 compatible = "snps,dwmac-mdio";
66 };
67};
68
Neil Armstrongfb0fe922016-10-31 17:44:40 +010069&aobus {
70 pinctrl_aobus: pinctrl@14 {
71 compatible = "amlogic,meson-gxl-aobus-pinctrl";
72 #address-cells = <2>;
73 #size-cells = <2>;
74 ranges;
75
76 gpio_ao: bank@14 {
77 reg = <0x0 0x00014 0x0 0x8>,
78 <0x0 0x0002c 0x0 0x4>,
79 <0x0 0x00024 0x0 0x8>;
80 reg-names = "mux", "pull", "gpio";
81 gpio-controller;
82 #gpio-cells = <2>;
Neil Armstrong84412e42017-03-23 17:27:25 +010083 gpio-ranges = <&pinctrl_aobus 0 0 14>;
Neil Armstrongfb0fe922016-10-31 17:44:40 +010084 };
85
86 uart_ao_a_pins: uart_ao_a {
87 mux {
88 groups = "uart_tx_ao_a", "uart_rx_ao_a";
89 function = "uart_ao";
90 };
91 };
92
Martin Blumenstingl261e1d52017-01-15 23:32:53 +010093 uart_ao_a_cts_rts_pins: uart_ao_a_cts_rts {
94 mux {
95 groups = "uart_cts_ao_a",
96 "uart_rts_ao_a";
97 function = "uart_ao";
98 };
99 };
100
Martin Blumenstingl890a96a2017-01-15 23:20:29 +0100101 uart_ao_b_pins: uart_ao_b {
102 mux {
103 groups = "uart_tx_ao_b", "uart_rx_ao_b";
104 function = "uart_ao_b";
105 };
106 };
107
Neil Armstrongca02e3f2017-03-23 11:41:11 +0100108 uart_ao_b_0_1_pins: uart_ao_b_0_1 {
109 mux {
110 groups = "uart_tx_ao_b_0", "uart_rx_ao_b_1";
111 function = "uart_ao_b";
112 };
113 };
114
Martin Blumenstingl261e1d52017-01-15 23:32:53 +0100115 uart_ao_b_cts_rts_pins: uart_ao_b_cts_rts {
116 mux {
117 groups = "uart_cts_ao_b",
118 "uart_rts_ao_b";
119 function = "uart_ao_b";
120 };
121 };
122
Neil Armstrongfb0fe922016-10-31 17:44:40 +0100123 remote_input_ao_pins: remote_input_ao {
124 mux {
125 groups = "remote_input_ao";
126 function = "remote_input_ao";
127 };
128 };
Martin Blumenstingl249a2242017-01-22 22:05:28 +0100129
Neil Armstrongca02e3f2017-03-23 11:41:11 +0100130 i2c_ao_pins: i2c_ao {
131 mux {
132 groups = "i2c_sck_ao",
133 "i2c_sda_ao";
134 function = "i2c_ao";
135 };
136 };
137
Martin Blumenstingle98fd132017-03-18 13:27:36 +0100138 pwm_ao_a_3_pins: pwm_ao_a_3 {
139 mux {
140 groups = "pwm_ao_a_3";
141 function = "pwm_ao_a";
142 };
143 };
144
145 pwm_ao_a_8_pins: pwm_ao_a_8 {
146 mux {
147 groups = "pwm_ao_a_8";
148 function = "pwm_ao_a";
149 };
150 };
151
Martin Blumenstingl249a2242017-01-22 22:05:28 +0100152 pwm_ao_b_pins: pwm_ao_b {
153 mux {
154 groups = "pwm_ao_b";
155 function = "pwm_ao_b";
156 };
157 };
Neil Armstrongca02e3f2017-03-23 11:41:11 +0100158
159 pwm_ao_b_6_pins: pwm_ao_b_6 {
160 mux {
161 groups = "pwm_ao_b_6";
162 function = "pwm_ao_b";
163 };
164 };
jbrunetc16fe9a2017-03-26 19:19:22 +0200165
166 i2s_out_ch23_ao_pins: i2s_out_ch23_ao {
167 mux {
168 groups = "i2s_out_ch23_ao";
169 function = "i2s_out_ao";
170 };
171 };
172
173 i2s_out_ch45_ao_pins: i2s_out_ch45_ao {
174 mux {
175 groups = "i2s_out_ch45_ao";
176 function = "i2s_out_ao";
177 };
178 };
jbrunet95030622017-03-26 19:19:23 +0200179
180 spdif_out_ao_6_pins: spdif_out_ao_6 {
181 mux {
182 groups = "spdif_out_ao_6";
183 function = "spdif_out_ao";
184 };
185 };
186
187 spdif_out_ao_9_pins: spdif_out_ao_9 {
188 mux {
189 groups = "spdif_out_ao_9";
190 function = "spdif_out_ao";
191 };
192 };
Neil Armstrong6d717612017-05-24 10:28:22 +0200193
194 ao_cec_pins: ao_cec {
195 mux {
196 groups = "ao_cec";
197 function = "cec_ao";
198 };
199 };
200
201 ee_cec_pins: ee_cec {
202 mux {
203 groups = "ee_cec";
204 function = "cec_ao";
205 };
206 };
Neil Armstrongfb0fe922016-10-31 17:44:40 +0100207 };
208};
209
Andreas Färber6a573c42017-05-13 16:33:34 +0200210&hdmi_tx {
211 compatible = "amlogic,meson-gxl-dw-hdmi", "amlogic,meson-gx-dw-hdmi";
212 resets = <&reset RESET_HDMITX_CAPB3>,
213 <&reset RESET_HDMI_SYSTEM_RESET>,
214 <&reset RESET_HDMI_TX>;
215 reset-names = "hdmitx_apb", "hdmitx", "hdmitx_phy";
216 clocks = <&clkc CLKID_HDMI_PCLK>,
217 <&clkc CLKID_CLK81>,
218 <&clkc CLKID_GCLK_VENCI_INT0>;
219 clock-names = "isfr", "iahb", "venci";
220};
221
222&hiubus {
223 clkc: clock-controller@0 {
224 compatible = "amlogic,gxl-clkc", "amlogic,gxbb-clkc";
225 #clock-cells = <1>;
226 reg = <0x0 0x0 0x0 0x3db>;
227 };
228};
229
230&i2c_A {
231 clocks = <&clkc CLKID_I2C>;
232};
233
234&i2c_AO {
235 clocks = <&clkc CLKID_AO_I2C>;
236};
237
238&i2c_B {
239 clocks = <&clkc CLKID_I2C>;
240};
241
242&i2c_C {
243 clocks = <&clkc CLKID_I2C>;
244};
245
Neil Armstrongfb0fe922016-10-31 17:44:40 +0100246&periphs {
247 pinctrl_periphs: pinctrl@4b0 {
248 compatible = "amlogic,meson-gxl-periphs-pinctrl";
249 #address-cells = <2>;
250 #size-cells = <2>;
251 ranges;
252
253 gpio: bank@4b0 {
254 reg = <0x0 0x004b0 0x0 0x28>,
255 <0x0 0x004e8 0x0 0x14>,
Neil Armstrongf4c406d2017-05-23 16:21:50 +0200256 <0x0 0x00520 0x0 0x14>,
Neil Armstrongfb0fe922016-10-31 17:44:40 +0100257 <0x0 0x00430 0x0 0x40>;
258 reg-names = "mux", "pull", "pull-enable", "gpio";
259 gpio-controller;
260 #gpio-cells = <2>;
Neil Armstrongd79a0792017-05-23 16:21:49 +0200261 gpio-ranges = <&pinctrl_periphs 0 10 101>;
Neil Armstrongfb0fe922016-10-31 17:44:40 +0100262 };
263
264 emmc_pins: emmc {
265 mux {
266 groups = "emmc_nand_d07",
267 "emmc_cmd",
268 "emmc_clk",
269 "emmc_ds";
270 function = "emmc";
271 };
272 };
273
Neil Armstrongca02e3f2017-03-23 11:41:11 +0100274 nor_pins: nor {
275 mux {
276 groups = "nor_d",
277 "nor_q",
278 "nor_c",
279 "nor_cs";
280 function = "nor";
281 };
282 };
283
Neil Armstrongfb0fe922016-10-31 17:44:40 +0100284 sdcard_pins: sdcard {
285 mux {
286 groups = "sdcard_d0",
287 "sdcard_d1",
288 "sdcard_d2",
289 "sdcard_d3",
290 "sdcard_cmd",
291 "sdcard_clk";
292 function = "sdcard";
293 };
294 };
295
296 sdio_pins: sdio {
297 mux {
298 groups = "sdio_d0",
299 "sdio_d1",
300 "sdio_d2",
301 "sdio_d3",
302 "sdio_cmd",
303 "sdio_clk";
304 function = "sdio";
305 };
306 };
307
308 sdio_irq_pins: sdio_irq {
309 mux {
310 groups = "sdio_irq";
311 function = "sdio";
312 };
313 };
314
315 uart_a_pins: uart_a {
316 mux {
317 groups = "uart_tx_a",
318 "uart_rx_a";
319 function = "uart_a";
320 };
321 };
322
Martin Blumenstingl261e1d52017-01-15 23:32:53 +0100323 uart_a_cts_rts_pins: uart_a_cts_rts {
324 mux {
325 groups = "uart_cts_a",
326 "uart_rts_a";
327 function = "uart_a";
328 };
329 };
330
Neil Armstrongfb0fe922016-10-31 17:44:40 +0100331 uart_b_pins: uart_b {
332 mux {
333 groups = "uart_tx_b",
334 "uart_rx_b";
335 function = "uart_b";
336 };
337 };
338
Martin Blumenstingl261e1d52017-01-15 23:32:53 +0100339 uart_b_cts_rts_pins: uart_b_cts_rts {
340 mux {
341 groups = "uart_cts_b",
342 "uart_rts_b";
343 function = "uart_b";
344 };
345 };
346
Neil Armstrongfb0fe922016-10-31 17:44:40 +0100347 uart_c_pins: uart_c {
348 mux {
349 groups = "uart_tx_c",
350 "uart_rx_c";
351 function = "uart_c";
352 };
353 };
354
Martin Blumenstingl261e1d52017-01-15 23:32:53 +0100355 uart_c_cts_rts_pins: uart_c_cts_rts {
356 mux {
357 groups = "uart_cts_c",
358 "uart_rts_c";
359 function = "uart_c";
360 };
361 };
362
Neil Armstrongfb0fe922016-10-31 17:44:40 +0100363 i2c_a_pins: i2c_a {
364 mux {
365 groups = "i2c_sck_a",
366 "i2c_sda_a";
367 function = "i2c_a";
368 };
369 };
370
371 i2c_b_pins: i2c_b {
372 mux {
373 groups = "i2c_sck_b",
374 "i2c_sda_b";
375 function = "i2c_b";
376 };
377 };
378
379 i2c_c_pins: i2c_c {
380 mux {
381 groups = "i2c_sck_c",
382 "i2c_sda_c";
383 function = "i2c_c";
384 };
385 };
386
387 eth_pins: eth_c {
388 mux {
389 groups = "eth_mdio",
390 "eth_mdc",
391 "eth_clk_rx_clk",
392 "eth_rx_dv",
393 "eth_rxd0",
394 "eth_rxd1",
395 "eth_rxd2",
396 "eth_rxd3",
397 "eth_rgmii_tx_clk",
398 "eth_tx_en",
399 "eth_txd0",
400 "eth_txd1",
401 "eth_txd2",
402 "eth_txd3";
403 function = "eth";
404 };
405 };
406
Martin Blumenstingle98fd132017-03-18 13:27:36 +0100407 pwm_a_pins: pwm_a {
408 mux {
409 groups = "pwm_a";
410 function = "pwm_a";
411 };
412 };
413
414 pwm_b_pins: pwm_b {
415 mux {
416 groups = "pwm_b";
417 function = "pwm_b";
418 };
419 };
420
421 pwm_c_pins: pwm_c {
422 mux {
423 groups = "pwm_c";
424 function = "pwm_c";
425 };
426 };
427
428 pwm_d_pins: pwm_d {
429 mux {
430 groups = "pwm_d";
431 function = "pwm_d";
432 };
433 };
434
Neil Armstrongfb0fe922016-10-31 17:44:40 +0100435 pwm_e_pins: pwm_e {
436 mux {
437 groups = "pwm_e";
438 function = "pwm_e";
439 };
440 };
Neil Armstrongb9491652017-01-17 13:05:38 +0100441
Martin Blumenstingle98fd132017-03-18 13:27:36 +0100442 pwm_f_clk_pins: pwm_f_clk {
443 mux {
444 groups = "pwm_f_clk";
445 function = "pwm_f";
446 };
447 };
448
449 pwm_f_x_pins: pwm_f_x {
450 mux {
451 groups = "pwm_f_x";
452 function = "pwm_f";
453 };
454 };
455
Neil Armstrongb9491652017-01-17 13:05:38 +0100456 hdmi_hpd_pins: hdmi_hpd {
457 mux {
458 groups = "hdmi_hpd";
459 function = "hdmi_hpd";
460 };
461 };
462
463 hdmi_i2c_pins: hdmi_i2c {
464 mux {
465 groups = "hdmi_sda", "hdmi_scl";
466 function = "hdmi_i2c";
467 };
468 };
jbrunetc16fe9a2017-03-26 19:19:22 +0200469
470 i2s_am_clk_pins: i2s_am_clk {
471 mux {
472 groups = "i2s_am_clk";
473 function = "i2s_out";
474 };
475 };
476
477 i2s_out_ao_clk_pins: i2s_out_ao_clk {
478 mux {
479 groups = "i2s_out_ao_clk";
480 function = "i2s_out";
481 };
482 };
483
484 i2s_out_lr_clk_pins: i2s_out_lr_clk {
485 mux {
486 groups = "i2s_out_lr_clk";
487 function = "i2s_out";
488 };
489 };
490
491 i2s_out_ch01_pins: i2s_out_ch01 {
492 mux {
493 groups = "i2s_out_ch01";
494 function = "i2s_out";
495 };
496 };
497 i2sout_ch23_z_pins: i2sout_ch23_z {
498 mux {
499 groups = "i2sout_ch23_z";
500 function = "i2s_out";
501 };
502 };
503
504 i2sout_ch45_z_pins: i2sout_ch45_z {
505 mux {
506 groups = "i2sout_ch45_z";
507 function = "i2s_out";
508 };
509 };
510
511 i2sout_ch67_z_pins: i2sout_ch67_z {
512 mux {
513 groups = "i2sout_ch67_z";
514 function = "i2s_out";
515 };
516 };
jbrunet95030622017-03-26 19:19:23 +0200517
518 spdif_out_h_pins: spdif_out_ao_h {
519 mux {
520 groups = "spdif_out_h";
521 function = "spdif_out";
522 };
523 };
Neil Armstrongfb0fe922016-10-31 17:44:40 +0100524 };
Neil Armstronge9e27c62016-11-07 11:43:55 +0100525
526 eth-phy-mux {
527 compatible = "mdio-mux-mmioreg", "mdio-mux";
528 #address-cells = <1>;
529 #size-cells = <0>;
530 reg = <0x0 0x55c 0x0 0x4>;
531 mux-mask = <0xffffffff>;
532 mdio-parent-bus = <&mdio0>;
533
534 internal_mdio: mdio@e40908ff {
535 reg = <0xe40908ff>;
536 #address-cells = <1>;
537 #size-cells = <0>;
538
539 internal_phy: ethernet-phy@8 {
540 compatible = "ethernet-phy-id0181.4400", "ethernet-phy-ieee802.3-c22";
541 reg = <8>;
542 max-speed = <100>;
543 };
544 };
545
546 external_mdio: mdio@2009087f {
547 reg = <0x2009087f>;
548 #address-cells = <1>;
549 #size-cells = <0>;
550 };
551 };
Neil Armstrongfb0fe922016-10-31 17:44:40 +0100552};
Neil Armstrong973fbd52016-10-31 17:44:41 +0100553
Martin Blumenstinglbd80ef52017-01-22 19:17:14 +0100554&saradc {
555 compatible = "amlogic,meson-gxl-saradc", "amlogic,meson-saradc";
556 clocks = <&xtal>,
557 <&clkc CLKID_SAR_ADC>,
558 <&clkc CLKID_SANA>,
559 <&clkc CLKID_SAR_ADC_CLK>,
560 <&clkc CLKID_SAR_ADC_SEL>;
561 clock-names = "clkin", "core", "sana", "adc_clk", "adc_sel";
562};
563
Neil Armstrong6d489dc2016-10-31 17:44:43 +0100564&sd_emmc_a {
565 clocks = <&clkc CLKID_SD_EMMC_A>,
566 <&xtal>,
567 <&clkc CLKID_FCLK_DIV2>;
568 clock-names = "core", "clkin0", "clkin1";
569};
570
571&sd_emmc_b {
572 clocks = <&clkc CLKID_SD_EMMC_B>,
573 <&xtal>,
574 <&clkc CLKID_FCLK_DIV2>;
575 clock-names = "core", "clkin0", "clkin1";
576};
577
578&sd_emmc_c {
579 clocks = <&clkc CLKID_SD_EMMC_C>,
580 <&xtal>,
581 <&clkc CLKID_FCLK_DIV2>;
582 clock-names = "core", "clkin0", "clkin1";
583};
Neil Armstrongfafdbdf2016-12-01 10:05:58 +0100584
Neil Armstrong04b36df2017-03-13 10:10:50 +0100585&spifc {
586 clocks = <&clkc CLKID_SPI>;
587};
588
Neil Armstrongfafdbdf2016-12-01 10:05:58 +0100589&vpu {
590 compatible = "amlogic,meson-gxl-vpu", "amlogic,meson-gx-vpu";
591};