d59b481a612787f8a315a74623cc4641a18c9c27
[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
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
99 iNIC_rf: partition@48000 {
100 label = "iNIC_rf";
101 reg = <0x48000 0x8000>;
102 read-only;
103 };
104
105 partition@50000 {
106 label = "NoUsed";
107 reg = <0x50000 0x20000>;
108 read-only;
109 };
110
111 partition@70000 {
112 compatible = "denx,uimage";
113 label = "firmware";
114 reg = <0x70000 0x6b4000>;
115 };
116
117 partition@724000 {
118 label = "manufacture";
119 reg = <0x724000 0x8c000>;
120 read-only;
121 };
122
123 partition@7b0000 {
124 label = "backup";
125 reg = <0x7b0000 0x10000>;
126 read-only;
127 };
128
129 partition@7c0000 {
130 label = "storage";
131 reg = <0x7c0000 0x40000>;
132 read-only;
133 };
134 };
135 };
136 };
137
138 &ethernet {
139 pinctrl-names = "default";
140 pinctrl-0 = <&rgmii1_pins &mdio_pins>;
141
142 mtd-mac-address = <&factory 0x4>;
143
144 port@5 {
145 status = "okay";
146 mediatek,fixed-link = <1000 1 1 1>;
147 phy-mode = "rgmii";
148 };
149
150 mdio-bus {
151 #address-cells = <1>;
152 #size-cells = <0>;
153 status = "okay";
154
155 ethernet-phy@0 {
156 reg = <0>;
157 phy-mode = "rgmii";
158 };
159
160 ethernet-phy@1 {
161 reg = <1>;
162 phy-mode = "rgmii";
163 };
164
165 ethernet-phy@2 {
166 reg = <2>;
167 phy-mode = "rgmii";
168 };
169
170 ethernet-phy@3 {
171 reg = <3>;
172 phy-mode = "rgmii";
173 };
174
175 ethernet-phy@4 {
176 reg = <4>;
177 phy-mode = "rgmii";
178 };
179
180 ethernet-phy@1f {
181 reg = <0x1f>;
182 phy-mode = "rgmii";
183 };
184 };
185 };
186
187 &gsw {
188 mediatek,ephy-base = /bits/ 8 <12>;
189 };
190
191 &state_default {
192 gpio {
193 groups = "i2c", "uartf";
194 function = "gpio";
195 };
196 };
197
198 &pcie {
199 status = "okay";
200 };
201
202 &pcie0 {
203 wifi@0,0 {
204 reg = <0x0000 0 0 0 0>;
205 mediatek,mtd-eeprom = <&iNIC_rf 0x0>;
206 ieee80211-freq-limit = <5000000 6000000>;
207 };
208 };
209
210 &wmac {
211 ralink,mtd-eeprom = <&factory 0x0>;
212 };