2 * Copyright (c) 2016 Andreas Färber
4 * This file is dual-licensed: you can use it either under the terms
5 * of the GPL or the X11 license, at your option. Note that this dual
6 * licensing only applies to this file, and not this project as a
9 * a) This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License as
11 * published by the Free Software Foundation; either version 2 of the
12 * License, or (at your option) any later version.
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
21 * b) Permission is hereby granted, free of charge, to any person
22 * obtaining a copy of this software and associated documentation
23 * files (the "Software"), to deal in the Software without
24 * restriction, including without limitation the rights to use,
25 * copy, modify, merge, publish, distribute, sublicense, and/or
26 * sell copies of the Software, and to permit persons to whom the
27 * Software is furnished to do so, subject to the following
30 * The above copyright notice and this permission notice shall be
31 * included in all copies or substantial portions of the Software.
33 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
34 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
35 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
36 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
37 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
38 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
39 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
40 * OTHER DEALINGS IN THE SOFTWARE.
43 #include "meson-gx.dtsi"
44 #include <dt-bindings/gpio/meson-gxbb-gpio.h>
45 #include <dt-bindings/reset/amlogic,meson-gxbb-reset.h>
46 #include <dt-bindings/clock/gxbb-clkc.h>
47 #include <dt-bindings/clock/gxbb-aoclkc.h>
48 #include <dt-bindings/reset/gxbb-aoclkc.h>
51 compatible = "amlogic,meson-gxbb";
54 usb0_phy: phy@c0000000 {
55 compatible = "amlogic,meson-gxbb-usb2-phy";
57 reg = <0x0 0xc0000000 0x0 0x20>;
58 resets = <&reset RESET_USB_OTG>;
59 clocks = <&clkc CLKID_USB>, <&clkc CLKID_USB0>;
60 clock-names = "usb_general", "usb";
64 usb1_phy: phy@c0000020 {
65 compatible = "amlogic,meson-gxbb-usb2-phy";
67 reg = <0x0 0xc0000020 0x0 0x20>;
68 resets = <&reset RESET_USB_OTG>;
69 clocks = <&clkc CLKID_USB>, <&clkc CLKID_USB1>;
70 clock-names = "usb_general", "usb";
75 compatible = "amlogic,meson-gxbb-usb", "snps,dwc2";
76 reg = <0x0 0xc9000000 0x0 0x40000>;
77 interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
78 clocks = <&clkc CLKID_USB0_DDR_BRIDGE>;
81 phy-names = "usb2-phy";
87 compatible = "amlogic,meson-gxbb-usb", "snps,dwc2";
88 reg = <0x0 0xc9100000 0x0 0x40000>;
89 interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
90 clocks = <&clkc CLKID_USB1_DDR_BRIDGE>;
93 phy-names = "usb2-phy";
101 pinctrl_aobus: pinctrl@14 {
102 compatible = "amlogic,meson-gxbb-aobus-pinctrl";
103 #address-cells = <2>;
108 reg = <0x0 0x00014 0x0 0x8>,
109 <0x0 0x0002c 0x0 0x4>,
110 <0x0 0x00024 0x0 0x8>;
111 reg-names = "mux", "pull", "gpio";
114 gpio-ranges = <&pinctrl_aobus 0 0 14>;
117 uart_ao_a_pins: uart_ao_a {
119 groups = "uart_tx_ao_a", "uart_rx_ao_a";
120 function = "uart_ao";
124 uart_ao_a_cts_rts_pins: uart_ao_a_cts_rts {
126 groups = "uart_cts_ao_a",
128 function = "uart_ao";
132 uart_ao_b_pins: uart_ao_b {
134 groups = "uart_tx_ao_b", "uart_rx_ao_b";
135 function = "uart_ao_b";
139 uart_ao_b_cts_rts_pins: uart_ao_b_cts_rts {
141 groups = "uart_cts_ao_b",
143 function = "uart_ao_b";
147 remote_input_ao_pins: remote_input_ao {
149 groups = "remote_input_ao";
150 function = "remote_input_ao";
154 i2c_ao_pins: i2c_ao {
156 groups = "i2c_sck_ao",
162 pwm_ao_a_3_pins: pwm_ao_a_3 {
164 groups = "pwm_ao_a_3";
165 function = "pwm_ao_a_3";
169 pwm_ao_a_6_pins: pwm_ao_a_6 {
171 groups = "pwm_ao_a_6";
172 function = "pwm_ao_a_6";
176 pwm_ao_a_12_pins: pwm_ao_a_12 {
178 groups = "pwm_ao_a_12";
179 function = "pwm_ao_a_12";
183 pwm_ao_b_pins: pwm_ao_b {
186 function = "pwm_ao_b";
190 i2s_am_clk_pins: i2s_am_clk {
192 groups = "i2s_am_clk";
193 function = "i2s_out_ao";
197 i2s_out_ao_clk_pins: i2s_out_ao_clk {
199 groups = "i2s_out_ao_clk";
200 function = "i2s_out_ao";
204 i2s_out_lr_clk_pins: i2s_out_lr_clk {
206 groups = "i2s_out_lr_clk";
207 function = "i2s_out_ao";
211 i2s_out_ch01_ao_pins: i2s_out_ch01_ao {
213 groups = "i2s_out_ch01_ao";
214 function = "i2s_out_ao";
218 i2s_out_ch23_ao_pins: i2s_out_ch23_ao {
220 groups = "i2s_out_ch23_ao";
221 function = "i2s_out_ao";
225 i2s_out_ch45_ao_pins: i2s_out_ch45_ao {
227 groups = "i2s_out_ch45_ao";
228 function = "i2s_out_ao";
232 spdif_out_ao_6_pins: spdif_out_ao_6 {
234 groups = "spdif_out_ao_6";
235 function = "spdif_out_ao";
239 spdif_out_ao_13_pins: spdif_out_ao_13 {
241 groups = "spdif_out_ao_13";
242 function = "spdif_out_ao";
246 ao_cec_pins: ao_cec {
253 ee_cec_pins: ee_cec {
264 compatible = "amlogic,meson-gxbb-mali", "arm,mali-450";
265 reg = <0x0 0xc0000 0x0 0x40000>;
266 interrupts = <GIC_SPI 160 IRQ_TYPE_LEVEL_HIGH>,
267 <GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH>,
268 <GIC_SPI 162 IRQ_TYPE_LEVEL_HIGH>,
269 <GIC_SPI 163 IRQ_TYPE_LEVEL_HIGH>,
270 <GIC_SPI 164 IRQ_TYPE_LEVEL_HIGH>,
271 <GIC_SPI 165 IRQ_TYPE_LEVEL_HIGH>,
272 <GIC_SPI 166 IRQ_TYPE_LEVEL_HIGH>,
273 <GIC_SPI 167 IRQ_TYPE_LEVEL_HIGH>,
274 <GIC_SPI 168 IRQ_TYPE_LEVEL_HIGH>,
275 <GIC_SPI 169 IRQ_TYPE_LEVEL_HIGH>;
276 interrupt-names = "gp", "gpmmu", "pp", "pmu",
277 "pp0", "ppmmu0", "pp1", "ppmmu1",
279 clocks = <&clkc CLKID_CLK81>, <&clkc CLKID_MALI>;
280 clock-names = "bus", "core";
283 * Mali clocking is provided by two identical clock paths
284 * MALI_0 and MALI_1 muxed to a single clock by a glitch
285 * free mux to safely change frequency while running.
287 assigned-clocks = <&clkc CLKID_MALI_0_SEL>,
288 <&clkc CLKID_MALI_0>,
289 <&clkc CLKID_MALI>; /* Glitch free mux */
290 assigned-clock-parents = <&clkc CLKID_FCLK_DIV3>,
291 <0>, /* Do Nothing */
292 <&clkc CLKID_MALI_0>;
293 assigned-clock-rates = <0>, /* Do Nothing */
295 <0>; /* Do Nothing */
301 compatible = "amlogic,meson-gxbb-spifc";
302 reg = <0x0 0x08c80 0x0 0x80>;
303 #address-cells = <1>;
305 clocks = <&clkc CLKID_SPI>;
311 clocks = <&clkc_AO CLKID_AO_CEC_32K>;
312 clock-names = "core";
316 compatible = "amlogic,meson-gxbb-aoclkc", "amlogic,meson-gx-aoclkc";
320 clocks = <&clkc CLKID_ETH>,
321 <&clkc CLKID_FCLK_DIV2>,
323 clock-names = "stmmaceth", "clkin0", "clkin1";
327 compatible = "amlogic,meson-gpio-intc",
328 "amlogic,meson-gxbb-gpio-intc";
333 compatible = "amlogic,meson-gxbb-dw-hdmi", "amlogic,meson-gx-dw-hdmi";
334 resets = <&reset RESET_HDMITX_CAPB3>,
335 <&reset RESET_HDMI_SYSTEM_RESET>,
336 <&reset RESET_HDMI_TX>;
337 reset-names = "hdmitx_apb", "hdmitx", "hdmitx_phy";
338 clocks = <&clkc CLKID_HDMI_PCLK>,
340 <&clkc CLKID_GCLK_VENCI_INT0>;
341 clock-names = "isfr", "iahb", "venci";
345 clkc: clock-controller@0 {
346 compatible = "amlogic,gxbb-clkc";
348 reg = <0x0 0x0 0x0 0x3db>;
353 clocks = <&clkc CLKID_RNG0>;
354 clock-names = "core";
358 clocks = <&clkc CLKID_I2C>;
362 clocks = <&clkc CLKID_AO_I2C>;
366 clocks = <&clkc CLKID_I2C>;
370 clocks = <&clkc CLKID_I2C>;
374 pinctrl_periphs: pinctrl@4b0 {
375 compatible = "amlogic,meson-gxbb-periphs-pinctrl";
376 #address-cells = <2>;
381 reg = <0x0 0x004b0 0x0 0x28>,
382 <0x0 0x004e8 0x0 0x14>,
383 <0x0 0x00520 0x0 0x14>,
384 <0x0 0x00430 0x0 0x40>;
385 reg-names = "mux", "pull", "pull-enable", "gpio";
388 gpio-ranges = <&pinctrl_periphs 0 0 119>;
393 groups = "emmc_nand_d07",
400 emmc_ds_pins: emmc-ds {
407 emmc_clk_gate_pins: emmc_clk_gate {
410 function = "gpio_periphs";
437 spi_ss0_pins: spi-ss0 {
444 sdcard_pins: sdcard {
446 groups = "sdcard_d0",
456 sdcard_clk_gate_pins: sdcard_clk_gate {
459 function = "gpio_periphs";
479 sdio_clk_gate_pins: sdio_clk_gate {
482 function = "gpio_periphs";
490 sdio_irq_pins: sdio_irq {
497 uart_a_pins: uart_a {
499 groups = "uart_tx_a",
505 uart_a_cts_rts_pins: uart_a_cts_rts {
507 groups = "uart_cts_a",
513 uart_b_pins: uart_b {
515 groups = "uart_tx_b",
521 uart_b_cts_rts_pins: uart_b_cts_rts {
523 groups = "uart_cts_b",
529 uart_c_pins: uart_c {
531 groups = "uart_tx_c",
537 uart_c_cts_rts_pins: uart_c_cts_rts {
539 groups = "uart_cts_c",
547 groups = "i2c_sck_a",
555 groups = "i2c_sck_b",
563 groups = "i2c_sck_c",
569 eth_rgmii_pins: eth-rgmii {
589 eth_rmii_pins: eth-rmii {
604 pwm_a_x_pins: pwm_a_x {
607 function = "pwm_a_x";
611 pwm_a_y_pins: pwm_a_y {
614 function = "pwm_a_y";
639 pwm_f_x_pins: pwm_f_x {
642 function = "pwm_f_x";
646 pwm_f_y_pins: pwm_f_y {
649 function = "pwm_f_y";
653 hdmi_hpd_pins: hdmi_hpd {
656 function = "hdmi_hpd";
660 hdmi_i2c_pins: hdmi_i2c {
662 groups = "hdmi_sda", "hdmi_scl";
663 function = "hdmi_i2c";
667 i2sout_ch23_y_pins: i2sout_ch23_y {
669 groups = "i2sout_ch23_y";
670 function = "i2s_out";
674 i2sout_ch45_y_pins: i2sout_ch45_y {
676 groups = "i2sout_ch45_y";
677 function = "i2s_out";
681 i2sout_ch67_y_pins: i2sout_ch67_y {
683 groups = "i2sout_ch67_y";
684 function = "i2s_out";
688 spdif_out_y_pins: spdif_out_y {
690 groups = "spdif_out_y";
691 function = "spdif_out";
698 resets = <&reset RESET_VIU>,
700 <&reset RESET_VCBUS>,
701 <&reset RESET_BT656>,
702 <&reset RESET_DVIN_RESET>,
704 <&reset RESET_VENCI>,
705 <&reset RESET_VENCP>,
708 <&reset RESET_VENCL>,
709 <&reset RESET_VID_LOCK>;
710 clocks = <&clkc CLKID_VPU>,
712 clock-names = "vpu", "vapb";
714 * VPU clocking is provided by two identical clock paths
715 * VPU_0 and VPU_1 muxed to a single clock by a glitch
716 * free mux to safely change frequency while running.
717 * Same for VAPB but with a final gate after the glitch free mux.
719 assigned-clocks = <&clkc CLKID_VPU_0_SEL>,
721 <&clkc CLKID_VPU>, /* Glitch free mux */
722 <&clkc CLKID_VAPB_0_SEL>,
723 <&clkc CLKID_VAPB_0>,
724 <&clkc CLKID_VAPB_SEL>; /* Glitch free mux */
725 assigned-clock-parents = <&clkc CLKID_FCLK_DIV3>,
726 <0>, /* Do Nothing */
728 <&clkc CLKID_FCLK_DIV4>,
729 <0>, /* Do Nothing */
730 <&clkc CLKID_VAPB_0>;
731 assigned-clock-rates = <0>, /* Do Nothing */
733 <0>, /* Do Nothing */
734 <0>, /* Do Nothing */
736 <0>; /* Do Nothing */
740 compatible = "amlogic,meson-gxbb-saradc", "amlogic,meson-saradc";
742 <&clkc CLKID_SAR_ADC>,
743 <&clkc CLKID_SAR_ADC_CLK>,
744 <&clkc CLKID_SAR_ADC_SEL>;
745 clock-names = "clkin", "core", "adc_clk", "adc_sel";
749 clocks = <&clkc CLKID_SD_EMMC_A>,
750 <&clkc CLKID_SD_EMMC_A_CLK0>,
751 <&clkc CLKID_FCLK_DIV2>;
752 clock-names = "core", "clkin0", "clkin1";
756 clocks = <&clkc CLKID_SD_EMMC_B>,
757 <&clkc CLKID_SD_EMMC_B_CLK0>,
758 <&clkc CLKID_FCLK_DIV2>;
759 clock-names = "core", "clkin0", "clkin1";
763 clocks = <&clkc CLKID_SD_EMMC_C>,
764 <&clkc CLKID_SD_EMMC_C_CLK0>,
765 <&clkc CLKID_FCLK_DIV2>;
766 clock-names = "core", "clkin0", "clkin1";
770 clocks = <&clkc CLKID_SPICC>;
771 clock-names = "core";
772 resets = <&reset RESET_PERIPHS_SPICC>;
777 clocks = <&clkc CLKID_SPI>;
781 clocks = <&xtal>, <&clkc CLKID_UART0>, <&xtal>;
782 clock-names = "xtal", "pclk", "baud";
786 clocks = <&xtal>, <&clkc CLKID_CLK81>, <&xtal>;
787 clock-names = "xtal", "pclk", "baud";
791 clocks = <&xtal>, <&clkc CLKID_CLK81>, <&xtal>;
792 clock-names = "xtal", "pclk", "baud";
796 clocks = <&xtal>, <&clkc CLKID_UART1>, <&xtal>;
797 clock-names = "xtal", "pclk", "baud";
801 clocks = <&xtal>, <&clkc CLKID_UART2>, <&xtal>;
802 clock-names = "xtal", "pclk", "baud";
806 compatible = "amlogic,meson-gxbb-vpu", "amlogic,meson-gx-vpu";
807 power-domains = <&pwrc_vpu>;