f581095a81d5aceb10bf169c7a423426f707cce9
[openwrt/staging/jow.git] / target / linux / ramips / dts / mt7621_dlink_dir-3060-a1.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7 #include <dt-bindings/leds/common.h>
8
9 / {
10 compatible = "dlink,dir-3060-a1", "mediatek,mt7621-soc";
11 model = "D-Link DIR-3060 A1";
12
13 aliases {
14 label-mac-device = &gmac0;
15 led-boot = &led_power_orange;
16 led-failsafe = &led_power_white;
17 led-running = &led_power_white;
18 led-upgrade = &led_net_orange;
19 };
20
21 keys {
22 compatible = "gpio-keys";
23
24 reset {
25 label = "reset";
26 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
27 linux,code = <KEY_RESTART>;
28 };
29
30 wps {
31 label = "wps";
32 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
33 linux,code = <KEY_WPS_BUTTON>;
34 };
35 };
36
37 leds {
38 compatible = "gpio-leds";
39
40 led_power_orange: power_orange {
41 function = LED_FUNCTION_POWER;
42 color = <LED_COLOR_ID_ORANGE>;
43 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
44 };
45
46 led_power_white: power_white {
47 function = LED_FUNCTION_POWER;
48 color = <LED_COLOR_ID_WHITE>;
49 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
50 };
51
52 led_net_orange: net_orange {
53 label = "orange:net";
54 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
55 };
56
57 net_white {
58 label = "white:net";
59 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
60 };
61
62 usb2_white {
63 label = "white:usb2";
64 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
65 trigger-sources = <&ehci_port2>;
66 linux,default-trigger = "usbport";
67 };
68
69 usb3_white {
70 label = "white:usb3";
71 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
72 trigger-sources = <&xhci_ehci_port1>;
73 linux,default-trigger = "usbport";
74 };
75
76 wlan2g {
77 label = "white:wlan2g";
78 gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
79 linux,default-trigger = "phy0radio";
80 };
81
82 wlan5glb {
83 label = "white:wlan5glb";
84 gpios = <&gpio 9 GPIO_ACTIVE_HIGH>;
85 linux,default-trigger = "phy1radio";
86 };
87
88 wlan5ghb {
89 label = "white:wlan5ghb";
90 gpios = <&gpio 5 GPIO_ACTIVE_HIGH>;
91 linux,default-trigger = "phy2radio";
92 };
93 };
94 };
95
96 &nand {
97 status = "okay";
98
99 partitions {
100 compatible = "fixed-partitions";
101 #address-cells = <1>;
102 #size-cells = <1>;
103
104 partition@0 {
105 label = "Bootloader";
106 reg = <0x0 0x80000>;
107 read-only;
108 };
109
110 partition@80000 {
111 label = "config";
112 reg = <0x80000 0x80000>;
113 read-only;
114 };
115
116 partition@100000 {
117 label = "factory";
118 reg = <0x100000 0x40000>;
119 read-only;
120
121 nvmem-layout {
122 compatible = "fixed-layout";
123 #address-cells = <1>;
124 #size-cells = <1>;
125
126 eeprom_factory_0: eeprom@0 {
127 reg = <0x0 0x4da8>;
128 };
129
130 eeprom_factory_8000: eeprom@8000 {
131 reg = <0x8000 0x4da8>;
132 };
133
134 macaddr_factory_e000: macaddr@e000 {
135 compatible = "mac-base";
136 reg = <0xe000 0x6>;
137 #nvmem-cell-cells = <1>;
138 };
139
140 macaddr_factory_e006: macaddr@e006 {
141 reg = <0xe006 0x6>;
142 };
143 };
144 };
145
146 partition@140000 {
147 label = "config2";
148 reg = <0x140000 0x40000>;
149 read-only;
150 };
151
152 partition@180000 {
153 label = "firmware";
154 compatible = "openwrt,uimage", "denx,uimage";
155 openwrt,padding = <96>;
156 reg = <0x180000 0x2800000>;
157 };
158
159 partition@2980000 {
160 label = "private";
161 reg = <0x2980000 0x2000000>;
162 read-only;
163 };
164
165 partition@4980000 {
166 label = "firmware2";
167 reg = <0x4980000 0x2800000>;
168 read-only;
169 };
170
171 partition@7180000 {
172 label = "mydlink";
173 reg = <0x7180000 0x600000>;
174 read-only;
175 };
176
177 partition@7780000 {
178 label = "reserved";
179 reg = <0x7780000 0x880000>;
180 read-only;
181 };
182 };
183 };
184
185 &pcie {
186 status = "okay";
187 };
188
189 &pcie0 {
190 wifi0: wifi@0,0 {
191 compatible = "mediatek,mt76";
192 reg = <0x0000 0 0 0 0>;
193 ieee80211-freq-limit = <2400000 6000000>;
194 nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_e000 1>;
195 nvmem-cell-names = "eeprom", "mac-address";
196 };
197 };
198
199 &pcie1 {
200 wifi1: wifi@0,0 {
201 compatible = "mediatek,mt76";
202 reg = <0x0000 0 0 0 0>;
203 ieee80211-freq-limit = <5000000 6000000>;
204 nvmem-cells = <&eeprom_factory_8000>, <&macaddr_factory_e000 3>;
205 nvmem-cell-names = "eeprom", "mac-address";
206 };
207 };
208
209 &gmac0 {
210 nvmem-cells = <&macaddr_factory_e000 0>;
211 nvmem-cell-names = "mac-address";
212 };
213
214 &switch0 {
215 ports {
216 port@0 {
217 status = "okay";
218 label = "lan4";
219 };
220
221 port@1 {
222 status = "okay";
223 label = "lan3";
224 };
225
226 port@2 {
227 status = "okay";
228 label = "lan2";
229 };
230
231 port@3 {
232 status = "okay";
233 label = "lan1";
234 };
235
236 port@4 {
237 status = "okay";
238 label = "wan";
239 nvmem-cells = <&macaddr_factory_e006>;
240 nvmem-cell-names = "mac-address";
241 };
242 };
243 };
244
245 &state_default {
246 gpio {
247 groups = "i2c", "uart3", "jtag", "wdt";
248 function = "gpio";
249 };
250 };