blob: 4bbbbc6bea8322ed0967ec671a8c5f2200ac7128 [file] [log] [blame]
Carlo Caione4a69fcd2015-10-07 22:31:04 +02001/*
2 * Copyright 2015 Endless Mobile, 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 * You should have received a copy of the GNU General Public License
21 * along with this program. If not, see <http://www.gnu.org/licenses/>.
22 *
23 * Or, alternatively,
24 *
25 * b) Permission is hereby granted, free of charge, to any person
26 * obtaining a copy of this software and associated documentation
27 * files (the "Software"), to deal in the Software without
28 * restriction, including without limitation the rights to use,
29 * copy, modify, merge, publish, distribute, sublicense, and/or
30 * sell copies of the Software, and to permit persons to whom the
31 * Software is furnished to do so, subject to the following
32 * conditions:
33 *
34 * The above copyright notice and this permission notice shall be
35 * included in all copies or substantial portions of the Software.
36 *
37 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
38 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
39 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
40 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
41 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
42 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
43 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
44 * OTHER DEALINGS IN THE SOFTWARE.
45 */
46
47#include <dt-bindings/clock/meson8b-clkc.h>
48#include <dt-bindings/gpio/meson8b-gpio.h>
Neil Armstrongcad059c2016-05-30 15:27:18 +020049#include <dt-bindings/reset/amlogic,meson8b-reset.h>
Carlo Caione46921422017-09-17 18:45:23 +020050#include <dt-bindings/reset/amlogic,meson8b-clkc-reset.h>
Martin Blumenstinglf44135e2017-04-17 23:39:38 +020051#include "meson.dtsi"
Carlo Caione4a69fcd2015-10-07 22:31:04 +020052
53/ {
Carlo Caione4a69fcd2015-10-07 22:31:04 +020054 cpus {
55 #address-cells = <1>;
56 #size-cells = <0>;
57
Martin Blumenstingle8d85d72018-04-22 12:45:02 +020058 cpu0: cpu@200 {
Carlo Caione4a69fcd2015-10-07 22:31:04 +020059 device_type = "cpu";
60 compatible = "arm,cortex-a5";
61 next-level-cache = <&L2>;
62 reg = <0x200>;
Carlo Caione46921422017-09-17 18:45:23 +020063 enable-method = "amlogic,meson8b-smp";
64 resets = <&clkc CLKC_RESET_CPU0_SOFT_RESET>;
Carlo Caione4a69fcd2015-10-07 22:31:04 +020065 };
66
Martin Blumenstingle8d85d72018-04-22 12:45:02 +020067 cpu1: cpu@201 {
Carlo Caione4a69fcd2015-10-07 22:31:04 +020068 device_type = "cpu";
69 compatible = "arm,cortex-a5";
70 next-level-cache = <&L2>;
71 reg = <0x201>;
Carlo Caione46921422017-09-17 18:45:23 +020072 enable-method = "amlogic,meson8b-smp";
73 resets = <&clkc CLKC_RESET_CPU1_SOFT_RESET>;
Carlo Caione4a69fcd2015-10-07 22:31:04 +020074 };
75
Martin Blumenstingle8d85d72018-04-22 12:45:02 +020076 cpu2: cpu@202 {
Carlo Caione4a69fcd2015-10-07 22:31:04 +020077 device_type = "cpu";
78 compatible = "arm,cortex-a5";
79 next-level-cache = <&L2>;
80 reg = <0x202>;
Carlo Caione46921422017-09-17 18:45:23 +020081 enable-method = "amlogic,meson8b-smp";
82 resets = <&clkc CLKC_RESET_CPU2_SOFT_RESET>;
Carlo Caione4a69fcd2015-10-07 22:31:04 +020083 };
84
Martin Blumenstingle8d85d72018-04-22 12:45:02 +020085 cpu3: cpu@203 {
Carlo Caione4a69fcd2015-10-07 22:31:04 +020086 device_type = "cpu";
87 compatible = "arm,cortex-a5";
88 next-level-cache = <&L2>;
89 reg = <0x203>;
Carlo Caione46921422017-09-17 18:45:23 +020090 enable-method = "amlogic,meson8b-smp";
91 resets = <&clkc CLKC_RESET_CPU3_SOFT_RESET>;
Carlo Caione4a69fcd2015-10-07 22:31:04 +020092 };
93 };
Martin Blumenstingld8dd3d22017-06-15 23:33:51 +020094
Martin Blumenstingle8d85d72018-04-22 12:45:02 +020095 pmu {
96 compatible = "arm,cortex-a5-pmu";
97 interrupts = <GIC_SPI 137 IRQ_TYPE_LEVEL_HIGH>,
98 <GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>,
99 <GIC_SPI 153 IRQ_TYPE_LEVEL_HIGH>,
100 <GIC_SPI 154 IRQ_TYPE_LEVEL_HIGH>;
101 interrupt-affinity = <&cpu0>, <&cpu1>, <&cpu2>, <&cpu3>;
102 };
103
Linus Lüssingb9b4bf52017-10-02 17:59:03 +0200104 reserved-memory {
105 #address-cells = <1>;
106 #size-cells = <1>;
107 ranges;
108
109 /* 2 MiB reserved for Hardware ROM Firmware? */
110 hwrom@0 {
111 reg = <0x0 0x200000>;
112 no-map;
113 };
114 };
115
Martin Blumenstingld8dd3d22017-06-15 23:33:51 +0200116 scu@c4300000 {
117 compatible = "arm,cortex-a5-scu";
118 reg = <0xc4300000 0x100>;
119 };
Martin Blumenstinglf44135e2017-04-17 23:39:38 +0200120}; /* end of / */
Carlo Caione4a69fcd2015-10-07 22:31:04 +0200121
Martin Blumenstinglf44135e2017-04-17 23:39:38 +0200122&aobus {
Carlo Caione46921422017-09-17 18:45:23 +0200123 pmu: pmu@e0 {
124 compatible = "amlogic,meson8b-pmu", "syscon";
125 reg = <0xe0 0x18>;
126 };
127
Martin Blumenstinglf44135e2017-04-17 23:39:38 +0200128 pinctrl_aobus: pinctrl@84 {
129 compatible = "amlogic,meson8b-aobus-pinctrl";
130 reg = <0x84 0xc>;
Carlo Caione4a69fcd2015-10-07 22:31:04 +0200131 #address-cells = <1>;
132 #size-cells = <1>;
133 ranges;
134
Martin Blumenstinglf44135e2017-04-17 23:39:38 +0200135 gpio_ao: ao-bank@14 {
136 reg = <0x14 0x4>,
137 <0x2c 0x4>,
138 <0x24 0x8>;
139 reg-names = "mux", "pull", "gpio";
140 gpio-controller;
141 #gpio-cells = <2>;
Jerome Brunet677c4322017-09-21 19:14:44 +0200142 gpio-ranges = <&pinctrl_aobus 0 0 16>;
Carlo Caione4a69fcd2015-10-07 22:31:04 +0200143 };
144
Martin Blumenstinglf44135e2017-04-17 23:39:38 +0200145 uart_ao_a_pins: uart_ao_a {
146 mux {
147 groups = "uart_tx_ao_a", "uart_rx_ao_a";
148 function = "uart_ao";
Carlo Caione4a69fcd2015-10-07 22:31:04 +0200149 };
150 };
Martin Blumenstingl15b520f2018-05-06 22:57:49 +0200151
152 ir_recv_pins: remote {
153 mux {
154 groups = "remote_input";
155 function = "remote";
156 };
157 };
Carlo Caione4a69fcd2015-10-07 22:31:04 +0200158 };
Martin Blumenstinglf44135e2017-04-17 23:39:38 +0200159};
160
161&cbus {
162 clkc: clock-controller@4000 {
163 #clock-cells = <1>;
Martin Blumenstingl45631ea2017-07-28 23:13:13 +0200164 #reset-cells = <1>;
Martin Blumenstinglf44135e2017-04-17 23:39:38 +0200165 compatible = "amlogic,meson8b-clkc";
Martin Blumenstinglf31094f2018-07-21 21:05:53 +0200166 reg = <0x8000 0x4>, <0x4000 0x400>;
Martin Blumenstinglf44135e2017-04-17 23:39:38 +0200167 };
168
169 reset: reset-controller@4404 {
170 compatible = "amlogic,meson8b-reset";
Martin Blumenstingla2730ed2018-01-21 23:14:12 +0100171 reg = <0x4404 0x9c>;
Martin Blumenstinglf44135e2017-04-17 23:39:38 +0200172 #reset-cells = <1>;
173 };
174
Martin Blumenstinglbd835d52017-09-23 16:14:03 +0200175 analog_top: analog-top@81a8 {
176 compatible = "amlogic,meson8b-analog-top", "syscon";
177 reg = <0x81a8 0x14>;
178 };
179
Martin Blumenstinglf44135e2017-04-17 23:39:38 +0200180 pwm_ef: pwm@86c0 {
181 compatible = "amlogic,meson8b-pwm";
182 reg = <0x86c0 0x10>;
183 #pwm-cells = <3>;
184 status = "disabled";
185 };
186
Martin Blumenstinglf44135e2017-04-17 23:39:38 +0200187 pinctrl_cbus: pinctrl@9880 {
188 compatible = "amlogic,meson8b-cbus-pinctrl";
189 reg = <0x9880 0x10>;
190 #address-cells = <1>;
191 #size-cells = <1>;
192 ranges;
193
194 gpio: banks@80b0 {
195 reg = <0x80b0 0x28>,
196 <0x80e8 0x18>,
197 <0x8120 0x18>,
198 <0x8030 0x38>;
199 reg-names = "mux", "pull", "pull-enable", "gpio";
200 gpio-controller;
201 #gpio-cells = <2>;
Martin Blumenstingl4e461e62018-03-12 21:57:09 +0100202 gpio-ranges = <&pinctrl_cbus 0 0 83>;
Martin Blumenstinglf44135e2017-04-17 23:39:38 +0200203 };
Emiliano Ingrassiab9644652018-01-19 02:48:00 +0100204
205 eth_rgmii_pins: eth-rgmii {
206 mux {
207 groups = "eth_tx_clk",
208 "eth_tx_en",
209 "eth_txd1_0",
210 "eth_txd1_1",
211 "eth_txd0_0",
212 "eth_txd0_1",
213 "eth_rx_clk",
214 "eth_rx_dv",
215 "eth_rxd1",
216 "eth_rxd0",
217 "eth_mdio_en",
218 "eth_mdc",
219 "eth_ref_clk",
220 "eth_txd2",
221 "eth_txd3";
222 function = "ethernet";
223 };
224 };
Linus Lüssinge03efbc2018-03-17 21:11:14 +0100225
Martin Blumenstinglc821b812018-09-22 17:10:01 +0200226 i2c_a_pins: i2c-a {
227 mux {
228 groups = "i2c_sda_a", "i2c_sck_a";
229 function = "i2c_a";
230 };
231 };
232
Linus Lüssinge03efbc2018-03-17 21:11:14 +0100233 sd_b_pins: sd-b {
234 mux {
235 groups = "sd_d0_b", "sd_d1_b", "sd_d2_b",
236 "sd_d3_b", "sd_clk_b", "sd_cmd_b";
237 function = "sd_b";
238 };
239 };
Martin Blumenstinglc821b812018-09-22 17:10:01 +0200240
241 pwm_c1_pins: pwm-c1 {
242 mux {
243 groups = "pwm_c1";
244 function = "pwm_c";
245 };
246 };
247
248 uart_b0_pins: uart-b0 {
249 mux {
250 groups = "uart_tx_b0",
251 "uart_rx_b0";
252 function = "uart_b";
253 };
254 };
255
256 uart_b0_cts_rts_pins: uart-b0-cts-rts {
257 mux {
258 groups = "uart_cts_b0",
259 "uart_rts_b0";
260 function = "uart_b";
261 };
262 };
Martin Blumenstinglf44135e2017-04-17 23:39:38 +0200263 };
264};
265
Carlo Caione46921422017-09-17 18:45:23 +0200266&ahb_sram {
267 smp-sram@1ff80 {
268 compatible = "amlogic,meson8b-smp-sram";
269 reg = <0x1ff80 0x8>;
270 };
271};
272
Martin Blumenstingl2cb51a82017-10-03 01:28:04 +0200273
274&efuse {
275 compatible = "amlogic,meson8b-efuse";
276 clocks = <&clkc CLKID_EFUSE>;
277 clock-names = "core";
278};
279
Martin Blumenstinglf28d4bd2017-06-15 23:33:52 +0200280&ethmac {
Emiliano Ingrassiab9644652018-01-19 02:48:00 +0100281 compatible = "amlogic,meson8b-dwmac", "snps,dwmac-3.70a", "snps,dwmac";
282
283 reg = <0xc9410000 0x10000
284 0xc1108140 0x4>;
285
286 clocks = <&clkc CLKID_ETH>,
287 <&clkc CLKID_MPLL2>,
288 <&clkc CLKID_MPLL2>;
289 clock-names = "stmmaceth", "clkin0", "clkin1";
290
291 resets = <&reset RESET_ETHERNET>;
292 reset-names = "stmmaceth";
Martin Blumenstinglf28d4bd2017-06-15 23:33:52 +0200293};
294
Jerome Brunet7d32bc02017-10-19 14:01:41 +0200295&gpio_intc {
296 compatible = "amlogic,meson-gpio-intc",
297 "amlogic,meson8b-gpio-intc";
298 status = "okay";
299};
300
Martin Blumenstingla35910d2017-06-15 23:33:49 +0200301&hwrng {
302 compatible = "amlogic,meson8b-rng", "amlogic,meson-rng";
303 clocks = <&clkc CLKID_RNG0>;
304 clock-names = "core";
305};
306
Martin Blumenstingl7a6cc8b2018-02-17 17:06:50 +0100307&i2c_AO {
308 clocks = <&clkc CLKID_CLK81>;
309};
310
311&i2c_A {
312 clocks = <&clkc CLKID_I2C>;
313};
314
315&i2c_B {
316 clocks = <&clkc CLKID_I2C>;
317};
318
Carlo Caionebbe5b232017-04-17 23:42:44 +0200319&L2 {
320 arm,data-latency = <3 3 3>;
321 arm,tag-latency = <2 2 2>;
322 arm,filter-ranges = <0x100000 0xc0000000>;
Martin Blumenstingl9bef3062017-10-31 23:23:15 +0100323 prefetch-data = <1>;
324 prefetch-instr = <1>;
325 arm,shared-override;
Carlo Caionebbe5b232017-04-17 23:42:44 +0200326};
327
Martin Blumenstingl440bdcd2017-07-12 00:20:14 +0200328&pwm_ab {
329 compatible = "amlogic,meson8b-pwm";
330};
331
332&pwm_cd {
333 compatible = "amlogic,meson8b-pwm";
334};
335
Martin Blumenstingla39a3b92017-06-15 23:33:47 +0200336&saradc {
337 compatible = "amlogic,meson8b-saradc", "amlogic,meson-saradc";
338 clocks = <&clkc CLKID_XTAL>,
Xingyu Chenb9b9db02017-11-16 17:01:15 +0800339 <&clkc CLKID_SAR_ADC>;
340 clock-names = "clkin", "core";
Martin Blumenstingla39a3b92017-06-15 23:33:47 +0200341};
342
Martin Blumenstingl88b1b182017-10-07 18:29:39 +0200343&sdio {
344 compatible = "amlogic,meson8b-sdio", "amlogic,meson-mx-sdio";
345 clocks = <&clkc CLKID_SDIO>, <&clkc CLKID_CLK81>;
346 clock-names = "core", "clkin";
347};
348
Martin Blumenstinglf44135e2017-04-17 23:39:38 +0200349&uart_AO {
Martin Blumenstinglb02d6e72017-11-17 23:58:57 +0100350 compatible = "amlogic,meson8b-uart", "amlogic,meson-uart";
351 clocks = <&clkc CLKID_CLK81>, <&clkc CLKID_XTAL>, <&clkc CLKID_CLK81>;
352 clock-names = "baud", "xtal", "pclk";
Martin Blumenstinglf44135e2017-04-17 23:39:38 +0200353};
354
355&uart_A {
Martin Blumenstinglb02d6e72017-11-17 23:58:57 +0100356 compatible = "amlogic,meson8b-uart", "amlogic,meson-uart";
357 clocks = <&clkc CLKID_CLK81>, <&clkc CLKID_XTAL>, <&clkc CLKID_UART0>;
358 clock-names = "baud", "xtal", "pclk";
Martin Blumenstinglf44135e2017-04-17 23:39:38 +0200359};
360
361&uart_B {
Martin Blumenstinglb02d6e72017-11-17 23:58:57 +0100362 compatible = "amlogic,meson8b-uart", "amlogic,meson-uart";
363 clocks = <&clkc CLKID_CLK81>, <&clkc CLKID_XTAL>, <&clkc CLKID_UART1>;
364 clock-names = "baud", "xtal", "pclk";
Martin Blumenstinglf44135e2017-04-17 23:39:38 +0200365};
366
367&uart_C {
Martin Blumenstinglb02d6e72017-11-17 23:58:57 +0100368 compatible = "amlogic,meson8b-uart", "amlogic,meson-uart";
369 clocks = <&clkc CLKID_CLK81>, <&clkc CLKID_XTAL>, <&clkc CLKID_UART2>;
370 clock-names = "baud", "xtal", "pclk";
Martin Blumenstinglf44135e2017-04-17 23:39:38 +0200371};
Martin Blumenstingle29b1cf2017-06-15 23:33:50 +0200372
373&usb0 {
374 compatible = "amlogic,meson8b-usb", "snps,dwc2";
375 clocks = <&clkc CLKID_USB0_DDR_BRIDGE>;
376 clock-names = "otg";
377};
378
379&usb1 {
380 compatible = "amlogic,meson8b-usb", "snps,dwc2";
381 clocks = <&clkc CLKID_USB1_DDR_BRIDGE>;
382 clock-names = "otg";
383};
384
385&usb0_phy {
386 compatible = "amlogic,meson8b-usb2-phy", "amlogic,meson-mx-usb2-phy";
387 clocks = <&clkc CLKID_USB>, <&clkc CLKID_USB0>;
388 clock-names = "usb_general", "usb";
389 resets = <&reset RESET_USB_OTG>;
390};
391
392&usb1_phy {
393 compatible = "amlogic,meson8b-usb2-phy", "amlogic,meson-mx-usb2-phy";
394 clocks = <&clkc CLKID_USB>, <&clkc CLKID_USB1>;
395 clock-names = "usb_general", "usb";
396 resets = <&reset RESET_USB_OTG>;
397};
Martin Blumenstingl2eca2a12017-07-12 00:22:22 +0200398
399&wdt {
400 compatible = "amlogic,meson8b-wdt";
401};