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