ramips: add support for SNR-CPE-ME2-SFP
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_asus_rp-ac56.dts
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 compatible = "asus,rp-ac56", "mediatek,mt7621-soc";
10 model = "Asus RP-AC56";
11
12 aliases {
13 led-boot = &led_power_orange;
14 led-failsafe = &led_power_orange;
15 led-running = &led_power_white;
16 led-upgrade = &led_power_blue;
17 label-mac-device = &gmac0;
18 };
19
20 leds {
21 compatible = "gpio-leds";
22
23 wlan2g_red {
24 label = "red:wlan2g";
25 gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
26 };
27
28 wlan2g_blue {
29 label = "blue:wlan2g";
30 gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
31 };
32
33 wlan2g_green {
34 label = "green:wlan2g";
35 gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
36 linux,default-trigger = "phy0tpt";
37 };
38
39 wlan5g_red {
40 label = "red:wlan5g";
41 gpios = <&gpio 45 GPIO_ACTIVE_HIGH>;
42 };
43
44 wlan5g_blue {
45 label = "blue:wlan5g";
46 gpios = <&gpio 43 GPIO_ACTIVE_HIGH>;
47 };
48
49 wlan5g_green {
50 label = "green:wlan5g";
51 gpios = <&gpio 44 GPIO_ACTIVE_HIGH>;
52 linux,default-trigger = "phy1tpt";
53 };
54
55 led_power_white: power_white {
56 label = "white:power";
57 gpios = <&gpio 48 GPIO_ACTIVE_HIGH>;
58 };
59
60 led_power_orange: power_orange {
61 label = "orange:power";
62 gpios = <&gpio 47 GPIO_ACTIVE_HIGH>;
63 };
64
65 led_power_blue: power_blue {
66 label = "blue:power";
67 gpios = <&gpio 46 GPIO_ACTIVE_HIGH>;
68 };
69 };
70
71 keys {
72 compatible = "gpio-keys";
73
74 wps {
75 label = "wps";
76 gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
77 linux,code = <KEY_WPS_BUTTON>;
78 };
79
80 reset {
81 label = "reset";
82 gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
83 linux,code = <KEY_RESTART>;
84 };
85 };
86
87 sound {
88 compatible = "simple-audio-card";
89 simple-audio-card,name = "Audio-I2S";
90 simple-audio-card,format = "i2s";
91 simple-audio-card,bitclock-master = <&dailink0_master>;
92 simple-audio-card,frame-master = <&dailink0_master>;
93 simple-audio-card,routing =
94 "Headphone Jack", "HP_L",
95 "Headphone Jack", "HP_R";
96 simple-audio-card,mclk-fs = <256>;
97
98 simple-audio-card,cpu {
99 sound-dai = <&i2s>;
100 };
101
102 dailink0_master: simple-audio-card,codec {
103 sound-dai = <&codec>;
104 };
105 };
106 };
107
108 &gpio {
109 status = "okay";
110 };
111
112 &spi0 {
113 status = "okay";
114
115 flash@0 {
116 compatible = "jedec,spi-nor";
117 reg = <0>;
118 spi-max-frequency = <50000000>;
119 m25p,fast-read;
120
121 partitions {
122 compatible = "fixed-partitions";
123 #address-cells = <1>;
124 #size-cells = <1>;
125
126 partition@0 {
127 label = "u-boot";
128 reg = <0x0 0x30000>;
129 read-only;
130 };
131
132 partition@30000 {
133 label = "nvram";
134 reg = <0x30000 0x10000>;
135 read-only;
136 };
137
138 factory: partition@40000 {
139 label = "factory";
140 reg = <0x40000 0x10000>;
141 read-only;
142
143 compatible = "nvmem-cells";
144 #address-cells = <1>;
145 #size-cells = <1>;
146
147 macaddr_factory_4: macaddr@4 {
148 reg = <0x4 0x6>;
149 };
150 };
151
152 partition@50000 {
153 compatible = "denx,uimage";
154 label = "firmware";
155 reg = <0x50000 0xfa0000>;
156 };
157
158 radio: partition@ff0000 {
159 label = "radio";
160 reg = <0xff0000 0x10000>;
161 read-only;
162 };
163 };
164 };
165 };
166
167 &state_default {
168 gpio {
169 groups = "uart2";
170 function = "gpio";
171 };
172 };
173
174 &pinctrl {
175 i2s_pins: i2s {
176 i2s {
177 groups = "uart3";
178 function = "i2s";
179 };
180 };
181 };
182
183 &pcie {
184 status = "okay";
185 };
186
187 &pcie0 {
188 wifi@0,0 {
189 compatible = "mediatek,mt76";
190 reg = <0x0000 0 0 0 0>;
191 mediatek,mtd-eeprom = <&factory 0x0000>;
192 ieee80211-freq-limit = <2400000 2500000>;
193 };
194 };
195
196 &pcie1 {
197 wifi@0,0 {
198 compatible = "mediatek,mt76";
199 reg = <0x0000 0 0 0 0>;
200 mediatek,mtd-eeprom = <&factory 0x8000>;
201 ieee80211-freq-limit = <5000000 6000000>;
202 };
203 };
204
205 &gmac0 {
206 nvmem-cells = <&macaddr_factory_4>;
207 nvmem-cell-names = "mac-address";
208 };
209
210 &switch0 {
211 ports {
212 port@0 {
213 status = "okay";
214 label = "lan";
215 };
216 };
217 };
218
219 &xhci {
220 status = "disabled";
221 };
222
223 &i2c {
224 status = "okay";
225
226 codec: wm8960@18 {
227 #sound-dai-cells = <0>;
228 compatible = "wlf,wm8960";
229 reg = <0x18>;
230 wlf,shared-lrclk;
231 };
232 };
233
234 &gdma {
235 status = "okay";
236 };
237
238 &i2s {
239 #sound-dai-cells = <0>;
240 status = "okay";
241 pinctrl-names = "default";
242 pinctrl-0 = <&i2s_pins>;
243 };