ramips: use DT trigger for 2G WiFi on ASUS RT-AC51U
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_jcg_jhr-ac876m.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /dts-v1/;
3
4 #include "mt7621.dtsi"
5
6 #include <dt-bindings/gpio/gpio.h>
7 #include <dt-bindings/input/input.h>
8
9 / {
10 compatible = "jcg,jhr-ac876m", "mediatek,mt7621-soc";
11 model = "JCG JHR-AC876M";
12
13 aliases {
14 led-boot = &led_wps;
15 led-failsafe = &led_wps;
16 led-running = &led_wps;
17 led-upgrade = &led_wps;
18 label-mac-device = &wan;
19 };
20
21 chosen {
22 bootargs = "console=ttyS0,57600";
23 };
24
25 leds {
26 compatible = "gpio-leds";
27
28 usb3 {
29 label = "jhr-ac876m:blue:usb3";
30 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
31 trigger-sources = <&xhci_ehci_port1>;
32 linux,default-trigger = "usbport";
33 };
34
35 usb2 {
36 label = "jhr-ac876m:blue:usb2";
37 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
38 trigger-sources = <&ehci_port2>;
39 linux,default-trigger = "usbport";
40 };
41
42 led_wps: wps {
43 label = "jhr-ac876m:blue:wps";
44 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
45 };
46 };
47
48 keys {
49 compatible = "gpio-keys";
50
51 reset {
52 label = "reset";
53 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
54 linux,code = <KEY_RESTART>;
55 };
56
57 wps {
58 label = "wps";
59 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
60 linux,code = <KEY_WPS_BUTTON>;
61 };
62 };
63 };
64
65 &spi0 {
66 status = "okay";
67
68 flash@0 {
69 compatible = "jedec,spi-nor";
70 reg = <0>;
71 spi-max-frequency = <80000000>;
72 m25p,fast-read;
73
74 partitions {
75 compatible = "fixed-partitions";
76 #address-cells = <1>;
77 #size-cells = <1>;
78
79 partition@0 {
80 label = "u-boot";
81 reg = <0x0 0x30000>;
82 read-only;
83 };
84
85 partition@30000 {
86 label = "u-boot-env";
87 reg = <0x30000 0x10000>;
88 read-only;
89 };
90
91 factory: partition@40000 {
92 label = "factory";
93 reg = <0x40000 0x10000>;
94 read-only;
95 };
96
97 partition@50000 {
98 compatible = "denx,uimage";
99 label = "firmware";
100 reg = <0x50000 0xfb0000>;
101 };
102 };
103 };
104 };
105
106 &pcie {
107 status = "okay";
108 };
109
110 &pcie0 {
111 wifi@0,0 {
112 compatible = "mediatek,mt76";
113 reg = <0x0000 0 0 0 0>;
114 mediatek,mtd-eeprom = <&factory 0x0>;
115 ieee80211-freq-limit = <2400000 2500000>;
116
117 led {
118 led-active-low;
119 };
120 };
121 };
122
123 &pcie1 {
124 wifi@0,0 {
125 compatible = "mediatek,mt76";
126 reg = <0x0000 0 0 0 0>;
127 mediatek,mtd-eeprom = <&factory 0x8000>;
128 ieee80211-freq-limit = <5000000 6000000>;
129
130 led {
131 led-active-low;
132 };
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 = "lan1";
145 };
146
147 port@1 {
148 status = "okay";
149 label = "lan2";
150 };
151
152 port@2 {
153 status = "okay";
154 label = "lan3";
155 };
156
157 port@3 {
158 status = "okay";
159 label = "lan4";
160 };
161 wan: port@4 {
162 status = "okay";
163 label = "wan";
164 mtd-mac-address = <&factory 0x4>;
165 };
166 };
167 };
168
169 &state_default {
170 gpio {
171 groups = "i2c", "uart3", "jtag", "wdt";
172 function = "gpio";
173 };
174 };