bmips: add support for SmartRG SR505n
[openwrt/staging/981213.git] / target / linux / bmips / dts / bcm63168-smartrg-sr505n.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later
2
3 #include "bcm63268.dtsi"
4
5 / {
6 model = "SmartRG SR505n";
7 compatible = "smartrg,sr505n", "brcm,bcm63168", "brcm,bcm63268";
8
9 aliases {
10 led-boot = &led_power_green;
11 led-failsafe = &led_power_red;
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 reset {
21 label = "reset";
22 gpios = <&gpio 32 GPIO_ACTIVE_LOW>;
23 linux,code = <KEY_RESTART>;
24 debounce-interval = <60>;
25 };
26
27 wps {
28 label = "wps";
29 gpios = <&gpio 33 GPIO_ACTIVE_LOW>;
30 linux,code = <KEY_WPS_BUTTON>;
31 debounce-interval = <60>;
32 };
33
34 wlan {
35 label = "wlan";
36 gpios = <&gpio 34 GPIO_ACTIVE_LOW>;
37 linux,code = <KEY_WLAN>;
38 debounce-interval = <60>;
39 };
40 };
41 };
42
43 &ehci {
44 status = "okay";
45 };
46
47 &ethernet {
48 status = "okay";
49
50 nvmem-cells = <&macaddr_cfe_6a0>;
51 nvmem-cell-names = "mac-address";
52 };
53
54 &hsspi {
55 status = "okay";
56
57 flash@0 {
58 compatible = "jedec,spi-nor";
59 spi-max-frequency = <16666667>;
60 spi-tx-bus-width = <2>;
61 spi-rx-bus-width = <2>;
62 reg = <0>;
63
64 #address-cells = <1>;
65 #size-cells = <1>;
66
67 partitions {
68 compatible = "fixed-partitions";
69 #address-cells = <1>;
70 #size-cells = <1>;
71
72 partition@0 {
73 label = "cfe";
74 reg = <0x000000 0x010000>;
75 read-only;
76
77 nvmem-layout {
78 compatible = "fixed-layout";
79 #address-cells = <1>;
80 #size-cells = <1>;
81
82 macaddr_cfe_6a0: macaddr@6a0 {
83 reg = <0x6a0 0x6>;
84 };
85 };
86 };
87
88 partition@10000 {
89 compatible = "brcm,bcm963xx-imagetag";
90 label = "firmware";
91 reg = <0x010000 0xfd0000>;
92 };
93
94 partition@fe0000 {
95 label = "nvram";
96 reg = <0xfe0000 0x020000>;
97 };
98 };
99 };
100 };
101
102 &leds {
103 status = "okay";
104
105 pinctrl-names = "default";
106 pinctrl-0 = <&pinctrl_leds>;
107
108 wps_green@1 {
109 reg = <1>;
110 active-low;
111 function = LED_FUNCTION_WPS;
112 color = <LED_COLOR_ID_GREEN>;
113 };
114
115 inet_green@8 {
116 reg = <8>;
117 active-low;
118 label = "green:inet";
119 };
120
121 lan2_green@9 {
122 /* EPHY1 Act */
123 reg = <9>;
124 brcm,hardware-controlled;
125 };
126
127 lan3_green@10 {
128 /* EPHY2 Act */
129 reg = <10>;
130 brcm,hardware-controlled;
131 };
132
133 lan4_green@11 {
134 /* EPHY3 Act */
135 reg = <11>;
136 brcm,hardware-controlled;
137 };
138
139 lan1_green@12 {
140 /* GPHY0 Act */
141 reg = <12>;
142 brcm,hardware-controlled;
143 };
144
145 dsl_green@14 {
146 reg = <14>;
147 active-low;
148 label = "green:dsl";
149 };
150
151 inet_red@15 {
152 reg = <15>;
153 active-low;
154 label = "red:inet";
155 };
156
157 usb_green@16 {
158 reg = <16>;
159 active-low;
160 function = LED_FUNCTION_USB;
161 color = <LED_COLOR_ID_GREEN>;
162 };
163
164 led_power_green: power_green@20 {
165 reg = <20>;
166 active-low;
167 function = LED_FUNCTION_POWER;
168 color = <LED_COLOR_ID_GREEN>;
169 };
170
171 led_power_red: power_red@21 {
172 reg = <21>;
173 active-low;
174 function = LED_FUNCTION_POWER;
175 color = <LED_COLOR_ID_RED>;
176 panic-indicator;
177 };
178 };
179
180 &pinctrl {
181 pinctrl_leds: leds {
182 function = "led";
183 pins = "gpio1", "gpio8",
184 "gpio9", "gpio10",
185 "gpio11", "gpio12",
186 "gpio14", "gpio15",
187 "gpio16", "gpio20",
188 "gpio21";
189 };
190 };
191
192 &ohci {
193 status = "okay";
194 };
195
196 &switch0 {
197 ports {
198 port@0 {
199 reg = <0>;
200 label = "lan2";
201
202 phy-handle = <&phy1>;
203 phy-mode = "mii";
204 };
205
206 port@1 {
207 reg = <1>;
208 label = "lan3";
209
210 phy-handle = <&phy2>;
211 phy-mode = "mii";
212 };
213
214 port@2 {
215 reg = <2>;
216 label = "lan4";
217
218 phy-handle = <&phy3>;
219 phy-mode = "mii";
220 };
221
222 port@3 {
223 reg = <3>;
224 label = "lan1";
225
226 phy-handle = <&phy4>;
227 phy-mode = "gmii";
228 };
229 };
230 };
231
232 &uart0 {
233 status = "okay";
234 };
235
236 &usbh {
237 status = "okay";
238 };