ramips: convert the remaining mtd-mac-address to NVMEM format
[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 compatible = "nvmem-cells";
140 label = "factory";
141 reg = <0x40000 0x10000>;
142 #address-cells = <1>;
143 #size-cells = <1>;
144 read-only;
145
146 eeprom_factory_0: eeprom@0 {
147 reg = <0x0 0x400>;
148 };
149
150 eeprom_factory_8000: eeprom@8000 {
151 reg = <0x8000 0x200>;
152 };
153
154 macaddr_factory_4: macaddr@4 {
155 reg = <0x4 0x6>;
156 };
157 };
158
159 partition@50000 {
160 compatible = "denx,uimage";
161 label = "firmware";
162 reg = <0x50000 0xfa0000>;
163 };
164
165 radio: partition@ff0000 {
166 label = "radio";
167 reg = <0xff0000 0x10000>;
168 read-only;
169 };
170 };
171 };
172 };
173
174 &state_default {
175 gpio {
176 groups = "uart2";
177 function = "gpio";
178 };
179 };
180
181 &pinctrl {
182 i2s_pins: i2s {
183 i2s {
184 groups = "uart3";
185 function = "i2s";
186 };
187 };
188 };
189
190 &pcie {
191 status = "okay";
192 };
193
194 &pcie0 {
195 wifi@0,0 {
196 compatible = "mediatek,mt76";
197 reg = <0x0000 0 0 0 0>;
198 nvmem-cells = <&eeprom_factory_0>;
199 nvmem-cell-names = "eeprom";
200 ieee80211-freq-limit = <2400000 2500000>;
201 };
202 };
203
204 &pcie1 {
205 wifi@0,0 {
206 compatible = "mediatek,mt76";
207 reg = <0x0000 0 0 0 0>;
208 nvmem-cells = <&eeprom_factory_8000>;
209 nvmem-cell-names = "eeprom";
210 ieee80211-freq-limit = <5000000 6000000>;
211 };
212 };
213
214 &gmac0 {
215 nvmem-cells = <&macaddr_factory_4>;
216 nvmem-cell-names = "mac-address";
217 };
218
219 &switch0 {
220 ports {
221 port@0 {
222 status = "okay";
223 label = "lan";
224 };
225 };
226 };
227
228 &xhci {
229 status = "disabled";
230 };
231
232 &i2c {
233 status = "okay";
234
235 codec: wm8960@18 {
236 #sound-dai-cells = <0>;
237 compatible = "wlf,wm8960";
238 reg = <0x18>;
239 wlf,shared-lrclk;
240 };
241 };
242
243 &gdma {
244 status = "okay";
245 };
246
247 &i2s {
248 #sound-dai-cells = <0>;
249 status = "okay";
250 pinctrl-names = "default";
251 pinctrl-0 = <&i2s_pins>;
252 };