b08939a451d012ed8ec39ceade8b110b0ea0328b
[openwrt/staging/hauke.git] / target / linux / ramips / dts / mt7621_iodata_wn-ax1167gr.dts
1 #include "mt7621.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "iodata,wn-ax1167gr", "mediatek,mt7621-soc";
8 model = "I-O DATA WN-AX1167GR";
9
10 aliases {
11 led-boot = &led_power;
12 led-failsafe = &led_power;
13 led-running = &led_power;
14 led-upgrade = &led_power;
15 };
16
17 chosen {
18 bootargs = "console=ttyS0,115200";
19 };
20
21 leds {
22 compatible = "gpio-leds";
23
24 led_power: power {
25 label = "green:power";
26 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
27 };
28
29 wps {
30 label = "green:wps";
31 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
32 };
33 };
34
35 keys {
36 compatible = "gpio-keys";
37
38 reset {
39 label = "reset";
40 gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
41 linux,code = <KEY_RESTART>;
42 };
43
44 wps {
45 label = "wps";
46 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
47 linux,code = <KEY_WPS_BUTTON>;
48 };
49
50 auto {
51 label = "auto";
52 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
53 linux,code = <BTN_0>;
54 linux,input-type = <EV_SW>;
55 };
56
57 custom {
58 label = "custom";
59 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
60 linux,code = <BTN_0>;
61 linux,input-type = <EV_SW>;
62 };
63 };
64 };
65
66 &spi0 {
67 status = "okay";
68
69 flash@0 {
70 compatible = "jedec,spi-nor";
71 reg = <0>;
72 spi-max-frequency = <10000000>;
73
74 partitions {
75 compatible = "fixed-partitions";
76 #address-cells = <1>;
77 #size-cells = <1>;
78
79 partition@0 {
80 label = "Bootloader";
81 reg = <0x0 0x30000>;
82 read-only;
83 };
84
85 partition@30000 {
86 label = "Config";
87 reg = <0x30000 0x10000>;
88 read-only;
89 };
90
91 factory: partition@40000 {
92 compatible = "nvmem-cells";
93 label = "factory";
94 reg = <0x40000 0x10000>;
95 #address-cells = <1>;
96 #size-cells = <1>;
97 read-only;
98
99 eeprom_factory_0: eeprom@0 {
100 reg = <0x0 0x200>;
101 };
102
103 macaddr_factory_4: macaddr@4 {
104 reg = <0x4 0x6>;
105 };
106 };
107
108 iNIC_rf: partition@50000 {
109 compatible = "nvmem-cells";
110 label = "iNIC_rf";
111 reg = <0x50000 0x10000>;
112 #address-cells = <1>;
113 #size-cells = <1>;
114 read-only;
115
116 eeprom_iNIC_rf_0: eeprom@0 {
117 reg = <0x0 0x400>;
118 };
119
120 macaddr_iNIC_rf_4: macaddr@4 {
121 reg = <0x4 0x6>;
122 };
123 };
124
125 partition@60000 {
126 compatible = "denx,uimage";
127 label = "firmware";
128 reg = <0x60000 0xf30000>;
129 };
130
131 partition@f90000 {
132 label = "Key";
133 reg = <0xf90000 0x10000>;
134 read-only;
135 };
136
137 partition@fa0000 {
138 label = "backup";
139 reg = <0xfa0000 0x10000>;
140 read-only;
141 };
142
143 partition@fb0000 {
144 label = "storage";
145 reg = <0xfb0000 0x50000>;
146 read-only;
147 };
148 };
149 };
150 };
151
152 &gmac0 {
153 nvmem-cells = <&macaddr_iNIC_rf_4>;
154 nvmem-cell-names = "mac-address";
155 };
156
157 &gmac1 {
158 status = "okay";
159 label = "wan";
160 phy-handle = <&ethphy0>;
161
162 nvmem-cells = <&macaddr_factory_4>;
163 nvmem-cell-names = "mac-address";
164 mac-address-increment = <1>;
165 };
166
167 &mdio {
168 ethphy0: ethernet-phy@0 {
169 reg = <0>;
170 };
171 };
172
173 &switch0 {
174 ports {
175 port@1 {
176 status = "okay";
177 label = "lan4";
178 };
179
180 port@2 {
181 status = "okay";
182 label = "lan3";
183 };
184
185 port@3 {
186 status = "okay";
187 label = "lan2";
188 };
189
190 port@4 {
191 status = "okay";
192 label = "lan1";
193 };
194 };
195 };
196
197 &state_default {
198 gpio {
199 groups = "uart2", "uart3", "jtag";
200 function = "gpio";
201 };
202 };
203
204 &pcie {
205 status = "okay";
206 };
207
208 &pcie0 {
209 mt76@0,0 {
210 reg = <0x0000 0 0 0 0>;
211 nvmem-cells = <&eeprom_iNIC_rf_0>;
212 nvmem-cell-names = "eeprom";
213 };
214 };
215
216 &pcie1 {
217 mt76@0,0 {
218 reg = <0x0000 0 0 0 0>;
219 nvmem-cells = <&eeprom_factory_0>;
220 nvmem-cell-names = "eeprom";
221 ieee80211-freq-limit = <5000000 6000000>;
222 };
223 };
224
225 &xhci {
226 status = "disabled";
227 };