2 * Copyright (c) 2016 Endless Computers, Inc.
3 * Author: Carlo Caione <carlo@endlessm.com>
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
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.
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.
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
31 * The above copyright notice and this permission notice shall be
32 * included in all copies or substantial portions of the Software.
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.
44 #include "meson-gx.dtsi"
45 #include <dt-bindings/clock/gxbb-clkc.h>
46 #include <dt-bindings/clock/gxbb-aoclkc.h>
47 #include <dt-bindings/gpio/meson-gxl-gpio.h>
48 #include <dt-bindings/reset/amlogic,meson-gxbb-reset.h>
51 compatible = "amlogic,meson-gxl";
54 /* Alternate 3 MiB reserved for ARM Trusted Firmware (BL31) */
55 secmon_reserved_alt: secmon@5000000 {
56 reg = <0x0 0x05000000 0x0 0x300000>;
63 reg = <0x0 0xc9410000 0x0 0x10000
64 0x0 0xc8834540 0x0 0x4>;
66 clocks = <&clkc CLKID_ETH>,
67 <&clkc CLKID_FCLK_DIV2>,
69 clock-names = "stmmaceth", "clkin0", "clkin1";
74 compatible = "snps,dwmac-mdio";
79 pinctrl_aobus: pinctrl@14 {
80 compatible = "amlogic,meson-gxl-aobus-pinctrl";
86 reg = <0x0 0x00014 0x0 0x8>,
87 <0x0 0x0002c 0x0 0x4>,
88 <0x0 0x00024 0x0 0x8>;
89 reg-names = "mux", "pull", "gpio";
92 gpio-ranges = <&pinctrl_aobus 0 0 14>;
95 uart_ao_a_pins: uart_ao_a {
97 groups = "uart_tx_ao_a", "uart_rx_ao_a";
102 uart_ao_a_cts_rts_pins: uart_ao_a_cts_rts {
104 groups = "uart_cts_ao_a",
106 function = "uart_ao";
110 uart_ao_b_pins: uart_ao_b {
112 groups = "uart_tx_ao_b", "uart_rx_ao_b";
113 function = "uart_ao_b";
117 uart_ao_b_0_1_pins: uart_ao_b_0_1 {
119 groups = "uart_tx_ao_b_0", "uart_rx_ao_b_1";
120 function = "uart_ao_b";
124 uart_ao_b_cts_rts_pins: uart_ao_b_cts_rts {
126 groups = "uart_cts_ao_b",
128 function = "uart_ao_b";
132 remote_input_ao_pins: remote_input_ao {
134 groups = "remote_input_ao";
135 function = "remote_input_ao";
139 i2c_ao_pins: i2c_ao {
141 groups = "i2c_sck_ao",
147 pwm_ao_a_3_pins: pwm_ao_a_3 {
149 groups = "pwm_ao_a_3";
150 function = "pwm_ao_a";
154 pwm_ao_a_8_pins: pwm_ao_a_8 {
156 groups = "pwm_ao_a_8";
157 function = "pwm_ao_a";
161 pwm_ao_b_pins: pwm_ao_b {
164 function = "pwm_ao_b";
168 pwm_ao_b_6_pins: pwm_ao_b_6 {
170 groups = "pwm_ao_b_6";
171 function = "pwm_ao_b";
175 i2s_out_ch23_ao_pins: i2s_out_ch23_ao {
177 groups = "i2s_out_ch23_ao";
178 function = "i2s_out_ao";
182 i2s_out_ch45_ao_pins: i2s_out_ch45_ao {
184 groups = "i2s_out_ch45_ao";
185 function = "i2s_out_ao";
189 spdif_out_ao_6_pins: spdif_out_ao_6 {
191 groups = "spdif_out_ao_6";
192 function = "spdif_out_ao";
196 spdif_out_ao_9_pins: spdif_out_ao_9 {
198 groups = "spdif_out_ao_9";
199 function = "spdif_out_ao";
203 ao_cec_pins: ao_cec {
210 ee_cec_pins: ee_cec {
220 clocks = <&clkc_AO CLKID_AO_CEC_32K>;
221 clock-names = "core";
225 compatible = "amlogic,meson-gxl-aoclkc", "amlogic,meson-gx-aoclkc";
229 compatible = "amlogic,meson-gpio-intc",
230 "amlogic,meson-gxl-gpio-intc";
235 compatible = "amlogic,meson-gxl-dw-hdmi", "amlogic,meson-gx-dw-hdmi";
236 resets = <&reset RESET_HDMITX_CAPB3>,
237 <&reset RESET_HDMI_SYSTEM_RESET>,
238 <&reset RESET_HDMI_TX>;
239 reset-names = "hdmitx_apb", "hdmitx", "hdmitx_phy";
240 clocks = <&clkc CLKID_HDMI_PCLK>,
242 <&clkc CLKID_GCLK_VENCI_INT0>;
243 clock-names = "isfr", "iahb", "venci";
247 clkc: clock-controller@0 {
248 compatible = "amlogic,gxl-clkc", "amlogic,gxbb-clkc";
250 reg = <0x0 0x0 0x0 0x3db>;
255 clocks = <&clkc CLKID_I2C>;
259 clocks = <&clkc CLKID_AO_I2C>;
263 clocks = <&clkc CLKID_I2C>;
267 clocks = <&clkc CLKID_I2C>;
271 pinctrl_periphs: pinctrl@4b0 {
272 compatible = "amlogic,meson-gxl-periphs-pinctrl";
273 #address-cells = <2>;
278 reg = <0x0 0x004b0 0x0 0x28>,
279 <0x0 0x004e8 0x0 0x14>,
280 <0x0 0x00520 0x0 0x14>,
281 <0x0 0x00430 0x0 0x40>;
282 reg-names = "mux", "pull", "pull-enable", "gpio";
285 gpio-ranges = <&pinctrl_periphs 0 0 100>;
290 groups = "emmc_nand_d07",
297 emmc_ds_pins: emmc-ds {
304 emmc_clk_gate_pins: emmc_clk_gate {
307 function = "gpio_periphs";
334 spi_ss0_pins: spi-ss0 {
341 sdcard_pins: sdcard {
343 groups = "sdcard_d0",
353 sdcard_clk_gate_pins: sdcard_clk_gate {
356 function = "gpio_periphs";
376 sdio_clk_gate_pins: sdio_clk_gate {
379 function = "gpio_periphs";
387 sdio_irq_pins: sdio_irq {
394 uart_a_pins: uart_a {
396 groups = "uart_tx_a",
402 uart_a_cts_rts_pins: uart_a_cts_rts {
404 groups = "uart_cts_a",
410 uart_b_pins: uart_b {
412 groups = "uart_tx_b",
418 uart_b_cts_rts_pins: uart_b_cts_rts {
420 groups = "uart_cts_b",
426 uart_c_pins: uart_c {
428 groups = "uart_tx_c",
434 uart_c_cts_rts_pins: uart_c_cts_rts {
436 groups = "uart_cts_c",
444 groups = "i2c_sck_a",
452 groups = "i2c_sck_b",
460 groups = "i2c_sck_c",
486 eth_link_led_pins: eth_link_led {
488 groups = "eth_link_led";
489 function = "eth_led";
493 eth_act_led_pins: eth_act_led {
495 groups = "eth_act_led";
496 function = "eth_led";
535 pwm_f_clk_pins: pwm_f_clk {
537 groups = "pwm_f_clk";
542 pwm_f_x_pins: pwm_f_x {
549 hdmi_hpd_pins: hdmi_hpd {
552 function = "hdmi_hpd";
556 hdmi_i2c_pins: hdmi_i2c {
558 groups = "hdmi_sda", "hdmi_scl";
559 function = "hdmi_i2c";
563 i2s_am_clk_pins: i2s_am_clk {
565 groups = "i2s_am_clk";
566 function = "i2s_out";
570 i2s_out_ao_clk_pins: i2s_out_ao_clk {
572 groups = "i2s_out_ao_clk";
573 function = "i2s_out";
577 i2s_out_lr_clk_pins: i2s_out_lr_clk {
579 groups = "i2s_out_lr_clk";
580 function = "i2s_out";
584 i2s_out_ch01_pins: i2s_out_ch01 {
586 groups = "i2s_out_ch01";
587 function = "i2s_out";
590 i2sout_ch23_z_pins: i2sout_ch23_z {
592 groups = "i2sout_ch23_z";
593 function = "i2s_out";
597 i2sout_ch45_z_pins: i2sout_ch45_z {
599 groups = "i2sout_ch45_z";
600 function = "i2s_out";
604 i2sout_ch67_z_pins: i2sout_ch67_z {
606 groups = "i2sout_ch67_z";
607 function = "i2s_out";
611 spdif_out_h_pins: spdif_out_ao_h {
613 groups = "spdif_out_h";
614 function = "spdif_out";
620 compatible = "mdio-mux-mmioreg", "mdio-mux";
621 #address-cells = <1>;
623 reg = <0x0 0x55c 0x0 0x4>;
624 mux-mask = <0xffffffff>;
625 mdio-parent-bus = <&mdio0>;
627 internal_mdio: mdio@e40908ff {
629 #address-cells = <1>;
632 internal_phy: ethernet-phy@8 {
633 compatible = "ethernet-phy-id0181.4400", "ethernet-phy-ieee802.3-c22";
634 interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>;
640 external_mdio: mdio@2009087f {
642 #address-cells = <1>;
649 resets = <&reset RESET_VIU>,
651 <&reset RESET_VCBUS>,
652 <&reset RESET_BT656>,
653 <&reset RESET_DVIN_RESET>,
655 <&reset RESET_VENCI>,
656 <&reset RESET_VENCP>,
659 <&reset RESET_VENCL>,
660 <&reset RESET_VID_LOCK>;
661 clocks = <&clkc CLKID_VPU>,
663 clock-names = "vpu", "vapb";
665 * VPU clocking is provided by two identical clock paths
666 * VPU_0 and VPU_1 muxed to a single clock by a glitch
667 * free mux to safely change frequency while running.
668 * Same for VAPB but with a final gate after the glitch free mux.
670 assigned-clocks = <&clkc CLKID_VPU_0_SEL>,
672 <&clkc CLKID_VPU>, /* Glitch free mux */
673 <&clkc CLKID_VAPB_0_SEL>,
674 <&clkc CLKID_VAPB_0>,
675 <&clkc CLKID_VAPB_SEL>; /* Glitch free mux */
676 assigned-clock-parents = <&clkc CLKID_FCLK_DIV3>,
677 <0>, /* Do Nothing */
679 <&clkc CLKID_FCLK_DIV4>,
680 <0>, /* Do Nothing */
681 <&clkc CLKID_VAPB_0>;
682 assigned-clock-rates = <0>, /* Do Nothing */
684 <0>, /* Do Nothing */
685 <0>, /* Do Nothing */
687 <0>; /* Do Nothing */
691 compatible = "amlogic,meson-gxl-saradc", "amlogic,meson-saradc";
693 <&clkc CLKID_SAR_ADC>,
694 <&clkc CLKID_SAR_ADC_CLK>,
695 <&clkc CLKID_SAR_ADC_SEL>;
696 clock-names = "clkin", "core", "adc_clk", "adc_sel";
700 clocks = <&clkc CLKID_SD_EMMC_A>,
701 <&clkc CLKID_SD_EMMC_A_CLK0>,
702 <&clkc CLKID_FCLK_DIV2>;
703 clock-names = "core", "clkin0", "clkin1";
707 clocks = <&clkc CLKID_SD_EMMC_B>,
708 <&clkc CLKID_SD_EMMC_B_CLK0>,
709 <&clkc CLKID_FCLK_DIV2>;
710 clock-names = "core", "clkin0", "clkin1";
714 clocks = <&clkc CLKID_SD_EMMC_C>,
715 <&clkc CLKID_SD_EMMC_C_CLK0>,
716 <&clkc CLKID_FCLK_DIV2>;
717 clock-names = "core", "clkin0", "clkin1";
721 clocks = <&clkc CLKID_SPICC>;
722 clock-names = "core";
723 resets = <&reset RESET_PERIPHS_SPICC>;
728 clocks = <&clkc CLKID_SPI>;
732 clocks = <&xtal>, <&clkc CLKID_UART0>, <&xtal>;
733 clock-names = "xtal", "pclk", "baud";
737 clocks = <&xtal>, <&clkc CLKID_CLK81>, <&xtal>;
738 clock-names = "xtal", "pclk", "baud";
742 clocks = <&xtal>, <&clkc CLKID_CLK81>, <&xtal>;
743 clock-names = "xtal", "pclk", "baud";
747 clocks = <&xtal>, <&clkc CLKID_UART1>, <&xtal>;
748 clock-names = "xtal", "pclk", "baud";
752 clocks = <&xtal>, <&clkc CLKID_UART2>, <&xtal>;
753 clock-names = "xtal", "pclk", "baud";
757 compatible = "amlogic,meson-gxl-vpu", "amlogic,meson-gx-vpu";
758 power-domains = <&pwrc_vpu>;