bb9171bbac330d2665036bca5b3e6d62cb6989cc
[openwrt/staging/nbd.git] / target / linux / ramips / dts / mt7621_asus_rt-acx5p.dtsi
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 aliases {
10 led-boot = &led_power;
11 led-failsafe = &led_power;
12 led-running = &led_power;
13 led-upgrade = &led_power;
14 };
15
16 keys {
17 compatible = "gpio-keys";
18
19 reset {
20 label = "reset";
21 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
22 linux,code = <KEY_RESTART>;
23 };
24
25 wps {
26 label = "wps";
27 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
28 linux,code = <KEY_WPS_BUTTON>;
29 };
30 };
31
32 leds {
33 compatible = "gpio-leds";
34
35 led_power: power {
36 label = "blue:power";
37 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
38 };
39
40 wlan5g {
41 label = "blue:wlan5g";
42 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
43 linux,default-trigger = "phy1tpt";
44 };
45
46 wlan2g {
47 label = "blue:wlan2g";
48 gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
49 linux,default-trigger = "phy0tpt";
50 };
51 };
52 };
53
54 &i2c {
55 status = "okay";
56 };
57
58 &sdhci {
59 status = "okay";
60 };
61
62 &nand {
63 status = "okay";
64
65 partitions {
66 compatible = "fixed-partitions";
67 #address-cells = <1>;
68 #size-cells = <1>;
69
70 partition@0 {
71 label = "u-boot";
72 reg = <0x0 0xe0000>;
73 read-only;
74 };
75
76 partition@e0000 {
77 label = "u-boot-env";
78 reg = <0xe0000 0x100000>;
79 read-only;
80 };
81
82 factory: partition@1e0000 {
83 compatible = "nvmem-cells";
84 label = "factory";
85 reg = <0x1e0000 0x100000>;
86 #address-cells = <1>;
87 #size-cells = <1>;
88 read-only;
89
90 eeprom_factory_0: eeprom@0 {
91 reg = <0x0 0x4da8>;
92 };
93
94 eeprom_factory_8000: eeprom@8000 {
95 reg = <0x8000 0x4da8>;
96 };
97
98 macaddr_factory_e000: macaddr@e000 {
99 reg = <0xe000 0x6>;
100 };
101 };
102
103 factory2: partition@2e0000 {
104 label = "factory2";
105 reg = <0x2e0000 0x100000>;
106 read-only;
107 };
108
109 partition@3e0000 {
110 label = "kernel";
111 reg = <0x3e0000 0x400000>;
112 };
113
114 partition@7e0000 {
115 label = "ubi";
116 reg = <0x7e0000 0x2e00000>;
117 };
118
119 partition@35e0000 {
120 label = "firmware2";
121 reg = <0x35e0000 0x3200000>;
122 };
123 };
124 };
125
126 &pcie {
127 status = "okay";
128 };
129
130 &pcie0 {
131 wifi0: wifi@0,0 {
132 compatible = "pci14c3,7615";
133 reg = <0x0000 0 0 0 0>;
134 nvmem-cells = <&eeprom_factory_0>;
135 nvmem-cell-names = "eeprom";
136 ieee80211-freq-limit = <2400000 2500000>;
137 };
138 };
139
140 &pcie1 {
141 wifi1: wifi@0,0 {
142 compatible = "pci14c3,7615";
143 reg = <0x0000 0 0 0 0>;
144 nvmem-cells = <&eeprom_factory_8000>;
145 nvmem-cell-names = "eeprom";
146 ieee80211-freq-limit = <5000000 6000000>;
147 };
148 };
149
150 &gmac0 {
151 nvmem-cells = <&macaddr_factory_e000>;
152 nvmem-cell-names = "mac-address";
153 };
154
155 &gmac1 {
156 status = "okay";
157 label = "wan";
158 phy-handle = <&ethphy0>;
159
160 nvmem-cells = <&macaddr_factory_e000>;
161 nvmem-cell-names = "mac-address";
162 };
163
164 &mdio {
165 ethphy0: ethernet-phy@0 {
166 reg = <0>;
167 };
168 };
169
170 &switch0 {
171 ports {
172 port@1 {
173 status = "okay";
174 label = "lan1";
175 };
176
177 port@2 {
178 status = "okay";
179 label = "lan2";
180 };
181
182 port@3 {
183 status = "okay";
184 label = "lan3";
185 };
186
187 port@4 {
188 status = "okay";
189 label = "lan4";
190 };
191 };
192 };
193
194 &state_default {
195 gpio {
196 groups = "uart2", "uart3", "i2c";
197 function = "gpio";
198 };
199 };