ramips: convert MT7613 and MT7615 EEPROM to NVMEM format for MT7621
[openwrt/staging/jow.git] / target / linux / ramips / dts / mt7621_asus_rp-ac87.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-ac87", "mediatek,mt7621-soc";
10 model = "ASUS RP-AC87";
11
12 aliases {
13 led-boot = &led_wps;
14 led-failsafe = &led_wps;
15 led-running = &led_wps;
16 led-upgrade = &led_wps;
17 label-mac-device = &gmac0;
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 18 GPIO_ACTIVE_LOW>;
32 linux,code = <KEY_WPS_BUTTON>;
33 };
34 };
35
36 leds {
37 compatible = "gpio-leds";
38
39 led_wps: wps {
40 label = "green:wps";
41 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
42 };
43
44 rssilow-wlan0 {
45 label = "green:rssilow-wlan0";
46 gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
47 };
48
49 rssimedlow-wlan0 {
50 label = "green:rssimedlow-wlan0";
51 gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
52 };
53
54 rssimed-wlan0 {
55 label = "green:rssimed-wlan0";
56 gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
57 };
58
59 rssihigh-wlan0 {
60 label = "green:rssihigh-wlan0";
61 gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
62 };
63
64 rssilow-wlan1 {
65 label = "green:rssilow-wlan1";
66 gpios = <&gpio 45 GPIO_ACTIVE_LOW>;
67 };
68
69 rssimedlow-wlan1 {
70 label = "green:rssimedlow-wlan1";
71 gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
72 };
73
74 rssimed-wlan1 {
75 label = "green:rssimed-wlan1";
76 gpios = <&gpio 47 GPIO_ACTIVE_LOW>;
77 };
78
79 rssihigh-wlan1 {
80 label = "green:rssihigh-wlan1";
81 gpios = <&gpio 48 GPIO_ACTIVE_LOW>;
82 };
83 };
84 };
85
86 &spi0 {
87 status = "okay";
88
89 flash@0 {
90 compatible = "jedec,spi-nor";
91 reg = <0>;
92 spi-max-frequency = <50000000>;
93 m25p,fast-read;
94
95 partitions {
96 compatible = "fixed-partitions";
97 #address-cells = <1>;
98 #size-cells = <1>;
99
100 partition@0 {
101 label = "u-boot";
102 reg = <0x0 0x30000>;
103 read-only;
104 };
105
106 partition@30000 {
107 label = "u-boot-env";
108 reg = <0x30000 0x10000>;
109 read-only;
110 };
111
112 factory: partition@40000 {
113 compatible = "nvmem-cells";
114 label = "factory";
115 reg = <0x40000 0x10000>;
116 #address-cells = <1>;
117 #size-cells = <1>;
118 read-only;
119
120 eeprom_factory_0: eeprom@0 {
121 reg = <0x0 0x4da8>;
122 };
123
124 eeprom_factory_8000: eeprom@8000 {
125 reg = <0x8000 0x4da8>;
126 };
127
128 macaddr_factory_8004: macaddr@8004 {
129 reg = <0x8004 0x6>;
130 };
131 };
132
133 partition@50000 {
134 compatible = "denx,uimage";
135 label = "firmware";
136 reg = <0x50000 0xfb0000>;
137 };
138 };
139 };
140 };
141
142 &pcie {
143 status = "okay";
144 };
145
146 &pcie0 {
147 wifi@0,0 {
148 compatible = "mediatek,mt76";
149 reg = <0x0000 0 0 0 0>;
150 nvmem-cells = <&eeprom_factory_0>;
151 nvmem-cell-names = "eeprom";
152 ieee80211-freq-limit = <2400000 2500000>;
153 };
154 };
155
156 &pcie1 {
157 wifi@0,0 {
158 compatible = "mediatek,mt76";
159 reg = <0x0000 0 0 0 0>;
160 nvmem-cells = <&eeprom_factory_8000>;
161 nvmem-cell-names = "eeprom";
162 ieee80211-freq-limit = <5000000 6000000>;
163 };
164 };
165
166 &gmac0 {
167 nvmem-cells = <&macaddr_factory_8004>;
168 nvmem-cell-names = "mac-address";
169 };
170
171 &switch0 {
172 ports {
173 port@4 {
174 status = "okay";
175 label = "lan";
176 };
177 };
178 };
179
180 &xhci {
181 status = "disabled";
182 };