xref: /freebsd/sys/contrib/device-tree/src/arm64/broadcom/bcmbca/bcm4908-asus-gt-ac5300.dts (revision 257e70f1d5ee61037c8c59b116538d3b6b1427a2)
1// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3#include <dt-bindings/gpio/gpio.h>
4#include <dt-bindings/input/input.h>
5#include <dt-bindings/leds/common.h>
6
7#include "bcm4908.dtsi"
8
9/ {
10	compatible = "asus,gt-ac5300", "brcm,bcm4908", "brcm,bcmbca";
11	model = "Asus GT-AC5300";
12
13	memory@0 {
14		device_type = "memory";
15		reg = <0x00 0x00 0x00 0x40000000>;
16	};
17
18	gpio-keys-polled {
19		compatible = "gpio-keys-polled";
20		poll-interval = <100>;
21
22		key-wifi {
23			label = "WiFi";
24			linux,code = <KEY_RFKILL>;
25			gpios = <&gpio0 28 GPIO_ACTIVE_LOW>;
26		};
27
28		key-wps {
29			label = "WPS";
30			linux,code = <KEY_WPS_BUTTON>;
31			gpios = <&gpio0 29 GPIO_ACTIVE_LOW>;
32		};
33
34		key-restart {
35			label = "Reset";
36			linux,code = <KEY_RESTART>;
37			gpios = <&gpio0 30 GPIO_ACTIVE_LOW>;
38		};
39
40		key-brightness {
41			label = "LEDs";
42			linux,code = <KEY_BRIGHTNESS_ZERO>;
43			gpios = <&gpio0 31 GPIO_ACTIVE_LOW>;
44		};
45	};
46};
47
48&enet {
49	nvmem-cells = <&base_mac_addr>;
50	nvmem-cell-names = "mac-address";
51};
52
53&usb_phy {
54	brcm,ioc = <1>;
55	status = "okay";
56};
57
58&ehci {
59	status = "okay";
60};
61
62&ohci {
63	status = "okay";
64};
65
66&xhci {
67	status = "okay";
68};
69
70&ports {
71	port@0 {
72		label = "lan2";
73	};
74
75	port@1 {
76		label = "lan1";
77	};
78
79	port@2 {
80		label = "lan6";
81	};
82
83	port@3 {
84		label = "lan5";
85	};
86
87	/* External BCM53134S switch */
88	port@7 {
89		label = "sw";
90		reg = <7>;
91		phy-mode = "rgmii";
92
93		fixed-link {
94			speed = <1000>;
95			full-duplex;
96		};
97	};
98};
99
100&mdio {
101	/* lan8 */
102	ethernet-phy@0 {
103		reg = <0>;
104	};
105
106	/* lan7 */
107	ethernet-phy@1 {
108		reg = <1>;
109	};
110
111	/* lan4 */
112	ethernet-phy@2 {
113		reg = <2>;
114	};
115
116	/* lan3 */
117	ethernet-phy@3 {
118		reg = <3>;
119	};
120};
121
122&leds {
123	led@11 {
124		reg = <0x11>;
125		function = LED_FUNCTION_POWER;
126		color = <LED_COLOR_ID_WHITE>;
127		default-state = "on";
128		active-low;
129		pinctrl-names = "default";
130		pinctrl-0 = <&pins_led_17_a>;
131	};
132
133	led@12 {
134		reg = <0x12>;
135		function = LED_FUNCTION_WAN;
136		color = <LED_COLOR_ID_RED>;
137		active-low;
138		pinctrl-names = "default";
139		pinctrl-0 = <&pins_led_18_a>;
140	};
141
142	led@14 {
143		reg = <0x14>;
144		function = LED_FUNCTION_WPS;
145		color = <LED_COLOR_ID_WHITE>;
146		active-low;
147		pinctrl-names = "default";
148		pinctrl-0 = <&pins_led_20_a>;
149	};
150
151	led@15 {
152		reg = <0x15>;
153		function = LED_FUNCTION_WAN;
154		color = <LED_COLOR_ID_WHITE>;
155		active-low;
156		pinctrl-names = "default";
157		pinctrl-0 = <&pins_led_21_a>;
158	};
159
160	led@19 {
161		reg = <0x19>;
162		function = LED_FUNCTION_LAN;
163		color = <LED_COLOR_ID_WHITE>;
164		pinctrl-names = "default";
165		pinctrl-0 = <&pins_led_25_a>;
166	};
167};
168
169&nandcs {
170	nand-ecc-strength = <4>;
171	nand-ecc-step-size = <512>;
172	nand-on-flash-bbt;
173	brcm,nand-has-wp;
174
175	#address-cells = <1>;
176	#size-cells = <0>;
177
178	partitions {
179		compatible = "brcm,bcm4908-partitions";
180		#address-cells = <1>;
181		#size-cells = <1>;
182
183		partition@0 {
184			compatible = "nvmem-cells";
185			label = "cferom";
186			reg = <0x0 0x100000>;
187
188			#address-cells = <1>;
189			#size-cells = <1>;
190			ranges = <0 0x0 0x100000>;
191
192			base_mac_addr: mac@106a0 {
193				reg = <0x106a0 0x6>;
194			};
195		};
196
197		partition@100000 {
198			compatible = "brcm,bcm4908-firmware";
199			reg = <0x100000 0x5700000>;
200		};
201
202		partition@5800000 {
203			compatible = "brcm,bcm4908-firmware";
204			reg = <0x5800000 0x5700000>;
205		};
206	};
207};
208