ramips: add support for ipTIME A3
[openwrt/openwrt.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-polled";
47 poll-interval = <20>;
48
49 wps {
50 label = "wps";
51 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
52 linux,code = <KEY_WPS_BUTTON>;
53 };
54
55 reset {
56 label = "reset";
57 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
58 linux,code = <KEY_RESTART>;
59 };
60
61 auto {
62 label = "auto";
63 gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
64 linux,code = <BTN_0>;
65 linux,input-type = <EV_SW>;
66 };
67 };
68 };
69
70 &spi0 {
71 status = "okay";
72
73 flash@0 {
74 compatible = "jedec,spi-nor";
75 reg = <0>;
76 spi-max-frequency = <10000000>;
77
78 partitions {
79 compatible = "fixed-partitions";
80 #address-cells = <1>;
81 #size-cells = <1>;
82
83 partition@0 {
84 label = "u-boot";
85 reg = <0x0 0x30000>;
86 read-only;
87 };
88
89 partition@30000 {
90 label = "u-boot-env";
91 reg = <0x30000 0x10000>;
92 read-only;
93 };
94
95 factory: partition@40000 {
96 label = "factory";
97 reg = <0x40000 0x8000>;
98 read-only;
99 };
100
101 iNIC_rf: partition@48000 {
102 label = "iNIC_rf";
103 reg = <0x48000 0x8000>;
104 read-only;
105 };
106
107 partition@50000 {
108 label = "NoUsed";
109 reg = <0x50000 0x20000>;
110 read-only;
111 };
112
113 partition@70000 {
114 compatible = "denx,uimage";
115 label = "firmware";
116 reg = <0x70000 0x6b4000>;
117 };
118
119 partition@724000 {
120 label = "manufacture";
121 reg = <0x724000 0x8c000>;
122 read-only;
123 };
124
125 partition@7b0000 {
126 label = "backup";
127 reg = <0x7b0000 0x10000>;
128 read-only;
129 };
130
131 partition@7c0000 {
132 label = "storage";
133 reg = <0x7c0000 0x40000>;
134 read-only;
135 };
136 };
137 };
138 };
139
140 &ethernet {
141 pinctrl-names = "default";
142 pinctrl-0 = <&rgmii1_pins &mdio_pins>;
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 &pinctrl {
189 state_default: pinctrl0 {
190 gpio {
191 ralink,group = "i2c", "uartf";
192 ralink,function = "gpio";
193 };
194 };
195 };
196
197 &pcie {
198 status = "okay";
199 };
200
201 &pcie0 {
202 wifi@0,0 {
203 reg = <0x0000 0 0 0 0>;
204 mediatek,mtd-eeprom = <&iNIC_rf 0x0>;
205 ieee80211-freq-limit = <5000000 6000000>;
206 };
207 };
208
209 &wmac {
210 ralink,mtd-eeprom = <&factory 0x0>;
211 };