GNU Linux-libre 4.19.264-gnu1
[releases.git] / arch / arm / boot / dts / bcm47094-linksys-panamera.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /*
3  * Copyright (C) 2017 Rafał Miłecki <rafal@milecki.pl>
4  */
5
6 /dts-v1/;
7
8 #include "bcm47094.dtsi"
9 #include "bcm5301x-nand-cs0-bch8.dtsi"
10
11 / {
12         compatible = "linksys,panamera", "brcm,bcm47094", "brcm,bcm4708";
13         model = "Linksys EA9500";
14
15         chosen {
16                 bootargs = "console=ttyS0,115200";
17         };
18
19         memory {
20                 reg = <0x00000000 0x08000000
21                        0x88000000 0x08000000>;
22         };
23
24         gpio-keys {
25                 compatible = "gpio-keys";
26                 #address-cells = <1>;
27                 #size-cells = <0>;
28
29                 wps {
30                         label = "WPS";
31                         linux,code = <KEY_WPS_BUTTON>;
32                         gpios = <&chipcommon 3 GPIO_ACTIVE_LOW>;
33                 };
34
35                 rfkill {
36                                 label = "WiFi";
37                                 linux,code = <KEY_RFKILL>;
38                                 gpios = <&chipcommon 16 GPIO_ACTIVE_LOW>;
39                 };
40
41                 reset {
42                                 label = "Reset";
43                                 linux,code = <KEY_RESTART>;
44                                 gpios = <&chipcommon 17 GPIO_ACTIVE_LOW>;
45                 };
46         };
47
48         leds {
49                 compatible = "gpio-leds";
50
51                 wps {
52                         label = "bcm53xx:white:wps";
53                         gpios = <&chipcommon 22 GPIO_ACTIVE_LOW>;
54                 };
55
56                 usb2 {
57                         label = "bcm53xx:green:usb2";
58                         gpios = <&chipcommon 1 GPIO_ACTIVE_LOW>;
59                         trigger-sources = <&ohci_port2>, <&ehci_port2>;
60                         linux,default-trigger = "usbport";
61                 };
62
63                 usb3 {
64                         label = "bcm53xx:green:usb3";
65                         gpios = <&chipcommon 2 GPIO_ACTIVE_LOW>;
66                         trigger-sources = <&ohci_port1>, <&ehci_port1>,
67                                           <&xhci_port1>;
68                         linux,default-trigger = "usbport";
69                 };
70
71                 power {
72                         label = "bcm53xx:white:power";
73                         gpios = <&chipcommon 4 GPIO_ACTIVE_HIGH>;
74                 };
75
76                 wifi-disabled {
77                         label = "bcm53xx:amber:wifi-disabled";
78                         gpios = <&chipcommon 0 GPIO_ACTIVE_LOW>;
79                 };
80
81                 wifi-enabled {
82                         label = "bcm53xx:white:wifi-enabled";
83                         gpios = <&chipcommon 5 GPIO_ACTIVE_HIGH>;
84                 };
85
86                 bluebar1 {
87                         label = "bcm53xx:white:bluebar1";
88                         gpios = <&chipcommon 11 GPIO_ACTIVE_HIGH>;
89                 };
90
91                 bluebar2 {
92                         label = "bcm53xx:white:bluebar2";
93                         gpios = <&chipcommon 12 GPIO_ACTIVE_HIGH>;
94                 };
95
96                 bluebar3 {
97                         label = "bcm53xx:white:bluebar3";
98                         gpios = <&chipcommon 15 GPIO_ACTIVE_LOW>;
99                 };
100
101                 bluebar4 {
102                         label = "bcm53xx:white:bluebar4";
103                         gpios = <&chipcommon 18 GPIO_ACTIVE_HIGH>;
104                 };
105
106                 bluebar5 {
107                         label = "bcm53xx:white:bluebar5";
108                         gpios = <&chipcommon 19 GPIO_ACTIVE_HIGH>;
109                 };
110
111                 bluebar6 {
112                         label = "bcm53xx:white:bluebar6";
113                         gpios = <&chipcommon 20 GPIO_ACTIVE_HIGH>;
114                 };
115
116                 bluebar7 {
117                         label = "bcm53xx:white:bluebar7";
118                         gpios = <&chipcommon 21 GPIO_ACTIVE_HIGH>;
119                 };
120
121                 bluebar8 {
122                         label = "bcm53xx:white:bluebar8";
123                         gpios = <&chipcommon 8 GPIO_ACTIVE_HIGH>;
124                 };
125         };
126
127         mdio-bus-mux {
128                 #address-cells = <1>;
129                 #size-cells = <0>;
130
131                 /* BIT(9) = 1 => external mdio */
132                 mdio_ext: mdio@200 {
133                         reg = <0x200>;
134                         #address-cells = <1>;
135                         #size-cells = <0>;
136                 };
137         };
138
139         mdio-mii-mux {
140                 compatible = "mdio-mux-mmioreg";
141                 mdio-parent-bus = <&mdio_ext>;
142                 #address-cells = <1>;
143                 #size-cells = <0>;
144                 reg = <0x1800c1c0 0x4>;
145
146                 /* BIT(6) = mdc, BIT(7) = mdio */
147                 mux-mask = <0xc0>;
148
149                 mdio-mii@0 {
150                         /* Enable MII function */
151                         reg = <0x0>;
152                         #address-cells = <1>;
153                         #size-cells = <0>;
154
155                         switch@0  {
156                                 compatible = "brcm,bcm53125";
157                                 #address-cells = <1>;
158                                 #size-cells = <0>;
159                                 reset-gpios = <&chipcommon 10 GPIO_ACTIVE_LOW>;
160                                 reset-names = "robo_reset";
161                                 reg = <0>;
162                                 dsa,member = <1 0>;
163
164                                 ports {
165                                         #address-cells = <1>;
166                                         #size-cells = <0>;
167
168                                         port@0 {
169                                                 reg = <0>;
170                                                 label = "lan1";
171                                         };
172
173                                         port@1 {
174                                                 reg = <1>;
175                                                 label = "lan5";
176                                         };
177
178                                         port@2 {
179                                                 reg = <2>;
180                                                 label = "lan2";
181                                         };
182
183                                         port@3 {
184                                                 reg = <3>;
185                                                 label = "lan6";
186                                         };
187
188                                         port@4 {
189                                                 reg = <4>;
190                                                 label = "lan3";
191                                         };
192
193                                         sw1_p8: port@8 {
194                                                 reg = <8>;
195                                                 ethernet = <&sw0_p0>;
196                                                 label = "cpu";
197
198                                                 fixed-link {
199                                                         speed = <1000>;
200                                                         full-duplex;
201                                                 };
202                                         };
203                                 };
204                         };
205                 };
206         };
207 };
208
209 &usb2 {
210         vcc-gpio = <&chipcommon 13 GPIO_ACTIVE_HIGH>;
211 };
212
213 &usb3 {
214         vcc-gpio = <&chipcommon 14 GPIO_ACTIVE_HIGH>;
215 };
216
217 &srab {
218         compatible = "brcm,bcm53012-srab", "brcm,bcm5301x-srab";
219         status = "okay";
220         dsa,member = <0 0>;
221
222         ports {
223                 #address-cells = <1>;
224                 #size-cells = <0>;
225
226                 port@1 {
227                         reg = <1>;
228                         label = "lan7";
229                 };
230
231                 port@2 {
232                         reg = <2>;
233                         label = "lan4";
234                 };
235
236                 port@3 {
237                         reg = <3>;
238                         label = "lan8";
239                 };
240
241                 port@4 {
242                         reg = <4>;
243                         label = "wan";
244                 };
245
246                 port@8 {
247                         reg = <8>;
248                         ethernet = <&gmac2>;
249                         label = "cpu";
250
251                         fixed-link {
252                                 speed = <1000>;
253                                 full-duplex;
254                         };
255                 };
256
257                 sw0_p0: port@0 {
258                         reg = <0>;
259                         label = "extsw";
260
261                         fixed-link {
262                                 speed = <1000>;
263                                 full-duplex;
264                         };
265                 };
266         };
267 };
268
269 &usb3_phy {
270         status = "okay";
271 };