rootfs: fix USE_APK detection
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_cudy_wr1300-v1.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/input/input.h>
6 #include <dt-bindings/gpio/gpio.h>
7
8 / {
9 compatible = "cudy,wr1300-v1", "mediatek,mt7621-soc";
10 model = "Cudy WR1300 v1";
11
12 aliases {
13 led-boot = &led_sys;
14 led-failsafe = &led_sys;
15 led-running = &led_sys;
16 led-upgrade = &led_sys;
17 label-mac-device = &gmac0;
18 };
19
20 chosen {
21 bootargs = "console=ttyS0,115200";
22 };
23
24 keys {
25 compatible = "gpio-keys";
26
27 reset {
28 label = "reset";
29 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
30 linux,code = <KEY_RESTART>;
31 };
32
33 wps {
34 label = "wps";
35 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
36 linux,code = <KEY_WPS_BUTTON>;
37 };
38 };
39
40 leds {
41 compatible = "gpio-leds";
42
43 led_sys: sys {
44 label = "green:sys";
45 gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
46 };
47
48 usb {
49 label = "green:usb";
50 gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
51 trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
52 linux,default-trigger = "usbport";
53 };
54
55 wps {
56 label = "green:wps";
57 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
58 };
59 };
60 };
61
62 &spi0 {
63 status = "okay";
64
65 flash@0 {
66 compatible = "jedec,spi-nor";
67 reg = <0>;
68 spi-max-frequency = <80000000>;
69 m25p,fast-read;
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 = "u-boot-env";
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 0xf80000>;
98 };
99
100 partition@fd0000 {
101 label = "debug";
102 reg = <0xfd0000 0x10000>;
103 read-only;
104 };
105
106 partition@fe0000 {
107 label = "backup";
108 reg = <0xfe0000 0x10000>;
109 read-only;
110 };
111
112 bdinfo: partition@ff0000 {
113 label = "bdinfo";
114 reg = <0xff0000 0x10000>;
115 read-only;
116 };
117 };
118 };
119 };
120
121 &pcie {
122 status = "okay";
123 };
124
125 &pcie0 {
126 wifi@0,0 {
127 compatible = "pci14c3,7603";
128 reg = <0x0000 0 0 0 0>;
129 mediatek,mtd-eeprom = <&factory 0x0000>;
130 nvmem-cells = <&macaddr_bdinfo_de00>;
131 nvmem-cell-names = "mac-address";
132 ieee80211-freq-limit = <2400000 2500000>;
133
134 led {
135 led-active-low;
136 };
137 };
138 };
139
140 &pcie1 {
141 wifi@0,0 {
142 compatible = "pci14c3,7662";
143 reg = <0x0000 0 0 0 0>;
144 mediatek,mtd-eeprom = <&factory 0x8000>;
145 nvmem-cells = <&macaddr_bdinfo_de00>;
146 nvmem-cell-names = "mac-address";
147 mac-address-increment = <2>;
148 ieee80211-freq-limit = <5000000 6000000>;
149
150 led {
151 led-sources = <2>;
152 led-active-low;
153 };
154 };
155 };
156
157 &gmac0 {
158 nvmem-cells = <&macaddr_bdinfo_de00>;
159 nvmem-cell-names = "mac-address";
160 };
161
162 &gmac1 {
163 status = "okay";
164 label = "wan";
165 phy-handle = <&ethphy4>;
166
167 nvmem-cells = <&macaddr_bdinfo_de00>;
168 nvmem-cell-names = "mac-address";
169 mac-address-increment = <1>;
170 };
171
172 &mdio {
173 ethphy4: ethernet-phy@4 {
174 reg = <4>;
175 };
176 };
177
178 &switch0 {
179 ports {
180 port@0 {
181 status = "okay";
182 label = "lan4";
183 };
184
185 port@1 {
186 status = "okay";
187 label = "lan3";
188 };
189
190 port@2 {
191 status = "okay";
192 label = "lan2";
193 };
194
195 port@3 {
196 status = "okay";
197 label = "lan1";
198 };
199 };
200 };
201
202 &state_default {
203 gpio {
204 groups = "wdt", "i2c", "jtag";
205 function = "gpio";
206 };
207 };
208
209 &bdinfo {
210 compatible = "nvmem-cells";
211 #address-cells = <1>;
212 #size-cells = <1>;
213
214 macaddr_bdinfo_de00: macaddr@de00 {
215 reg = <0xde00 0x6>;
216 };
217 };