blob: a3a5649e32fafa52ddd4214fb46fabc71305c20d [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 };
Martin Blumenstinglf44135e2017-04-17 23:39:38 +0200115}; /* end of / */
Carlo Caione4a69fcd2015-10-07 22:31:04 +0200116
Martin Blumenstinglf44135e2017-04-17 23:39:38 +0200117&aobus {
Carlo Caione46921422017-09-17 18:45:23 +0200118 pmu: pmu@e0 {
119 compatible = "amlogic,meson8b-pmu", "syscon";
120 reg = <0xe0 0x18>;
121 };
122
Martin Blumenstinglf44135e2017-04-17 23:39:38 +0200123 pinctrl_aobus: pinctrl@84 {
124 compatible = "amlogic,meson8b-aobus-pinctrl";
125 reg = <0x84 0xc>;
Carlo Caione4a69fcd2015-10-07 22:31:04 +0200126 #address-cells = <1>;
127 #size-cells = <1>;
128 ranges;
129
Martin Blumenstinglf44135e2017-04-17 23:39:38 +0200130 gpio_ao: ao-bank@14 {
131 reg = <0x14 0x4>,
132 <0x2c 0x4>,
133 <0x24 0x8>;
134 reg-names = "mux", "pull", "gpio";
135 gpio-controller;
136 #gpio-cells = <2>;
Jerome Brunet677c4322017-09-21 19:14:44 +0200137 gpio-ranges = <&pinctrl_aobus 0 0 16>;
Carlo Caione4a69fcd2015-10-07 22:31:04 +0200138 };
139
Martin Blumenstinglf44135e2017-04-17 23:39:38 +0200140 uart_ao_a_pins: uart_ao_a {
141 mux {
142 groups = "uart_tx_ao_a", "uart_rx_ao_a";
143 function = "uart_ao";
Jerome Brunet7e263352018-11-09 15:04:45 +0100144 bias-disable;
Carlo Caione4a69fcd2015-10-07 22:31:04 +0200145 };
146 };
Martin Blumenstingl15b520f2018-05-06 22:57:49 +0200147
148 ir_recv_pins: remote {
149 mux {
150 groups = "remote_input";
151 function = "remote";
Jerome Brunet7e263352018-11-09 15:04:45 +0100152 bias-disable;
Martin Blumenstingl15b520f2018-05-06 22:57:49 +0200153 };
154 };
Carlo Caione4a69fcd2015-10-07 22:31:04 +0200155 };
Martin Blumenstinglf44135e2017-04-17 23:39:38 +0200156};
157
158&cbus {
159 clkc: clock-controller@4000 {
160 #clock-cells = <1>;
Martin Blumenstingl45631ea2017-07-28 23:13:13 +0200161 #reset-cells = <1>;
Martin Blumenstinglf44135e2017-04-17 23:39:38 +0200162 compatible = "amlogic,meson8b-clkc";
Martin Blumenstinglf31094f2018-07-21 21:05:53 +0200163 reg = <0x8000 0x4>, <0x4000 0x400>;
Martin Blumenstinglf44135e2017-04-17 23:39:38 +0200164 };
165
166 reset: reset-controller@4404 {
167 compatible = "amlogic,meson8b-reset";
Martin Blumenstingla2730ed2018-01-21 23:14:12 +0100168 reg = <0x4404 0x9c>;
Martin Blumenstinglf44135e2017-04-17 23:39:38 +0200169 #reset-cells = <1>;
170 };
171
Martin Blumenstinglbd835d52017-09-23 16:14:03 +0200172 analog_top: analog-top@81a8 {
173 compatible = "amlogic,meson8b-analog-top", "syscon";
174 reg = <0x81a8 0x14>;
175 };
176
Martin Blumenstinglf44135e2017-04-17 23:39:38 +0200177 pwm_ef: pwm@86c0 {
178 compatible = "amlogic,meson8b-pwm";
179 reg = <0x86c0 0x10>;
180 #pwm-cells = <3>;
181 status = "disabled";
182 };
183
Martin Blumenstinglf44135e2017-04-17 23:39:38 +0200184 pinctrl_cbus: pinctrl@9880 {
185 compatible = "amlogic,meson8b-cbus-pinctrl";
186 reg = <0x9880 0x10>;
187 #address-cells = <1>;
188 #size-cells = <1>;
189 ranges;
190
191 gpio: banks@80b0 {
192 reg = <0x80b0 0x28>,
193 <0x80e8 0x18>,
194 <0x8120 0x18>,
195 <0x8030 0x38>;
196 reg-names = "mux", "pull", "pull-enable", "gpio";
197 gpio-controller;
198 #gpio-cells = <2>;
Martin Blumenstingl4e461e62018-03-12 21:57:09 +0100199 gpio-ranges = <&pinctrl_cbus 0 0 83>;
Martin Blumenstinglf44135e2017-04-17 23:39:38 +0200200 };
Emiliano Ingrassiab9644652018-01-19 02:48:00 +0100201
202 eth_rgmii_pins: eth-rgmii {
203 mux {
204 groups = "eth_tx_clk",
205 "eth_tx_en",
206 "eth_txd1_0",
207 "eth_txd1_1",
208 "eth_txd0_0",
209 "eth_txd0_1",
210 "eth_rx_clk",
211 "eth_rx_dv",
212 "eth_rxd1",
213 "eth_rxd0",
214 "eth_mdio_en",
215 "eth_mdc",
216 "eth_ref_clk",
217 "eth_txd2",
218 "eth_txd3";
219 function = "ethernet";
Jerome Brunet7e263352018-11-09 15:04:45 +0100220 bias-disable;
Emiliano Ingrassiab9644652018-01-19 02:48:00 +0100221 };
222 };
Linus Lüssinge03efbc2018-03-17 21:11:14 +0100223
Martin Blumenstingla77d0ba2018-09-22 17:10:02 +0200224 eth_rmii_pins: eth-rmii {
225 mux {
226 groups = "eth_tx_en",
227 "eth_txd1_0",
228 "eth_txd0_0",
229 "eth_rx_clk",
230 "eth_rx_dv",
231 "eth_rxd1",
232 "eth_rxd0",
233 "eth_mdio_en",
234 "eth_mdc";
235 function = "ethernet";
Jerome Brunet7e263352018-11-09 15:04:45 +0100236 bias-disable;
Martin Blumenstingla77d0ba2018-09-22 17:10:02 +0200237 };
238 };
239
Martin Blumenstinglc821b812018-09-22 17:10:01 +0200240 i2c_a_pins: i2c-a {
241 mux {
242 groups = "i2c_sda_a", "i2c_sck_a";
243 function = "i2c_a";
Jerome Brunet7e263352018-11-09 15:04:45 +0100244 bias-disable;
Martin Blumenstinglc821b812018-09-22 17:10:01 +0200245 };
246 };
247
Linus Lüssinge03efbc2018-03-17 21:11:14 +0100248 sd_b_pins: sd-b {
249 mux {
250 groups = "sd_d0_b", "sd_d1_b", "sd_d2_b",
251 "sd_d3_b", "sd_clk_b", "sd_cmd_b";
252 function = "sd_b";
Jerome Brunet7e263352018-11-09 15:04:45 +0100253 bias-disable;
Linus Lüssinge03efbc2018-03-17 21:11:14 +0100254 };
255 };
Martin Blumenstinglc821b812018-09-22 17:10:01 +0200256
257 pwm_c1_pins: pwm-c1 {
258 mux {
259 groups = "pwm_c1";
260 function = "pwm_c";
Jerome Brunet7e263352018-11-09 15:04:45 +0100261 bias-disable;
Martin Blumenstinglc821b812018-09-22 17:10:01 +0200262 };
263 };
264
265 uart_b0_pins: uart-b0 {
266 mux {
267 groups = "uart_tx_b0",
268 "uart_rx_b0";
269 function = "uart_b";
Jerome Brunet7e263352018-11-09 15:04:45 +0100270 bias-disable;
Martin Blumenstinglc821b812018-09-22 17:10:01 +0200271 };
272 };
273
274 uart_b0_cts_rts_pins: uart-b0-cts-rts {
275 mux {
276 groups = "uart_cts_b0",
277 "uart_rts_b0";
278 function = "uart_b";
Jerome Brunet7e263352018-11-09 15:04:45 +0100279 bias-disable;
Martin Blumenstinglc821b812018-09-22 17:10:01 +0200280 };
281 };
Martin Blumenstinglf44135e2017-04-17 23:39:38 +0200282 };
283};
284
Carlo Caione46921422017-09-17 18:45:23 +0200285&ahb_sram {
286 smp-sram@1ff80 {
287 compatible = "amlogic,meson8b-smp-sram";
288 reg = <0x1ff80 0x8>;
289 };
290};
291
Martin Blumenstingl2cb51a82017-10-03 01:28:04 +0200292
293&efuse {
294 compatible = "amlogic,meson8b-efuse";
295 clocks = <&clkc CLKID_EFUSE>;
296 clock-names = "core";
297};
298
Martin Blumenstinglf28d4bd2017-06-15 23:33:52 +0200299&ethmac {
Emiliano Ingrassiab9644652018-01-19 02:48:00 +0100300 compatible = "amlogic,meson8b-dwmac", "snps,dwmac-3.70a", "snps,dwmac";
301
302 reg = <0xc9410000 0x10000
303 0xc1108140 0x4>;
304
305 clocks = <&clkc CLKID_ETH>,
306 <&clkc CLKID_MPLL2>,
307 <&clkc CLKID_MPLL2>;
308 clock-names = "stmmaceth", "clkin0", "clkin1";
309
310 resets = <&reset RESET_ETHERNET>;
311 reset-names = "stmmaceth";
Martin Blumenstinglf28d4bd2017-06-15 23:33:52 +0200312};
313
Jerome Brunet7d32bc02017-10-19 14:01:41 +0200314&gpio_intc {
315 compatible = "amlogic,meson-gpio-intc",
316 "amlogic,meson8b-gpio-intc";
317 status = "okay";
318};
319
Martin Blumenstingla35910d2017-06-15 23:33:49 +0200320&hwrng {
321 compatible = "amlogic,meson8b-rng", "amlogic,meson-rng";
322 clocks = <&clkc CLKID_RNG0>;
323 clock-names = "core";
324};
325
Martin Blumenstingl7a6cc8b2018-02-17 17:06:50 +0100326&i2c_AO {
327 clocks = <&clkc CLKID_CLK81>;
328};
329
330&i2c_A {
331 clocks = <&clkc CLKID_I2C>;
332};
333
334&i2c_B {
335 clocks = <&clkc CLKID_I2C>;
336};
337
Carlo Caionebbe5b232017-04-17 23:42:44 +0200338&L2 {
339 arm,data-latency = <3 3 3>;
340 arm,tag-latency = <2 2 2>;
341 arm,filter-ranges = <0x100000 0xc0000000>;
Martin Blumenstingl9bef3062017-10-31 23:23:15 +0100342 prefetch-data = <1>;
343 prefetch-instr = <1>;
344 arm,shared-override;
Carlo Caionebbe5b232017-04-17 23:42:44 +0200345};
346
Martin Blumenstingle8c276d2018-11-23 20:53:07 +0100347&periph {
348 scu@0 {
349 compatible = "arm,cortex-a5-scu";
350 reg = <0x0 0x100>;
351 };
Martin Blumenstinglf5506e82018-11-23 20:53:10 +0100352
353 timer@600 {
354 compatible = "arm,cortex-a5-twd-timer";
355 reg = <0x600 0x20>;
356 interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_EDGE_RISING)>;
357 clocks = <&clkc CLKID_PERIPH>;
358 };
Martin Blumenstingle8c276d2018-11-23 20:53:07 +0100359};
360
Martin Blumenstingl440bdcd2017-07-12 00:20:14 +0200361&pwm_ab {
362 compatible = "amlogic,meson8b-pwm";
363};
364
365&pwm_cd {
366 compatible = "amlogic,meson8b-pwm";
367};
368
Martin Blumenstingla39a3b92017-06-15 23:33:47 +0200369&saradc {
370 compatible = "amlogic,meson8b-saradc", "amlogic,meson-saradc";
371 clocks = <&clkc CLKID_XTAL>,
Xingyu Chenb9b9db02017-11-16 17:01:15 +0800372 <&clkc CLKID_SAR_ADC>;
373 clock-names = "clkin", "core";
Martin Blumenstingla39a3b92017-06-15 23:33:47 +0200374};
375
Martin Blumenstingl88b1b182017-10-07 18:29:39 +0200376&sdio {
377 compatible = "amlogic,meson8b-sdio", "amlogic,meson-mx-sdio";
378 clocks = <&clkc CLKID_SDIO>, <&clkc CLKID_CLK81>;
379 clock-names = "core", "clkin";
380};
381
Martin Blumenstingl7b141ab2018-11-16 21:42:35 +0100382&timer_abcde {
383 clocks = <&clkc CLKID_XTAL>, <&clkc CLKID_CLK81>;
384 clock-names = "xtal", "pclk";
385};
386
Martin Blumenstinglf44135e2017-04-17 23:39:38 +0200387&uart_AO {
Martin Blumenstinglb02d6e72017-11-17 23:58:57 +0100388 compatible = "amlogic,meson8b-uart", "amlogic,meson-uart";
389 clocks = <&clkc CLKID_CLK81>, <&clkc CLKID_XTAL>, <&clkc CLKID_CLK81>;
390 clock-names = "baud", "xtal", "pclk";
Martin Blumenstinglf44135e2017-04-17 23:39:38 +0200391};
392
393&uart_A {
Martin Blumenstinglb02d6e72017-11-17 23:58:57 +0100394 compatible = "amlogic,meson8b-uart", "amlogic,meson-uart";
395 clocks = <&clkc CLKID_CLK81>, <&clkc CLKID_XTAL>, <&clkc CLKID_UART0>;
396 clock-names = "baud", "xtal", "pclk";
Martin Blumenstinglf44135e2017-04-17 23:39:38 +0200397};
398
399&uart_B {
Martin Blumenstinglb02d6e72017-11-17 23:58:57 +0100400 compatible = "amlogic,meson8b-uart", "amlogic,meson-uart";
401 clocks = <&clkc CLKID_CLK81>, <&clkc CLKID_XTAL>, <&clkc CLKID_UART1>;
402 clock-names = "baud", "xtal", "pclk";
Martin Blumenstinglf44135e2017-04-17 23:39:38 +0200403};
404
405&uart_C {
Martin Blumenstinglb02d6e72017-11-17 23:58:57 +0100406 compatible = "amlogic,meson8b-uart", "amlogic,meson-uart";
407 clocks = <&clkc CLKID_CLK81>, <&clkc CLKID_XTAL>, <&clkc CLKID_UART2>;
408 clock-names = "baud", "xtal", "pclk";
Martin Blumenstinglf44135e2017-04-17 23:39:38 +0200409};
Martin Blumenstingle29b1cf2017-06-15 23:33:50 +0200410
411&usb0 {
412 compatible = "amlogic,meson8b-usb", "snps,dwc2";
413 clocks = <&clkc CLKID_USB0_DDR_BRIDGE>;
414 clock-names = "otg";
415};
416
417&usb1 {
418 compatible = "amlogic,meson8b-usb", "snps,dwc2";
419 clocks = <&clkc CLKID_USB1_DDR_BRIDGE>;
420 clock-names = "otg";
421};
422
423&usb0_phy {
424 compatible = "amlogic,meson8b-usb2-phy", "amlogic,meson-mx-usb2-phy";
425 clocks = <&clkc CLKID_USB>, <&clkc CLKID_USB0>;
426 clock-names = "usb_general", "usb";
427 resets = <&reset RESET_USB_OTG>;
428};
429
430&usb1_phy {
431 compatible = "amlogic,meson8b-usb2-phy", "amlogic,meson-mx-usb2-phy";
432 clocks = <&clkc CLKID_USB>, <&clkc CLKID_USB1>;
433 clock-names = "usb_general", "usb";
434 resets = <&reset RESET_USB_OTG>;
435};
Martin Blumenstingl2eca2a12017-07-12 00:22:22 +0200436
437&wdt {
438 compatible = "amlogic,meson8b-wdt";
439};