ramips: use DT trigger for 2G WiFi on ASUS RT-AC51U
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7620a_dlink_dwr-960.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/input/input.h>
7 #include <dt-bindings/gpio/gpio.h>
8
9 / {
10 compatible = "dlink,dwr-960", "ralink,mt7620a-soc";
11 model = "D-Link DWR-960";
12
13 aliases {
14 led-boot = &led_status;
15 led-failsafe = &led_status;
16 led-running = &led_status;
17 led-upgrade = &led_status;
18 };
19
20 keys {
21 compatible = "gpio-keys";
22
23 reset {
24 label = "reset";
25 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
26 linux,code = <KEY_RESTART>;
27 };
28
29 wps {
30 label = "wps";
31 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
32 linux,code = <KEY_WPS_BUTTON>;
33 };
34 };
35
36 leds {
37 compatible = "gpio-leds";
38
39 led_status: status {
40 label = "dwr-960:green:status";
41 gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
42 };
43
44 wan {
45 label = "dwr-960:green:wan";
46 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
47 };
48
49 lan {
50 label = "dwr-960:green:lan";
51 gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
52 };
53
54 sms {
55 label = "dwr-960:green:sms";
56 gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
57 };
58
59 signal_green {
60 label = "dwr-960:green:signal";
61 gpios = <&gpio2 0 GPIO_ACTIVE_HIGH>;
62 };
63
64 signal_red {
65 label = "dwr-960:red:signal";
66 gpios = <&gpio2 1 GPIO_ACTIVE_HIGH>;
67 };
68
69 4g {
70 label = "dwr-960:green:4g";
71 gpios = <&gpio2 2 GPIO_ACTIVE_LOW>;
72 };
73
74 3g {
75 label = "dwr-960:green:3g";
76 gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
77 };
78
79 wlan5g {
80 label = "dwr-960:green:wlan5g";
81 gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
82 linux,default-trigger = "phy0tpt";
83 };
84
85 wlan2g {
86 label = "dwr-960:green:wlan2g";
87 gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
88 linux,default-trigger = "phy1tpt";
89 };
90 };
91 };
92
93 &ethernet {
94 pinctrl-names = "default";
95 pinctrl-0 = <&rgmii2_pins &mdio_pins>;
96
97 mediatek,portmap = "wllll";
98
99 port@5 {
100 status = "okay";
101 phy-mode = "rgmii-txid";
102 phy-handle = <&phy7>;
103 };
104
105 mdio-bus {
106 status = "okay";
107
108 phy7: ethernet-phy@7 {
109 reg = <7>;
110 phy-mode = "rgmii-id";
111 };
112 };
113 };
114
115 &gpio1 {
116 status = "okay";
117 };
118
119 &gpio2 {
120 status = "okay";
121 };
122
123 &gpio3 {
124 status = "okay";
125 };
126
127 &spi0 {
128 status = "okay";
129
130 flash@0 {
131 compatible = "jedec,spi-nor";
132 reg = <0>;
133 spi-max-frequency = <50000000>;
134
135 partitions {
136 compatible = "fixed-partitions";
137 #address-cells = <1>;
138 #size-cells = <1>;
139
140 partition@0 {
141 label = "jboot";
142 reg = <0x0 0x10000>;
143 read-only;
144 };
145
146 partition@10000 {
147 compatible = "amit,jimage";
148 label = "firmware";
149 reg = <0x10000 0xfe0000>;
150 };
151
152 config: partition@ff0000 {
153 label = "config";
154 reg = <0xff0000 0x10000>;
155 read-only;
156 };
157 };
158 };
159 };
160
161 &ehci {
162 status = "okay";
163 };
164
165 &ohci {
166 status = "okay";
167 };
168
169 &pcie {
170 status = "okay";
171 };
172
173 &pcie0 {
174 wifi@0,0 {
175 compatible = "mediatek,mt76";
176 reg = <0x0000 0 0 0 0>;
177 ieee80211-freq-limit = <5000000 6000000>;
178 mediatek,mtd-eeprom = <&config 0xe08e>;
179 mtd-mac-address = <&config 0xe50e>;
180 mtd-mac-address-increment = <2>;
181 };
182 };
183
184 &state_default {
185 default {
186 groups = "i2c", "wled", "spi refclk", "uartf", "ephy";
187 function = "gpio";
188 };
189 };