rootfs: fix USE_APK detection
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_linksys_e7350.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 #include <dt-bindings/leds/common.h>
8
9 / {
10 compatible = "linksys,e7350", "mediatek,mt7621-soc";
11 model = "Linksys E7350";
12
13 aliases {
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 keys {
25 compatible = "gpio-keys";
26
27 reset {
28 label = "reset";
29 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
30 linux,code = <KEY_RESTART>;
31 };
32
33 wps {
34 label = "wps";
35 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
36 linux,code = <KEY_WPS_BUTTON>;
37 };
38 };
39
40 leds {
41 compatible = "gpio-leds";
42
43 led-wps {
44 color = <LED_COLOR_ID_AMBER>;
45 function = LED_FUNCTION_WPS;
46 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
47 };
48
49 led_power: led-power {
50 label = "blue:power";
51 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
52 default-state = "on";
53 };
54
55 led-wan {
56 color = <LED_COLOR_ID_AMBER>;
57 function = LED_FUNCTION_WAN;
58 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
59 };
60
61 led-wan2 {
62 color = <LED_COLOR_ID_BLUE>;
63 function = LED_FUNCTION_WAN;
64 gpios = <&switch0 0 GPIO_ACTIVE_LOW>;
65 };
66
67 led-lan4 {
68 color = <LED_COLOR_ID_BLUE>;
69 function = LED_FUNCTION_LAN;
70 function-enumerator = <4>;
71 gpios = <&switch0 3 GPIO_ACTIVE_LOW>;
72 };
73
74 led-lan3 {
75 color = <LED_COLOR_ID_BLUE>;
76 function = LED_FUNCTION_LAN;
77 function-enumerator = <3>;
78 gpios = <&switch0 6 GPIO_ACTIVE_LOW>;
79 };
80
81 led-lan2 {
82 color = <LED_COLOR_ID_BLUE>;
83 function = LED_FUNCTION_LAN;
84 function-enumerator = <2>;
85 gpios = <&switch0 9 GPIO_ACTIVE_HIGH>;
86 };
87
88 led-lan1 {
89 color = <LED_COLOR_ID_BLUE>;
90 function = LED_FUNCTION_LAN;
91 function-enumerator = <1>;
92 gpios = <&switch0 12 GPIO_ACTIVE_LOW>;
93 };
94 };
95 };
96
97 &nand {
98 status = "okay";
99
100 partitions {
101 compatible = "fixed-partitions";
102 #address-cells = <1>;
103 #size-cells = <1>;
104
105 partition@0 {
106 label = "Boot";
107 reg = <0x0 0x80000>;
108 read-only;
109 };
110
111 partition@80000 {
112 label = "Config";
113 reg = <0x80000 0x80000>;
114 };
115
116 factory: partition@100000 {
117 label = "Factory";
118 reg = <0x100000 0x80000>;
119 read-only;
120 };
121
122 partition@180000 {
123 label = "firmware";
124 reg = <0x180000 0x3000000>;
125
126 compatible = "fixed-partitions";
127 #address-cells = <1>;
128 #size-cells = <1>;
129
130 partition@0 {
131 label = "kernel";
132 reg = <0x0 0x400000>;
133 };
134
135 partition@400000 {
136 label = "ubi";
137 reg = <0x400000 0x2c00000>;
138 };
139 };
140
141 partition@3180000 {
142 label = "alt_firmware";
143 reg = <0x3180000 0x3000000>;
144 read-only;
145 };
146
147 partition@6180000 {
148 label = "cbtinfo";
149 reg = <0x6180000 0x80000>;
150 read-only;
151 };
152 /* seems to be the end here. Can't read past 0x6200000 */
153 };
154 };
155
156 &pcie {
157 status = "okay";
158 };
159
160 &pcie1 {
161 wifi@0,0 {
162 compatible = "mediatek,mt76";
163 reg = <0x0000 0 0 0 0>;
164 mediatek,mtd-eeprom = <&factory 0x0000>;
165 };
166 };
167
168 &state_default {
169 gpio {
170 groups = "i2c", "uart3", "jtag", "wdt";
171 function = "gpio";
172 };
173 };
174
175 &gmac1 {
176 status = "okay";
177 label = "wan";
178 phy-handle = <&ethphy0>;
179 };
180
181 &mdio {
182 ethphy0: ethernet-phy@0 {
183 reg = <0>;
184 };
185 };
186
187 &switch0 {
188 gpio-controller;
189 #gpio-cells = <2>;
190
191 ports {
192 port@1 {
193 status = "okay";
194 label = "lan4";
195 };
196
197 port@2 {
198 status = "okay";
199 label = "lan3";
200 };
201
202 port@3 {
203 status = "okay";
204 label = "lan2";
205 };
206
207 port@4 {
208 status = "okay";
209 label = "lan1";
210 };
211 };
212 };