6f95bd015149f46af4be45122cd2da0df22e18b2
[openwrt/staging/hauke.git] / target / linux / ramips / dts / mt7620a_iodata_wn-ac1167gr.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "mt7620a.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "iodata,wn-ac1167gr", "ralink,mt7620a-soc";
10 model = "I-O DATA WN-AC1167GR";
11
12 aliases {
13 led-boot = &led_power;
14 led-failsafe = &led_power;
15 led-running = &led_power;
16 led-upgrade = &led_power;
17 };
18
19 leds {
20 compatible = "gpio-leds";
21
22 led_power: power {
23 label = "green:power";
24 gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
25 default-state = "on";
26 };
27
28 wlan2g {
29 label = "green:wlan2g";
30 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
31 };
32
33 notification {
34 label = "green:notification";
35 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
36 };
37
38 wlan5g {
39 label = "green:wlan5g";
40 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
41 };
42 };
43
44 keys {
45 compatible = "gpio-keys";
46
47 wps {
48 label = "wps";
49 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
50 linux,code = <KEY_WPS_BUTTON>;
51 };
52
53 reset {
54 label = "reset";
55 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
56 linux,code = <KEY_RESTART>;
57 };
58
59 auto {
60 label = "auto";
61 gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
62 linux,code = <BTN_0>;
63 linux,input-type = <EV_SW>;
64 };
65 };
66 };
67
68 &spi0 {
69 status = "okay";
70
71 flash@0 {
72 compatible = "jedec,spi-nor";
73 reg = <0>;
74 spi-max-frequency = <10000000>;
75
76 partitions {
77 compatible = "fixed-partitions";
78 #address-cells = <1>;
79 #size-cells = <1>;
80
81 partition@0 {
82 label = "u-boot";
83 reg = <0x0 0x30000>;
84 read-only;
85 };
86
87 partition@30000 {
88 label = "u-boot-env";
89 reg = <0x30000 0x10000>;
90 read-only;
91 };
92
93 factory: partition@40000 {
94 label = "factory";
95 reg = <0x40000 0x8000>;
96 read-only;
97
98 nvmem-layout {
99 compatible = "fixed-layout";
100 #address-cells = <1>;
101 #size-cells = <1>;
102
103 eeprom_factory_0: eeprom@0 {
104 reg = <0x0 0x200>;
105 };
106
107 macaddr_factory_4: macaddr@4 {
108 reg = <0x4 0x6>;
109 };
110 };
111 };
112
113 iNIC_rf: partition@48000 {
114 label = "iNIC_rf";
115 reg = <0x48000 0x8000>;
116 read-only;
117
118 nvmem-layout {
119 compatible = "fixed-layout";
120 #address-cells = <1>;
121 #size-cells = <1>;
122
123 eeprom_iNIC_rf_0: eeprom@0 {
124 reg = <0x0 0x200>;
125 };
126 };
127 };
128
129 partition@50000 {
130 label = "NoUsed";
131 reg = <0x50000 0x20000>;
132 read-only;
133 };
134
135 partition@70000 {
136 compatible = "denx,uimage";
137 label = "firmware";
138 reg = <0x70000 0x6b4000>;
139 };
140
141 partition@724000 {
142 label = "manufacture";
143 reg = <0x724000 0x8c000>;
144 read-only;
145 };
146
147 partition@7b0000 {
148 label = "backup";
149 reg = <0x7b0000 0x10000>;
150 read-only;
151 };
152
153 partition@7c0000 {
154 label = "storage";
155 reg = <0x7c0000 0x40000>;
156 read-only;
157 };
158 };
159 };
160 };
161
162 &ethernet {
163 pinctrl-names = "default";
164 pinctrl-0 = <&rgmii1_pins &mdio_pins>;
165
166 nvmem-cells = <&macaddr_factory_4>;
167 nvmem-cell-names = "mac-address";
168
169 port@5 {
170 status = "okay";
171 mediatek,fixed-link = <1000 1 1 1>;
172 phy-mode = "rgmii";
173 };
174
175 mdio-bus {
176 #address-cells = <1>;
177 #size-cells = <0>;
178 status = "okay";
179
180 ethernet-phy@0 {
181 reg = <0>;
182 phy-mode = "rgmii";
183 };
184
185 ethernet-phy@1 {
186 reg = <1>;
187 phy-mode = "rgmii";
188 };
189
190 ethernet-phy@2 {
191 reg = <2>;
192 phy-mode = "rgmii";
193 };
194
195 ethernet-phy@3 {
196 reg = <3>;
197 phy-mode = "rgmii";
198 };
199
200 ethernet-phy@4 {
201 reg = <4>;
202 phy-mode = "rgmii";
203 };
204
205 ethernet-phy@1f {
206 reg = <0x1f>;
207 phy-mode = "rgmii";
208 };
209 };
210 };
211
212 &gsw {
213 mediatek,ephy-base = /bits/ 8 <12>;
214 };
215
216 &state_default {
217 gpio {
218 groups = "i2c", "uartf";
219 function = "gpio";
220 };
221 };
222
223 &pcie {
224 status = "okay";
225 };
226
227 &pcie0 {
228 wifi@0,0 {
229 reg = <0x0000 0 0 0 0>;
230 nvmem-cells = <&eeprom_iNIC_rf_0>;
231 nvmem-cell-names = "eeprom";
232 ieee80211-freq-limit = <5000000 6000000>;
233 };
234 };
235
236 &wmac {
237 nvmem-cells = <&eeprom_factory_0>;
238 nvmem-cell-names = "eeprom";
239 };