tools/padjffs2: use Host/Prepare/Default instead of raw commands
[openwrt/staging/stintel.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: led-0 {
41 function = LED_FUNCTION_POWER;
42 color = <LED_COLOR_ID_ORANGE>;
43 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
44 };
45
46 led_power_white: led-1 {
47 function = LED_FUNCTION_POWER;
48 color = <LED_COLOR_ID_WHITE>;
49 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
50 };
51
52 led_net_orange: led-2 {
53 function = LED_FUNCTION_WAN;
54 color = <LED_COLOR_ID_ORANGE>;
55 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
56 };
57
58 led-3 {
59 function = LED_FUNCTION_WAN;
60 color = <LED_COLOR_ID_WHITE>;
61 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
62 };
63
64 led-4 {
65 function = LED_FUNCTION_USB;
66 color = <LED_COLOR_ID_WHITE>;
67 function-enumerator = <2>;
68 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
69 trigger-sources = <&ehci_port2>;
70 linux,default-trigger = "usbport";
71 };
72
73 led-5 {
74 function = LED_FUNCTION_USB;
75 color = <LED_COLOR_ID_WHITE>;
76 function-enumerator = <3>;
77 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
78 trigger-sources = <&xhci_ehci_port1>;
79 linux,default-trigger = "usbport";
80 };
81
82 led-6 {
83 function = LED_FUNCTION_WLAN_2GHZ;
84 color = <LED_COLOR_ID_WHITE>;
85 gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
86 linux,default-trigger = "phy0radio";
87 };
88
89 led-7 {
90 function = LED_FUNCTION_WLAN_5GHZ;
91 color = <LED_COLOR_ID_WHITE>;
92 function-enumerator = <0>;
93 gpios = <&gpio 9 GPIO_ACTIVE_HIGH>;
94 linux,default-trigger = "phy1radio";
95 };
96
97 led-8 {
98 function = LED_FUNCTION_WLAN_5GHZ;
99 color = <LED_COLOR_ID_WHITE>;
100 function-enumerator = <1>;
101 gpios = <&gpio 5 GPIO_ACTIVE_HIGH>;
102 linux,default-trigger = "phy2radio";
103 };
104 };
105 };
106
107 &nand {
108 status = "okay";
109
110 partitions {
111 compatible = "fixed-partitions";
112 #address-cells = <1>;
113 #size-cells = <1>;
114
115 partition@0 {
116 label = "Bootloader";
117 reg = <0x0 0x80000>;
118 read-only;
119 };
120
121 partition@80000 {
122 label = "config";
123 reg = <0x80000 0x80000>;
124 read-only;
125 };
126
127 partition@100000 {
128 label = "factory";
129 reg = <0x100000 0x40000>;
130 read-only;
131
132 nvmem-layout {
133 compatible = "fixed-layout";
134 #address-cells = <1>;
135 #size-cells = <1>;
136
137 eeprom_factory_0: eeprom@0 {
138 reg = <0x0 0x4da8>;
139 };
140
141 eeprom_factory_8000: eeprom@8000 {
142 reg = <0x8000 0x4da8>;
143 };
144
145 macaddr_factory_e000: macaddr@e000 {
146 compatible = "mac-base";
147 reg = <0xe000 0x6>;
148 #nvmem-cell-cells = <1>;
149 };
150
151 macaddr_factory_e006: macaddr@e006 {
152 reg = <0xe006 0x6>;
153 };
154 };
155 };
156
157 partition@140000 {
158 label = "config2";
159 reg = <0x140000 0x40000>;
160 read-only;
161 };
162
163 partition@180000 {
164 label = "firmware";
165 compatible = "openwrt,uimage", "denx,uimage";
166 openwrt,padding = <96>;
167 reg = <0x180000 0x2800000>;
168 };
169
170 partition@2980000 {
171 label = "private";
172 reg = <0x2980000 0x2000000>;
173 read-only;
174 };
175
176 partition@4980000 {
177 label = "firmware2";
178 reg = <0x4980000 0x2800000>;
179 read-only;
180 };
181
182 partition@7180000 {
183 label = "mydlink";
184 reg = <0x7180000 0x600000>;
185 read-only;
186 };
187
188 partition@7780000 {
189 label = "reserved";
190 reg = <0x7780000 0x880000>;
191 read-only;
192 };
193 };
194 };
195
196 &pcie {
197 status = "okay";
198 };
199
200 &pcie0 {
201 wifi0: wifi@0,0 {
202 compatible = "mediatek,mt76";
203 reg = <0x0000 0 0 0 0>;
204 ieee80211-freq-limit = <2400000 6000000>;
205 nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_e000 1>;
206 nvmem-cell-names = "eeprom", "mac-address";
207 };
208 };
209
210 &pcie1 {
211 wifi1: wifi@0,0 {
212 compatible = "mediatek,mt76";
213 reg = <0x0000 0 0 0 0>;
214 ieee80211-freq-limit = <5000000 6000000>;
215 nvmem-cells = <&eeprom_factory_8000>, <&macaddr_factory_e000 3>;
216 nvmem-cell-names = "eeprom", "mac-address";
217 };
218 };
219
220 &gmac0 {
221 nvmem-cells = <&macaddr_factory_e000 0>;
222 nvmem-cell-names = "mac-address";
223 };
224
225 &switch0 {
226 ports {
227 port@0 {
228 status = "okay";
229 label = "lan4";
230 };
231
232 port@1 {
233 status = "okay";
234 label = "lan3";
235 };
236
237 port@2 {
238 status = "okay";
239 label = "lan2";
240 };
241
242 port@3 {
243 status = "okay";
244 label = "lan1";
245 };
246
247 port@4 {
248 status = "okay";
249 label = "wan";
250 nvmem-cells = <&macaddr_factory_e006>;
251 nvmem-cell-names = "mac-address";
252 };
253 };
254 };
255
256 &state_default {
257 gpio {
258 groups = "i2c", "uart3", "jtag", "wdt";
259 function = "gpio";
260 };
261 };