ramips: use DT trigger for 2G WiFi on ASUS RT-AC51U
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_netgear_sercomm_chj.dtsi
1 // SPDX-License-Identifier: GPL-2.0
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "mediatek,mt7621-soc";
10
11 aliases {
12 led-boot = &led_power;
13 led-failsafe = &led_power;
14 led-running = &led_power;
15 led-upgrade = &led_power;
16 label-mac-device = &gmac0;
17 };
18
19 chosen {
20 bootargs = "console=ttyS0,57600";
21 };
22
23 leds {
24 compatible = "gpio-leds";
25
26 led_power: power {
27 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
28 };
29
30 led_usb: usb {
31 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
32 trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
33 linux,default-trigger = "usbport";
34 };
35
36 led_internet: internet {
37 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
38 };
39
40 led_wifi: wifi {
41 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
42 linux,default-trigger = "phy0tpt";
43 };
44 };
45
46 keys {
47 compatible = "gpio-keys";
48
49 wps {
50 label = "wps";
51 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
52 linux,code = <KEY_WPS_BUTTON>;
53 };
54
55 reset {
56 label = "reset";
57 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
58 linux,code = <KEY_RESTART>;
59 };
60 };
61
62 reg_usb_vbus: regulator {
63 compatible = "regulator-fixed";
64 regulator-name = "usb_vbus";
65 regulator-min-microvolt = <5000000>;
66 regulator-max-microvolt = <5000000>;
67 gpio = <&gpio 10 GPIO_ACTIVE_HIGH>;
68 enable-active-high;
69 };
70 };
71
72 &xhci {
73 vbus-supply = <&reg_usb_vbus>;
74 };
75
76 &pcie {
77 status = "okay";
78 };
79
80 &pcie0 {
81 wifi@0,0 {
82 compatible = "mediatek,mt76";
83 reg = <0x0 0 0 0 0>;
84 mediatek,mtd-eeprom = <&factory 0x8000>;
85 ieee80211-freq-limit = <5000000 6000000>;
86 };
87 };
88
89 &pcie1 {
90 wifi@0,0 {
91 compatible = "mediatek,mt76";
92 reg = <0x0 0 0 0 0>;
93 mediatek,mtd-eeprom = <&factory 0x0>;
94 ieee80211-freq-limit = <2400000 2500000>;
95 };
96 };
97
98 &gmac0 {
99 mtd-mac-address = <&factory 0x4>;
100 };
101
102 &switch0 {
103 ports {
104 port@0 {
105 status = "okay";
106 label = "lan4";
107 };
108
109 port@1 {
110 status = "okay";
111 label = "lan3";
112 };
113
114 port@2 {
115 status = "okay";
116 label = "lan2";
117 };
118
119 port@3 {
120 status = "okay";
121 label = "lan1";
122 };
123
124 port@4 {
125 status = "okay";
126 label = "wan";
127 mtd-mac-address = <&factory 0x4>;
128 mtd-mac-address-increment = <2>;
129 };
130 };
131 };
132
133 &state_default {
134 gpio {
135 groups = "uart3", "uart2", "jtag", "wdt";
136 function = "gpio";
137 };
138 };
139
140 &nand {
141 status = "okay";
142
143 partitions {
144 compatible = "fixed-partitions";
145 #address-cells = <1>;
146 #size-cells = <1>;
147
148 partition@0 {
149 label = "u-boot";
150 reg = <0x0 0x100000>;
151 read-only;
152 };
153
154 partition@100000 {
155 label = "SC PART_MAP";
156 reg = <0x100000 0x100000>;
157 read-only;
158 };
159
160 partition@200000 {
161 label = "kernel";
162 reg = <0x200000 0x400000>;
163 };
164
165 partition@600000 {
166 label = "ubi";
167 reg = <0x600000 0x2800000>;
168 };
169
170 partition@2e00000 {
171 label = "reserved0";
172 reg = <0x2e00000 0x1800000>;
173 read-only;
174 };
175
176 factory: partition@4600000 {
177 label = "factory";
178 reg = <0x4600000 0x200000>;
179 read-only;
180 };
181
182 partition@4800000 {
183 label = "reserved1";
184 reg = <0x4800000 0x3800000>;
185 read-only;
186 };
187 };
188 };