bmips: add support for Sercomm AD1018
[openwrt/staging/pepe2k.git] / target / linux / bmips / dts / bcm6328-sercomm-ad1018.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later
2
3 #include "bcm6328.dtsi"
4
5 / {
6 model = "Sercomm AD1018";
7 compatible = "sercomm,ad1018", "brcm,bcm6328";
8
9 aliases {
10 led-boot = &led_power_green;
11 led-failsafe = &led_power_green;
12 led-running = &led_power_green;
13 led-upgrade = &led_power_green;
14 };
15
16 keys {
17 compatible = "gpio-keys-polled";
18 poll-interval = <100>;
19
20 wps {
21 label = "wps";
22 gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
23 linux,code = <KEY_WPS_BUTTON>;
24 debounce-interval = <60>;
25 };
26
27 wlan {
28 label = "wlan";
29 gpios = <&gpio 25 GPIO_ACTIVE_LOW>;
30 linux,code = <KEY_WLAN>;
31 debounce-interval = <60>;
32 };
33
34 reset {
35 label = "reset";
36 gpios = <&gpio 31 GPIO_ACTIVE_LOW>;
37 linux,code = <KEY_RESTART>;
38 debounce-interval = <60>;
39 };
40 };
41
42 bcm432217-sprom {
43 compatible = "brcm,bcma-sprom";
44
45 pci-bus = <1>;
46 pci-dev = <0>;
47
48 nvmem-cells = <&macaddr_cferom_6a0>;
49 nvmem-cell-names = "mac-address";
50 mac-address-increment = <1>;
51
52 brcm,sprom = "brcm/bcm43217-sprom.bin";
53 brcm,sprom-fixups = <6 0x1c00>,
54 <65 0x1256>,
55 <96 0x2046>,
56 <97 0xfe69>,
57 <98 0x1726>,
58 <99 0xfa5c>,
59 <112 0x2046>,
60 <113 0xfea8>,
61 <114 0x1978>,
62 <115 0xfa26>,
63 <161 0x2222>,
64 <169 0x2222>,
65 <171 0x2222>,
66 <173 0x2222>,
67 <174 0x4444>,
68 <175 0x2222>,
69 <176 0x4444>;
70 };
71 };
72
73 &ehci {
74 status = "okay";
75 };
76
77 &ethernet {
78 status = "okay";
79
80 nvmem-cells = <&macaddr_cferom_6a0>;
81 nvmem-cell-names = "mac-address";
82 };
83
84 &leds {
85 status = "okay";
86
87 pinctrl-names = "default";
88 pinctrl-0 = <&pinctrl_leds &pinctrl_serial_led
89 &pinctrl_ephy0_spd_led &pinctrl_ephy1_act_led
90 &pinctrl_ephy2_act_led &pinctrl_ephy3_act_led>;
91
92 brcm,serial-leds;
93 brcm,serial-shift-inv;
94 brcm,serial-dat-low;
95
96 led@0 {
97 reg = <0>;
98 active-low;
99 label = "red:internet";
100 };
101
102 led@1 {
103 reg = <1>;
104 active-low;
105 label = "green:internet";
106 };
107
108 led_power_green: led@8 {
109 reg = <8>;
110 active-low;
111 label = "green:power";
112 default-state = "on";
113 };
114
115 led@10 {
116 reg = <10>;
117 active-low;
118 label = "green:adsl";
119 };
120
121 led@11 {
122 reg = <11>;
123 active-low;
124 label = "red:adsl";
125 };
126
127 led@12 {
128 reg = <12>;
129 active-low;
130 label = "green:phone";
131 };
132
133 led@13 {
134 reg = <13>;
135 active-low;
136 label = "green:wps";
137 };
138
139 led@14 {
140 reg = <14>;
141 active-low;
142 label = "green:wifi";
143 };
144
145 led@15 {
146 reg = <15>;
147 active-low;
148 label = "green:usb";
149 };
150
151 led@17 {
152 /* EPHY0 Spd */
153 reg = <17>;
154 brcm,hardware-controlled;
155 };
156 };
157
158 &ohci {
159 status = "okay";
160 };
161
162 &pcie {
163 status = "okay";
164 };
165
166 &pinctrl {
167 pinctrl_leds: leds {
168 function = "led";
169 pins = "gpio0", "gpio1";
170 };
171 };
172
173 &nflash {
174 status = "okay";
175
176 nandcs@0 {
177 compatible = "brcm,nandcs";
178 reg = <0>;
179 nand-ecc-step-size = <512>;
180 nand-ecc-strength = <15>;
181 nand-on-flash-bbt;
182
183 #address-cells = <1>;
184 #size-cells = <1>;
185
186 partitions {
187 compatible = "fixed-partitions";
188 #address-cells = <1>;
189 #size-cells = <1>;
190
191 cferom: partition@0 {
192 label = "cferom";
193 reg = <0x0000000 0x0020000>;
194 read-only;
195 };
196
197 partition@20000 {
198 label = "mmap";
199 reg = <0x0020000 0x00a0000>;
200 read-only;
201 };
202
203 partition@c0000 {
204 label = "cferam1";
205 reg = <0x00c0000 0x0140000>;
206 read-only;
207 };
208
209 partition@200000 {
210 label = "cferam2";
211 reg = <0x0200000 0x0140000>;
212 read-only;
213 };
214
215 partition@340000 {
216 label = "serial";
217 reg = <0x0340000 0x00a0000>;
218 read-only;
219 };
220
221 partition@3e0000 {
222 label = "protect";
223 reg = <0x03e0000 0x0140000>;
224 read-only;
225 };
226
227 partition@6920000 {
228 label = "bootflag1";
229 reg = <0x6920000 0x0140000>;
230 read-only;
231 };
232
233 partition@6a60000 {
234 label = "bootflag2";
235 reg = <0x6a60000 0x0140000>;
236 read-only;
237 };
238
239 partition@520000 {
240 compatible = "sercomm,wfi";
241 label = "wfi";
242 reg = <0x0520000 0x6400000>;
243 };
244
245 partition@6ba0000 {
246 label = "xml_cfg";
247 reg = <0x6ba0000 0x0280000>;
248 read-only;
249 };
250
251 partition@6e20000 {
252 label = "app_dat";
253 reg = <0x6e20000 0x0280000>;
254 read-only;
255 };
256 };
257 };
258 };
259
260 &switch0 {
261 ports {
262 port@0 {
263 reg = <0>;
264 label = "fibre";
265
266 phy-handle = <&phy1>;
267 phy-mode = "mii";
268 };
269
270 port@1 {
271 reg = <1>;
272 label = "lan3";
273
274 phy-handle = <&phy2>;
275 phy-mode = "mii";
276 };
277
278 port@2 {
279 reg = <2>;
280 label = "lan2";
281
282 phy-handle = <&phy3>;
283 phy-mode = "mii";
284 };
285
286 port@3 {
287 reg = <3>;
288 label = "lan1";
289
290 phy-handle = <&phy4>;
291 phy-mode = "mii";
292 };
293 };
294 };
295
296 &uart0 {
297 status = "okay";
298 };
299
300 &usbh {
301 status = "okay";
302 };
303
304 &cferom {
305 compatible = "nvmem-cells";
306 #address-cells = <1>;
307 #size-cells = <1>;
308
309 macaddr_cferom_6a0: macaddr@6a0 {
310 reg = <0x6a0 0x6>;
311 };
312 };