ath79: enable UART in SoC DTSI files
[openwrt/openwrt.git] / target / linux / ath79 / dts / ar7100_mikrotik_routerboard-4xx.dtsi
1 // SPDX-License-Identifier: GPL-1.0-or-later OR MIT
2
3 #include "ar7100.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 aliases {
10 led-boot = &led_user;
11 led-failsafe = &led_user;
12 led-running = &led_user;
13 };
14
15 leds {
16 compatible = "gpio-leds";
17
18 led_user: user {
19 label = "yellow:user";
20 gpios = <&gpio 4 GPIO_ACTIVE_HIGH>;
21 default-state = "on";
22 };
23
24 led1 {
25 label = "green:led1";
26 gpios = <&cpld_gpio 0 GPIO_ACTIVE_LOW>;
27 };
28
29 led2 {
30 label = "green:led2";
31 gpios = <&cpld_gpio 2 GPIO_ACTIVE_LOW>;
32 };
33
34 led3 {
35 label = "green:led3";
36 gpios = <&cpld_gpio 1 GPIO_ACTIVE_LOW>;
37 };
38
39 led4 {
40 label = "green:led4";
41 gpios = <&cpld_gpio 3 GPIO_ACTIVE_LOW>;
42 };
43
44 led5 {
45 label = "green:led5";
46 gpios = <&cpld_gpio 8 GPIO_ACTIVE_LOW>;
47 };
48 };
49 };
50
51 &gpio {
52 ngpios = <31>;
53 gpio-line-names =
54 "", "", "", "", "LED", "RDY", "", "MDC",
55 "MDIO", "", "", "", "", "", "", "",
56 "", "", "", "", "", "", "", "",
57 "", "", "", "", "", "", "", "";
58 };
59
60 &pcie0 {
61 status = "okay";
62 };
63
64 &spi {
65 status = "okay";
66
67 compatible = "mikrotik,rb4xx-spi";
68
69 flash@0 {
70 compatible = "pm25lv512", "jedec,spi-nor";
71
72 reg = <0>;
73 spi-max-frequency = <25000000>;
74
75 partitions {
76 compatible = "mikrotik,routerboot-partitions";
77 #address-cells = <1>;
78 #size-cells = <1>;
79
80 partition@0 {
81 label = "routerboot1";
82 reg = <0x0 0x0>;
83 read-only;
84 };
85
86 hard_config {
87 label = "hard_config";
88 read-only;
89 };
90
91 bios {
92 label = "bios";
93 size = <0x1000>;
94 read-only;
95 };
96
97 routerboot2 {
98 label = "routerboot2";
99 read-only;
100 };
101
102 soft_config {
103 label = "soft_config";
104 };
105 };
106 };
107
108 cpld@1 {
109 compatible = "mikrotik,rb4xx-cpld";
110
111 reg = <1>;
112 spi-max-frequency = <25000000>;
113
114 cpld_gpio: gpio {
115 compatible = "mikrotik,rb4xx-gpio";
116
117 base = <32>;
118
119 gpio-controller;
120 #gpio-cells = <2>;
121 gpio-line-names =
122 "LED1", "LED2", "LED3", "LED4",
123 "FAN", "ALE", "CLE", "nCE",
124 "LED5";
125 };
126
127 nand {
128 compatible = "mikrotik,rb4xx-nand";
129
130 gpios = <&cpld_gpio 5 GPIO_ACTIVE_HIGH>, // ALE
131 <&cpld_gpio 6 GPIO_ACTIVE_HIGH>, // CLE
132 <&cpld_gpio 7 GPIO_ACTIVE_HIGH>, // nCE
133 <&gpio 5 GPIO_ACTIVE_HIGH>; // RDY
134
135 partitions {
136 compatible = "fixed-partitions";
137 #address-cells = <1>;
138 #size-cells = <1>;
139
140 partition@0 {
141 label = "booter";
142 reg = <0x0000000 0x0040000>;
143 read-only;
144 };
145
146 partition@40000 {
147 label = "kernel";
148 reg = <0x0040000 0x0800000>;
149 };
150
151 partition@840000 {
152 label = "ubi";
153 reg = <0x0840000 0x77c0000>;
154 };
155 };
156 };
157 };
158 };
159
160 &eth0 {
161 status = "okay";
162
163 phy-handle = <&phy0>;
164 };
165
166 &mdio0 {
167 status = "okay";
168
169 phy0: ethernet-phy@0 {
170 reg = <0>;
171 };
172 };