1*724ba675SRob Herring// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2*724ba675SRob Herring/*
3*724ba675SRob Herring * Copyright (C) 2021-2022 Arınç ÜNAL <arinc.unal@arinc9.com>
4*724ba675SRob Herring */
5*724ba675SRob Herring
6*724ba675SRob Herring/dts-v1/;
7*724ba675SRob Herring
8*724ba675SRob Herring#include "bcm47094.dtsi"
9*724ba675SRob Herring#include "bcm5301x-nand-cs0-bch8.dtsi"
10*724ba675SRob Herring
11*724ba675SRob Herring/ {
12*724ba675SRob Herring	compatible = "asus,rt-ac88u", "brcm,bcm47094", "brcm,bcm4708";
13*724ba675SRob Herring	model = "Asus RT-AC88U";
14*724ba675SRob Herring
15*724ba675SRob Herring	chosen {
16*724ba675SRob Herring		bootargs = "earlycon";
17*724ba675SRob Herring	};
18*724ba675SRob Herring
19*724ba675SRob Herring	memory@0 {
20*724ba675SRob Herring		device_type = "memory";
21*724ba675SRob Herring		reg = <0x00000000 0x08000000>,
22*724ba675SRob Herring		      <0x88000000 0x18000000>;
23*724ba675SRob Herring	};
24*724ba675SRob Herring
25*724ba675SRob Herring	nvram@1c080000 {
26*724ba675SRob Herring		compatible = "brcm,nvram";
27*724ba675SRob Herring		reg = <0x1c080000 0x00180000>;
28*724ba675SRob Herring
29*724ba675SRob Herring		et1macaddr: et1macaddr {
30*724ba675SRob Herring		};
31*724ba675SRob Herring	};
32*724ba675SRob Herring
33*724ba675SRob Herring	leds {
34*724ba675SRob Herring		compatible = "gpio-leds";
35*724ba675SRob Herring
36*724ba675SRob Herring		led-power {
37*724ba675SRob Herring			label = "white:power";
38*724ba675SRob Herring			gpios = <&chipcommon 3 GPIO_ACTIVE_LOW>;
39*724ba675SRob Herring			linux,default-trigger = "default-on";
40*724ba675SRob Herring		};
41*724ba675SRob Herring
42*724ba675SRob Herring		led-wan-red {
43*724ba675SRob Herring			label = "red:wan";
44*724ba675SRob Herring			gpios = <&chipcommon 5 GPIO_ACTIVE_HIGH>;
45*724ba675SRob Herring		};
46*724ba675SRob Herring
47*724ba675SRob Herring		led-lan {
48*724ba675SRob Herring			label = "white:lan";
49*724ba675SRob Herring			gpios = <&chipcommon 21 GPIO_ACTIVE_LOW>;
50*724ba675SRob Herring		};
51*724ba675SRob Herring
52*724ba675SRob Herring		led-usb2 {
53*724ba675SRob Herring			label = "white:usb2";
54*724ba675SRob Herring			gpios = <&chipcommon 16 GPIO_ACTIVE_LOW>;
55*724ba675SRob Herring			trigger-sources = <&ehci_port2>;
56*724ba675SRob Herring			linux,default-trigger = "usbport";
57*724ba675SRob Herring		};
58*724ba675SRob Herring
59*724ba675SRob Herring		led-usb3 {
60*724ba675SRob Herring			label = "white:usb3";
61*724ba675SRob Herring			gpios = <&chipcommon 17 GPIO_ACTIVE_LOW>;
62*724ba675SRob Herring			trigger-sources = <&ehci_port1>, <&xhci_port1>;
63*724ba675SRob Herring			linux,default-trigger = "usbport";
64*724ba675SRob Herring		};
65*724ba675SRob Herring
66*724ba675SRob Herring		led-wps {
67*724ba675SRob Herring			label = "white:wps";
68*724ba675SRob Herring			gpios = <&chipcommon 19 GPIO_ACTIVE_LOW>;
69*724ba675SRob Herring		};
70*724ba675SRob Herring	};
71*724ba675SRob Herring
72*724ba675SRob Herring	gpio-keys {
73*724ba675SRob Herring		compatible = "gpio-keys";
74*724ba675SRob Herring
75*724ba675SRob Herring		button-wps {
76*724ba675SRob Herring			label = "WPS";
77*724ba675SRob Herring			linux,code = <KEY_WPS_BUTTON>;
78*724ba675SRob Herring			gpios = <&chipcommon 20 GPIO_ACTIVE_LOW>;
79*724ba675SRob Herring		};
80*724ba675SRob Herring
81*724ba675SRob Herring		button-reset {
82*724ba675SRob Herring			label = "Reset";
83*724ba675SRob Herring			linux,code = <KEY_RESTART>;
84*724ba675SRob Herring			gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>;
85*724ba675SRob Herring		};
86*724ba675SRob Herring
87*724ba675SRob Herring		button-wifi {
88*724ba675SRob Herring			label = "Wi-Fi";
89*724ba675SRob Herring			linux,code = <KEY_RFKILL>;
90*724ba675SRob Herring			gpios = <&chipcommon 18 GPIO_ACTIVE_LOW>;
91*724ba675SRob Herring		};
92*724ba675SRob Herring
93*724ba675SRob Herring		button-led {
94*724ba675SRob Herring			label = "Backlight";
95*724ba675SRob Herring			linux,code = <KEY_BRIGHTNESS_ZERO>;
96*724ba675SRob Herring			gpios = <&chipcommon 4 GPIO_ACTIVE_LOW>;
97*724ba675SRob Herring		};
98*724ba675SRob Herring	};
99*724ba675SRob Herring
100*724ba675SRob Herring	switch {
101*724ba675SRob Herring		compatible = "realtek,rtl8365mb";
102*724ba675SRob Herring		/* 7 = MDIO (has input reads), 6 = MDC (clock, output only) */
103*724ba675SRob Herring		mdc-gpios = <&chipcommon 6 GPIO_ACTIVE_HIGH>;
104*724ba675SRob Herring		mdio-gpios = <&chipcommon 7 GPIO_ACTIVE_HIGH>;
105*724ba675SRob Herring		reset-gpios = <&chipcommon 10 GPIO_ACTIVE_LOW>;
106*724ba675SRob Herring		realtek,disable-leds;
107*724ba675SRob Herring		dsa,member = <1 0>;
108*724ba675SRob Herring
109*724ba675SRob Herring		ports {
110*724ba675SRob Herring			#address-cells = <1>;
111*724ba675SRob Herring			#size-cells = <0>;
112*724ba675SRob Herring
113*724ba675SRob Herring			port@0 {
114*724ba675SRob Herring				reg = <0>;
115*724ba675SRob Herring				label = "lan5";
116*724ba675SRob Herring				phy-handle = <&ethphy0>;
117*724ba675SRob Herring			};
118*724ba675SRob Herring
119*724ba675SRob Herring			port@1 {
120*724ba675SRob Herring				reg = <1>;
121*724ba675SRob Herring				label = "lan6";
122*724ba675SRob Herring				phy-handle = <&ethphy1>;
123*724ba675SRob Herring			};
124*724ba675SRob Herring
125*724ba675SRob Herring			port@2 {
126*724ba675SRob Herring				reg = <2>;
127*724ba675SRob Herring				label = "lan7";
128*724ba675SRob Herring				phy-handle = <&ethphy2>;
129*724ba675SRob Herring			};
130*724ba675SRob Herring
131*724ba675SRob Herring			port@3 {
132*724ba675SRob Herring				reg = <3>;
133*724ba675SRob Herring				label = "lan8";
134*724ba675SRob Herring				phy-handle = <&ethphy3>;
135*724ba675SRob Herring			};
136*724ba675SRob Herring
137*724ba675SRob Herring			port@6 {
138*724ba675SRob Herring				reg = <6>;
139*724ba675SRob Herring				label = "cpu";
140*724ba675SRob Herring				ethernet = <&sw0_p5>;
141*724ba675SRob Herring				phy-mode = "rgmii";
142*724ba675SRob Herring				tx-internal-delay-ps = <2000>;
143*724ba675SRob Herring				rx-internal-delay-ps = <2100>;
144*724ba675SRob Herring
145*724ba675SRob Herring				fixed-link {
146*724ba675SRob Herring					speed = <1000>;
147*724ba675SRob Herring					full-duplex;
148*724ba675SRob Herring					pause;
149*724ba675SRob Herring				};
150*724ba675SRob Herring			};
151*724ba675SRob Herring		};
152*724ba675SRob Herring
153*724ba675SRob Herring		mdio {
154*724ba675SRob Herring			compatible = "realtek,smi-mdio";
155*724ba675SRob Herring			#address-cells = <1>;
156*724ba675SRob Herring			#size-cells = <0>;
157*724ba675SRob Herring
158*724ba675SRob Herring			ethphy0: ethernet-phy@0 {
159*724ba675SRob Herring				reg = <0>;
160*724ba675SRob Herring			};
161*724ba675SRob Herring
162*724ba675SRob Herring			ethphy1: ethernet-phy@1 {
163*724ba675SRob Herring				reg = <1>;
164*724ba675SRob Herring			};
165*724ba675SRob Herring
166*724ba675SRob Herring			ethphy2: ethernet-phy@2 {
167*724ba675SRob Herring				reg = <2>;
168*724ba675SRob Herring			};
169*724ba675SRob Herring
170*724ba675SRob Herring			ethphy3: ethernet-phy@3 {
171*724ba675SRob Herring				reg = <3>;
172*724ba675SRob Herring			};
173*724ba675SRob Herring		};
174*724ba675SRob Herring	};
175*724ba675SRob Herring};
176*724ba675SRob Herring
177*724ba675SRob Herring&srab {
178*724ba675SRob Herring	compatible = "brcm,bcm53012-srab", "brcm,bcm5301x-srab";
179*724ba675SRob Herring	status = "okay";
180*724ba675SRob Herring	dsa,member = <0 0>;
181*724ba675SRob Herring
182*724ba675SRob Herring	ports {
183*724ba675SRob Herring		port@0 {
184*724ba675SRob Herring			label = "lan4";
185*724ba675SRob Herring		};
186*724ba675SRob Herring
187*724ba675SRob Herring		port@1 {
188*724ba675SRob Herring			label = "lan3";
189*724ba675SRob Herring		};
190*724ba675SRob Herring
191*724ba675SRob Herring		port@2 {
192*724ba675SRob Herring			label = "lan2";
193*724ba675SRob Herring		};
194*724ba675SRob Herring
195*724ba675SRob Herring		port@3 {
196*724ba675SRob Herring			label = "lan1";
197*724ba675SRob Herring		};
198*724ba675SRob Herring
199*724ba675SRob Herring		port@4 {
200*724ba675SRob Herring			label = "wan";
201*724ba675SRob Herring		};
202*724ba675SRob Herring
203*724ba675SRob Herring		sw0_p5: port@5 {
204*724ba675SRob Herring			/delete-property/ethernet;
205*724ba675SRob Herring
206*724ba675SRob Herring			label = "extsw";
207*724ba675SRob Herring			phy-mode = "rgmii";
208*724ba675SRob Herring
209*724ba675SRob Herring			fixed-link {
210*724ba675SRob Herring				speed = <1000>;
211*724ba675SRob Herring				full-duplex;
212*724ba675SRob Herring				pause;
213*724ba675SRob Herring			};
214*724ba675SRob Herring		};
215*724ba675SRob Herring
216*724ba675SRob Herring		port@7 {
217*724ba675SRob Herring			label = "cpu";
218*724ba675SRob Herring
219*724ba675SRob Herring			fixed-link {
220*724ba675SRob Herring				speed = <1000>;
221*724ba675SRob Herring				full-duplex;
222*724ba675SRob Herring			};
223*724ba675SRob Herring		};
224*724ba675SRob Herring
225*724ba675SRob Herring		port@8 {
226*724ba675SRob Herring			label = "cpu";
227*724ba675SRob Herring		};
228*724ba675SRob Herring	};
229*724ba675SRob Herring};
230*724ba675SRob Herring
231*724ba675SRob Herring&gmac0 {
232*724ba675SRob Herring	status = "disabled";
233*724ba675SRob Herring};
234*724ba675SRob Herring
235*724ba675SRob Herring&gmac1 {
236*724ba675SRob Herring	nvmem-cells = <&et1macaddr>;
237*724ba675SRob Herring	nvmem-cell-names = "mac-address";
238*724ba675SRob Herring};
239*724ba675SRob Herring
240*724ba675SRob Herring&usb2 {
241*724ba675SRob Herring	vcc-gpio = <&chipcommon 9 GPIO_ACTIVE_HIGH>;
242*724ba675SRob Herring};
243*724ba675SRob Herring
244*724ba675SRob Herring&usb3_phy {
245*724ba675SRob Herring	status = "okay";
246*724ba675SRob Herring};
247*724ba675SRob Herring
248*724ba675SRob Herring&nandcs {
249*724ba675SRob Herring	partitions {
250*724ba675SRob Herring		compatible = "fixed-partitions";
251*724ba675SRob Herring		#address-cells = <1>;
252*724ba675SRob Herring		#size-cells = <1>;
253*724ba675SRob Herring
254*724ba675SRob Herring		partition@0 {
255*724ba675SRob Herring			label = "boot";
256*724ba675SRob Herring			reg = <0x00000000 0x00080000>;
257*724ba675SRob Herring			read-only;
258*724ba675SRob Herring		};
259*724ba675SRob Herring
260*724ba675SRob Herring		partition@80000 {
261*724ba675SRob Herring			label = "nvram";
262*724ba675SRob Herring			reg = <0x00080000 0x00180000>;
263*724ba675SRob Herring		};
264*724ba675SRob Herring
265*724ba675SRob Herring		partition@200000 {
266*724ba675SRob Herring			label = "firmware";
267*724ba675SRob Herring			reg = <0x00200000 0x07e00000>;
268*724ba675SRob Herring			compatible = "brcm,trx";
269*724ba675SRob Herring		};
270*724ba675SRob Herring	};
271*724ba675SRob Herring};
272