ramips: use DT trigger for 2G WiFi on ASUS RT-AC51U
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7620a_netis_wf2770.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 = "netis,wf2770", "ralink,mt7620a-soc";
11 model = "NETIS WF2770";
12
13 leds {
14 compatible = "gpio-leds";
15
16 wlan {
17 label = "wf2770:blue:wlan";
18 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
19 linux,default-trigger = "phy0tpt";
20 };
21 };
22
23 keys {
24 compatible = "gpio-keys";
25
26 reset {
27 label = "reset";
28 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
29 linux,code = <KEY_RESTART>;
30 };
31
32 wps {
33 label = "wps";
34 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
35 linux,code = <KEY_WPS_BUTTON>;
36 };
37
38 rfkill {
39 label = "rfkill";
40 gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
41 linux,code = <KEY_RFKILL>;
42 };
43
44 led-toggle {
45 label = "led-toggle";
46 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
47 linux,code = <KEY_LIGHTS_TOGGLE>;
48 };
49 };
50 };
51
52 &spi0 {
53 status = "okay";
54
55 flash@0 {
56 compatible = "jedec,spi-nor";
57 reg = <0>;
58 spi-max-frequency = <50000000>;
59
60 partitions {
61 compatible = "fixed-partitions";
62 #address-cells = <1>;
63 #size-cells = <1>;
64
65 partition@0 {
66 label = "u-boot";
67 reg = <0x0 0x30000>;
68 read-only;
69 };
70
71 partition@30000 {
72 label = "config";
73 reg = <0x30000 0x10000>;
74 read-only;
75 };
76
77 factory: partition@40000 {
78 label = "factory";
79 reg = <0x40000 0x10000>;
80 read-only;
81 };
82
83 partition@50000 {
84 compatible = "denx,uimage";
85 label = "firmware";
86 reg = <0x50000 0xfb0000>;
87 };
88 };
89 };
90 };
91
92 &state_default {
93 gpio {
94 groups = "i2c", "uartf";
95 function = "gpio";
96 };
97 };
98
99 &ethernet {
100 pinctrl-names = "default";
101 pinctrl-0 = <&rgmii1_pins &mdio_pins>;
102
103 mtd-mac-address = <&factory 0x4>;
104
105 port@5 {
106 status = "okay";
107 mediatek,fixed-link = <1000 1 1 1>;
108 phy-mode = "rgmii";
109 };
110
111 mdio-bus {
112 status = "okay";
113
114 ethernet-phy@0 {
115 reg = <0>;
116 phy-mode = "rgmii";
117 };
118
119 ethernet-phy@1 {
120 reg = <1>;
121 phy-mode = "rgmii";
122 };
123
124 ethernet-phy@2 {
125 reg = <2>;
126 phy-mode = "rgmii";
127 };
128
129 ethernet-phy@3 {
130 reg = <3>;
131 phy-mode = "rgmii";
132 };
133
134 ethernet-phy@4 {
135 reg = <4>;
136 phy-mode = "rgmii";
137 };
138
139 ethernet-phy@1f {
140 reg = <0x1f>;
141 phy-mode = "rgmii";
142 };
143 };
144 };
145
146 &pcie {
147 status = "okay";
148 };
149
150 &pcie0 {
151 wifi@0,0 {
152 compatible = "mediatek,mt76";
153 reg = <0x0000 0 0 0 0>;
154 mediatek,mtd-eeprom = <&factory 0x8000>;
155 ieee80211-freq-limit = <5000000 6000000>;
156 };
157 };
158
159 &wmac {
160 ralink,mtd-eeprom = <&factory 0x0>;
161 };