e322e4efdbb3878759c4373b90170b827b267e47
[openwrt/staging/stintel.git] / target / linux / ramips / dts / mt7621_iodata_wnpr2600g.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 = "iodata,wnpr2600g", "mediatek,mt7621-soc";
11 model = "I-O DATA WNPR2600G";
12
13 aliases {
14 led-boot = &led_power;
15 led-failsafe = &led_power;
16 led-running = &led_power;
17 led-upgrade = &led_power;
18 };
19
20 leds {
21 compatible = "gpio-leds";
22
23 led_power: power {
24 function = LED_FUNCTION_POWER;
25 color = <LED_COLOR_ID_GREEN>;
26 gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
27 default-state = "on";
28 };
29
30 notification {
31 label = "green:notification";
32 gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
33 };
34
35 wlan2g {
36 label = "green:wlan2g";
37 gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
38 linux,default-trigger = "phy0radio";
39 };
40
41 wlan5g {
42 label = "green:wlan5g";
43 gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
44 linux,default-trigger = "phy1radio";
45 };
46 };
47
48 keys {
49 compatible = "gpio-keys";
50
51 auto {
52 label = "auto";
53 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
54 linux,code = <BTN_0>;
55 linux,input-type = <EV_SW>;
56 };
57
58 reset {
59 label = "reset";
60 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
61 linux,code = <KEY_RESTART>;
62 };
63
64 wps {
65 label = "wps";
66 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
67 linux,code = <KEY_WPS_BUTTON>;
68 };
69 };
70 };
71
72 &spi0 {
73 status = "okay";
74
75 flash@0 {
76 compatible = "jedec,spi-nor";
77 reg = <0>;
78 spi-max-frequency = <40000000>;
79
80 partitions {
81 compatible = "fixed-partitions";
82 #address-cells = <1>;
83 #size-cells = <1>;
84
85 partition@0 {
86 label = "u-boot";
87 reg = <0x000000 0x030000>;
88 read-only;
89 };
90
91 partition@30000 {
92 label = "u-boot-env";
93 reg = <0x030000 0x010000>;
94 read-only;
95 };
96
97 partition@40000 {
98 label = "factory";
99 reg = <0x040000 0x010000>;
100 read-only;
101
102 nvmem-layout {
103 compatible = "fixed-layout";
104 #address-cells = <1>;
105 #size-cells = <1>;
106
107 eeprom_factory_0: eeprom@0 {
108 reg = <0x0 0x4da8>;
109 };
110
111 eeprom_factory_8000: eeprom@8000 {
112 reg = <0x8000 0x4da8>;
113 };
114
115 macaddr_factory_4: macaddr@4 {
116 reg = <0x4 0x6>;
117 };
118 };
119 };
120
121 partition@50000 {
122 compatible = "denx,uimage";
123 label = "firmware";
124 reg = <0x050000 0xda0000>;
125 };
126
127 partition@df0000 {
128 label = "manufacture";
129 reg = <0xdf0000 0x190000>;
130 read-only;
131 };
132
133 partition@f80000 {
134 label = "storage";
135 reg = <0xf80000 0x080000>;
136 read-only;
137 };
138 };
139 };
140 };
141
142 &gmac0 {
143 nvmem-cells = <&macaddr_factory_4>;
144 nvmem-cell-names = "mac-address";
145 };
146
147 &gmac1 {
148 status = "okay";
149 label = "wan";
150 phy-handle = <&ethphy0>;
151
152 nvmem-cells = <&macaddr_factory_4>;
153 nvmem-cell-names = "mac-address";
154 };
155
156 &ethphy0 {
157 /delete-property/ interrupts;
158 };
159
160 &switch0 {
161 ports {
162 port@1 {
163 status = "okay";
164 label = "lan4";
165 };
166
167 port@2 {
168 status = "okay";
169 label = "lan3";
170 };
171
172 port@3 {
173 status = "okay";
174 label = "lan2";
175 };
176
177 port@4 {
178 status = "okay";
179 label = "lan1";
180 };
181 };
182 };
183
184 &state_default {
185 gpio {
186 groups = "uart2", "uart3", "jtag", "wdt";
187 function = "gpio";
188 };
189 };
190
191 &pcie {
192 status = "okay";
193 };
194
195 &pcie0 {
196 wifi@0,0 {
197 compatible = "mediatek,mt76";
198 reg = <0x0000 0 0 0 0>;
199 nvmem-cells = <&eeprom_factory_0>;
200 nvmem-cell-names = "eeprom";
201 ieee80211-freq-limit = <2400000 2500000>;
202 };
203 };
204
205 &pcie1 {
206 wifi@0,0 {
207 compatible = "mediatek,mt76";
208 reg = <0x0000 0 0 0 0>;
209 nvmem-cells = <&eeprom_factory_8000>;
210 nvmem-cell-names = "eeprom";
211 ieee80211-freq-limit = <5000000 6000000>;
212 };
213 };
214
215 &xhci {
216 status = "disabled";
217 };