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