ramips: use DT trigger for 2G WiFi on ASUS RT-AC51U
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_asus_rt-acx5p.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 aliases {
10 led-boot = &led_power;
11 led-failsafe = &led_power;
12 led-running = &led_power;
13 led-upgrade = &led_power;
14 };
15
16 chosen {
17 bootargs = "console=ttyS0,57600";
18 };
19
20 keys {
21 compatible = "gpio-keys";
22
23 reset {
24 label = "reset";
25 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
26 linux,code = <KEY_RESTART>;
27 };
28
29 wps {
30 label = "wps";
31 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
32 linux,code = <KEY_WPS_BUTTON>;
33 };
34 };
35
36 leds {
37 compatible = "gpio-leds";
38
39 led_power: power {
40 label = "rt-ac85p:blue:power";
41 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
42 };
43 wlan2g {
44 label = "rt-ac85p:blue:wlan2g";
45 gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
46 linux,default-trigger = "phy0radio";
47 };
48
49 wlan5g {
50 label = "rt-ac85p:blue:wlan5g";
51 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
52 linux,default-trigger = "phy1radio";
53 };
54 };
55 };
56
57 &i2c {
58 status = "okay";
59 };
60
61 &sdhci {
62 status = "okay";
63 };
64
65 &nand {
66 status = "okay";
67
68 partitions {
69 compatible = "fixed-partitions";
70 #address-cells = <1>;
71 #size-cells = <1>;
72
73 partition@0 {
74 label = "u-boot";
75 reg = <0x0 0xe0000>;
76 read-only;
77 };
78
79 partition@e0000 {
80 label = "u-boot-env";
81 reg = <0xe0000 0x100000>;
82 read-only;
83 };
84
85 factory: partition@1e0000 {
86 label = "factory";
87 reg = <0x1e0000 0x100000>;
88 read-only;
89 };
90
91 factory2: partition@2e0000 {
92 label = "factory2";
93 reg = <0x2e0000 0x100000>;
94 read-only;
95 };
96
97 partition@3e0000 {
98 label = "kernel";
99 reg = <0x3e0000 0x400000>;
100 };
101
102 partition@7e0000 {
103 label = "ubi";
104 reg = <0x7e0000 0x2e00000>;
105 };
106
107 partition@35e0000 {
108 label = "firmware2";
109 reg = <0x35e0000 0x3200000>;
110 };
111 };
112 };
113
114 &pcie {
115 status = "okay";
116 };
117
118 &pcie0 {
119 wifi0: wifi@0,0 {
120 compatible = "pci14c3,7615";
121 reg = <0x0000 0 0 0 0>;
122 mediatek,mtd-eeprom = <&factory 0x0000>;
123 ieee80211-freq-limit = <2400000 2500000>;
124 };
125 };
126
127 &pcie1 {
128 wifi1: wifi@0,0 {
129 compatible = "pci14c3,7615";
130 reg = <0x0000 0 0 0 0>;
131 mediatek,mtd-eeprom = <&factory 0x8000>;
132 ieee80211-freq-limit = <5000000 6000000>;
133 };
134 };
135
136 &gmac0 {
137 mtd-mac-address = <&factory 0xe000>;
138 };
139
140 &switch0 {
141 ports {
142 port@0 {
143 status = "okay";
144 label = "wan";
145 };
146
147 port@1 {
148 status = "okay";
149 label = "lan1";
150 };
151
152 port@2 {
153 status = "okay";
154 label = "lan2";
155 };
156
157 port@3 {
158 status = "okay";
159 label = "lan3";
160 };
161
162 port@4 {
163 status = "okay";
164 label = "lan4";
165 };
166 };
167 };
168
169 &state_default {
170 gpio {
171 groups = "uart2", "uart3", "i2c";
172 function = "gpio";
173 };
174 };