60ab3e1646c63daa7c2e2f0bd37bc00a7afe9c1b
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / mt7621_asus_rt-ac57u.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,rt-ac57u", "mediatek,mt7621-soc";
10 model = "ASUS RT-AC57U";
11
12 aliases {
13 led-boot = &led_power;
14 led-failsafe = &led_power;
15 led-running = &led_power;
16 led-upgrade = &led_power;
17 };
18
19 leds {
20 compatible = "gpio-leds";
21
22 led_power: power {
23 label = "blue:power";
24 gpios = <&gpio 48 GPIO_ACTIVE_LOW>;
25 };
26
27 usb {
28 label = "blue:usb";
29 gpios = <&gpio 47 GPIO_ACTIVE_LOW>;
30 trigger-sources = <&ehci_port2>;
31 linux,default-trigger = "usbport";
32 };
33 };
34
35 keys {
36 compatible = "gpio-keys";
37
38 wps {
39 label = "wps";
40 gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
41 linux,code = <KEY_WPS_BUTTON>;
42 debounce-interval = <60>;
43 };
44
45 reset {
46 label = "reset";
47 gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
48 linux,code = <KEY_RESTART>;
49 debounce-interval = <60>;
50 };
51 };
52
53 led-regulator {
54 compatible = "regulator-fixed";
55 regulator-name = "LED-Power";
56 gpio = <&gpio 46 GPIO_ACTIVE_LOW>;
57 regulator-min-microvolt = <3300000>;
58 regulator-max-microvolt = <3300000>;
59 regulator-always-on;
60 };
61 };
62
63 &spi0 {
64 status = "okay";
65
66 flash@0 {
67 compatible = "jedec,spi-nor";
68 reg = <0>;
69 spi-max-frequency = <10000000>;
70
71 partitions {
72 compatible = "fixed-partitions";
73 #address-cells = <1>;
74 #size-cells = <1>;
75
76 partition@0 {
77 label = "u-boot";
78 reg = <0x0 0x30000>;
79 read-only;
80 };
81
82 partition@30000 {
83 label = "config";
84 reg = <0x30000 0x10000>;
85 read-only;
86 };
87
88 factory: partition@40000 {
89 label = "factory";
90 reg = <0x40000 0x10000>;
91 read-only;
92 };
93
94 partition@50000 {
95 compatible = "denx,uimage";
96 label = "firmware";
97 reg = <0x50000 0xfb0000>;
98 };
99 };
100 };
101 };
102
103 &pcie {
104 status = "okay";
105 };
106
107 &pcie0 {
108 wifi@0,0 {
109 compatible = "mediatek,mt76";
110 reg = <0x0000 0 0 0 0>;
111 mediatek,mtd-eeprom = <&factory 0x8000>;
112
113 led {
114 led-sources = <2>;
115 led-active-low;
116 };
117 };
118 };
119
120 &pcie1 {
121 wifi@0,0 {
122 compatible = "mediatek,mt76";
123 reg = <0x0000 0 0 0 0>;
124 mediatek,mtd-eeprom = <&factory 0x0000>;
125
126 led {
127 led-active-low;
128 };
129 };
130 };
131
132 &gmac0 {
133 nvmem-cells = <&macaddr_factory_e000>;
134 nvmem-cell-names = "mac-address";
135 };
136
137 &switch0 {
138 ports {
139 port@0 {
140 status = "okay";
141 label = "wan";
142 nvmem-cells = <&macaddr_factory_e006>;
143 nvmem-cell-names = "mac-address";
144 };
145
146 port@1 {
147 status = "okay";
148 label = "lan1";
149 };
150
151 port@2 {
152 status = "okay";
153 label = "lan2";
154 };
155
156 port@3 {
157 status = "okay";
158 label = "lan3";
159 };
160
161 port@4 {
162 status = "okay";
163 label = "lan4";
164 };
165 };
166 };
167
168 &state_default {
169 gpio {
170 groups = "sdhci";
171 function = "gpio";
172 };
173 };
174
175 &factory {
176 compatible = "nvmem-cells";
177 #address-cells = <1>;
178 #size-cells = <1>;
179
180 macaddr_factory_e000: macaddr@e000 {
181 reg = <0xe000 0x6>;
182 };
183
184 macaddr_factory_e006: macaddr@e006 {
185 reg = <0xe006 0x6>;
186 };
187 };