77e3fffcc18a616d28fe1046ebbdb931e145adf2
[openwrt/staging/hauke.git] / target / linux / ramips / dts / mt7621_asus_rt-n56u-b1.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-n56u-b1", "mediatek,mt7621-soc";
10 model = "ASUS RT-N56U B1";
11
12 aliases {
13 label-mac-device = &gmac1;
14 led-boot = &led_power;
15 led-failsafe = &led_power;
16 led-running = &led_power;
17 led-upgrade = &led_power;
18 };
19
20 chosen {
21 bootargs = "console=ttyS0,115200";
22 };
23
24 leds {
25 compatible = "gpio-leds";
26
27 led_power: power {
28 label = "blue:power";
29 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
30 };
31
32 wlan2g {
33 label = "blue:wlan2g";
34 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
35 linux,default-trigger = "phy0tpt";
36 };
37
38 wlan5g {
39 label = "blue:wlan5g";
40 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
41 linux,default-trigger = "phy1tpt";
42 };
43
44 wan {
45 label = "blue:wan";
46 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
47 };
48
49 lan {
50 label = "blue:lan";
51 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
52 };
53
54 usb {
55 label = "blue:usb";
56 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
57 trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
58 linux,default-trigger = "usbport";
59 };
60 };
61
62 keys {
63 compatible = "gpio-keys";
64
65 wps {
66 label = "wps";
67 gpios = <&gpio 18 GPIO_ACTIVE_HIGH>;
68 linux,code = <KEY_WPS_BUTTON>;
69 debounce-interval = <60>;
70 };
71
72 reset {
73 label = "reset";
74 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
75 linux,code = <KEY_RESTART>;
76 debounce-interval = <60>;
77 };
78 };
79 };
80
81 &spi0 {
82 status = "okay";
83
84 flash@0 {
85 compatible = "jedec,spi-nor";
86 reg = <0>;
87 spi-max-frequency = <50000000>;
88 m25p,fast-read;
89
90 partitions {
91 compatible = "fixed-partitions";
92 #address-cells = <1>;
93 #size-cells = <1>;
94
95 partition@0 {
96 label = "u-boot";
97 reg = <0x0 0x30000>;
98 read-only;
99 };
100
101 partition@30000 {
102 label = "config";
103 reg = <0x30000 0x10000>;
104 read-only;
105 };
106
107 factory: partition@40000 {
108 compatible = "nvmem-cells";
109 label = "factory";
110 reg = <0x40000 0x10000>;
111 #address-cells = <1>;
112 #size-cells = <1>;
113 read-only;
114
115 eeprom_factory_0: eeprom@0 {
116 reg = <0x0 0x400>;
117 };
118
119 eeprom_factory_8000: eeprom@8000 {
120 reg = <0x8000 0x200>;
121 };
122
123 macaddr_factory_4: macaddr@4 {
124 reg = <0x4 0x6>;
125 };
126
127 macaddr_factory_8004: macaddr@8004 {
128 reg = <0x8004 0x6>;
129 };
130 };
131
132 partition@50000 {
133 compatible = "denx,uimage";
134 label = "firmware";
135 reg = <0x50000 0xfb0000>;
136 };
137 };
138 };
139 };
140
141 &pcie {
142 status = "okay";
143 };
144
145 &pcie0 {
146 wifi@0,0 {
147 compatible = "mediatek,mt76";
148 reg = <0x0000 0 0 0 0>;
149 nvmem-cells = <&eeprom_factory_8000>;
150 nvmem-cell-names = "eeprom";
151 };
152 };
153
154 &pcie1 {
155 wifi@0,0 {
156 compatible = "mediatek,mt76";
157 reg = <0x0000 0 0 0 0>;
158 nvmem-cells = <&eeprom_factory_0>;
159 nvmem-cell-names = "eeprom";
160 };
161 };
162
163 &gmac0 {
164 nvmem-cells = <&macaddr_factory_8004>;
165 nvmem-cell-names = "mac-address";
166 };
167
168 &gmac1 {
169 status = "okay";
170 label = "wan";
171 phy-handle = <&ethphy4>;
172
173 nvmem-cells = <&macaddr_factory_4>;
174 nvmem-cell-names = "mac-address";
175 };
176
177 &mdio {
178 ethphy4: ethernet-phy@4 {
179 reg = <4>;
180 };
181 };
182
183 &switch0 {
184 ports {
185 port@0 {
186 status = "okay";
187 label = "lan4";
188 };
189
190 port@1 {
191 status = "okay";
192 label = "lan3";
193 };
194
195 port@2 {
196 status = "okay";
197 label = "lan2";
198 };
199
200 port@3 {
201 status = "okay";
202 label = "lan1";
203 };
204 };
205 };
206
207 &state_default {
208 gpio {
209 groups = "uart3", "uart2", "jtag", "wdt";
210 function = "gpio";
211 };
212 };