ramips: add proper system clock and reset driver support for mt7621
[openwrt/openwrt.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 label = "factory";
114 reg = <0x40000 0x10000>;
115 read-only;
116
117 compatible = "nvmem-cells";
118 #address-cells = <1>;
119 #size-cells = <1>;
120
121 macaddr_factory_8004: macaddr@8004 {
122 reg = <0x8004 0x6>;
123 };
124 };
125
126 partition@50000 {
127 compatible = "denx,uimage";
128 label = "firmware";
129 reg = <0x50000 0xfb0000>;
130 };
131 };
132 };
133 };
134
135 &pcie {
136 status = "okay";
137 };
138
139 &pcie0 {
140 wifi@0,0 {
141 compatible = "mediatek,mt76";
142 reg = <0x0000 0 0 0 0>;
143 mediatek,mtd-eeprom = <&factory 0x0>;
144 ieee80211-freq-limit = <2400000 2500000>;
145 };
146 };
147
148 &pcie1 {
149 wifi@0,0 {
150 compatible = "mediatek,mt76";
151 reg = <0x0000 0 0 0 0>;
152 mediatek,mtd-eeprom = <&factory 0x8000>;
153 ieee80211-freq-limit = <5000000 6000000>;
154 };
155 };
156
157 &gmac0 {
158 nvmem-cells = <&macaddr_factory_8004>;
159 nvmem-cell-names = "mac-address";
160 };
161
162 &switch0 {
163 ports {
164 port@4 {
165 status = "okay";
166 label = "lan";
167 };
168 };
169 };
170
171 &xhci {
172 status = "disabled";
173 };