5af9ea28ea496d36615d821636c077926df8f53a
[openwrt/staging/hauke.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 compatible = "nvmem-cells";
115 label = "factory";
116 reg = <0x100000 0x40000>;
117 #address-cells = <1>;
118 #size-cells = <1>;
119 read-only;
120
121 eeprom_factory_0: eeprom@0 {
122 reg = <0x0 0x4da8>;
123 };
124
125 eeprom_factory_8000: eeprom@8000 {
126 reg = <0x8000 0x4da8>;
127 };
128
129 macaddr_factory_e000: macaddr@e000 {
130 reg = <0xe000 0x6>;
131 };
132
133 macaddr_factory_e006: macaddr@e006 {
134 reg = <0xe006 0x6>;
135 };
136 };
137
138 partition@140000 {
139 label = "config2";
140 reg = <0x140000 0x40000>;
141 read-only;
142 };
143
144 partition@180000 {
145 label = "firmware";
146 compatible = "openwrt,uimage", "denx,uimage";
147 openwrt,padding = <96>;
148 reg = <0x180000 0x2800000>;
149 };
150
151 partition@2980000 {
152 label = "private";
153 reg = <0x2980000 0x2000000>;
154 read-only;
155 };
156
157 partition@4980000 {
158 label = "firmware2";
159 reg = <0x4980000 0x2800000>;
160 read-only;
161 };
162
163 partition@7180000 {
164 label = "mydlink";
165 reg = <0x7180000 0x600000>;
166 read-only;
167 };
168
169 partition@7780000 {
170 label = "reserved";
171 reg = <0x7780000 0x880000>;
172 read-only;
173 };
174 };
175 };
176
177 &pcie {
178 status = "okay";
179 };
180
181 &pcie0 {
182 wifi0: wifi@0,0 {
183 compatible = "mediatek,mt76";
184 reg = <0x0000 0 0 0 0>;
185 ieee80211-freq-limit = <2400000 6000000>;
186 nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_e000>;
187 nvmem-cell-names = "eeprom", "mac-address";
188 mac-address-increment = <1>;
189 };
190 };
191
192 &pcie1 {
193 wifi1: wifi@0,0 {
194 compatible = "mediatek,mt76";
195 reg = <0x0000 0 0 0 0>;
196 ieee80211-freq-limit = <5000000 6000000>;
197 nvmem-cells = <&eeprom_factory_8000>, <&macaddr_factory_e000>;
198 nvmem-cell-names = "eeprom", "mac-address";
199 mac-address-increment = <3>;
200 };
201 };
202
203 &gmac0 {
204 nvmem-cells = <&macaddr_factory_e000>;
205 nvmem-cell-names = "mac-address";
206 };
207
208 &switch0 {
209 ports {
210 port@0 {
211 status = "okay";
212 label = "lan4";
213 };
214
215 port@1 {
216 status = "okay";
217 label = "lan3";
218 };
219
220 port@2 {
221 status = "okay";
222 label = "lan2";
223 };
224
225 port@3 {
226 status = "okay";
227 label = "lan1";
228 };
229
230 port@4 {
231 status = "okay";
232 label = "wan";
233 nvmem-cells = <&macaddr_factory_e006>;
234 nvmem-cell-names = "mac-address";
235 };
236 };
237 };
238
239 &state_default {
240 gpio {
241 groups = "i2c", "uart3", "jtag", "wdt";
242 function = "gpio";
243 };
244 };