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