3ed8bc55e952973b3dfe1e16ecc481a381cae79c
[openwrt/staging/mkresin.git] / target / linux / ramips / dts / mt7621_netgear_sercomm_bzv.dtsi
1 // SPDX-License-Identifier: GPL-2.0-only
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "mediatek,mt7621-soc";
10
11 aliases {
12 label-mac-device = &gmac0;
13 led-boot = &led_power_white;
14 led-failsafe = &led_power_orange;
15 led-running = &led_power_white;
16 led-upgrade = &led_power_orange;
17 };
18
19 keys {
20 compatible = "gpio-keys";
21
22 wps {
23 label = "wps";
24 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
25 linux,code = <KEY_WPS_BUTTON>;
26 };
27
28 rfkill {
29 label = "rfkill";
30 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
31 linux,code = <KEY_RFKILL>;
32 };
33
34 reset {
35 label = "reset";
36 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
37 linux,code = <KEY_RESTART>;
38 };
39 };
40
41 leds: leds {
42 compatible = "gpio-leds";
43
44 led_power_orange: power_orange {
45 gpios = <&gpio_expander 0 GPIO_ACTIVE_LOW>;
46 label = "orange:power";
47 };
48
49 led_power_white: power_white {
50 gpios = <&gpio_expander 1 GPIO_ACTIVE_LOW>;
51 label = "white:power";
52 };
53
54 wan_orange {
55 gpios = <&gpio_expander 2 GPIO_ACTIVE_LOW>;
56 label = "orange:wan";
57 };
58
59 wan_white {
60 gpios = <&gpio_expander 3 GPIO_ACTIVE_LOW>;
61 label = "white:wan";
62 };
63
64 wlan2g {
65 gpios = <&gpio_expander 4 GPIO_ACTIVE_LOW>;
66 label = "white:wlan2g";
67 linux,default-trigger = "phy0radio";
68 };
69
70 wlan5g {
71 gpios = <&gpio_expander 5 GPIO_ACTIVE_LOW>;
72 label = "white:wlan5g";
73 linux,default-trigger = "phy1radio";
74 };
75
76 usb3 {
77 gpios = <&gpio_expander 7 GPIO_ACTIVE_LOW>;
78 label = "white:usb3";
79 linux,default-trigger = "usbport";
80 trigger-sources = <&xhci_ehci_port1>;
81 };
82
83 lan1_orange {
84 gpios = <&gpio_expander 8 GPIO_ACTIVE_LOW>;
85 label = "orange:lan1";
86 };
87
88 lan1_white {
89 gpios = <&gpio_expander 9 GPIO_ACTIVE_LOW>;
90 label = "white:lan1";
91 };
92
93 lan2_orange {
94 gpios = <&gpio_expander 10 GPIO_ACTIVE_LOW>;
95 label = "orange:lan2";
96 };
97
98 lan2_white {
99 gpios = <&gpio_expander 11 GPIO_ACTIVE_LOW>;
100 label = "white:lan2";
101 };
102
103 lan3_orange {
104 gpios = <&gpio_expander 12 GPIO_ACTIVE_LOW>;
105 label = "orange:lan3";
106 };
107
108 lan3_white {
109 gpios = <&gpio_expander 13 GPIO_ACTIVE_LOW>;
110 label = "white:lan3";
111 };
112
113 lan4_orange {
114 gpios = <&gpio_expander 14 GPIO_ACTIVE_LOW>;
115 label = "orange:lan4";
116 };
117
118 lan4_white {
119 gpios = <&gpio_expander 15 GPIO_ACTIVE_LOW>;
120 label = "white:lan4";
121 };
122
123 wps {
124 gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
125 label = "white:wps";
126 };
127
128 wlan {
129 gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
130 label = "white:wlan";
131 };
132 };
133 };
134
135 &state_default {
136 gpio {
137 groups = "uart3", "uart2", "jtag", "wdt";
138 function = "gpio";
139 };
140 };
141
142 &pcie {
143 status = "okay";
144 };
145
146 &pcie0 {
147 wifi@0,0 {
148 compatible = "mediatek,mt76";
149 reg = <0x0 0 0 0 0>;
150 mediatek,mtd-eeprom = <&factory 0x0>;
151 ieee80211-freq-limit = <2400000 2500000>;
152 };
153 };
154
155 &pcie1 {
156 wifi@0,0 {
157 compatible = "mediatek,mt76";
158 reg = <0x0 0 0 0 0>;
159 mediatek,mtd-eeprom = <&factory 0x8000>;
160 ieee80211-freq-limit = <5000000 6000000>;
161 };
162 };
163
164 &gmac0 {
165 mtd-mac-address = <&factory 0x4>;
166 };
167
168 &switch0 {
169 ports {
170 port@0 {
171 status = "okay";
172 label = "lan4";
173 };
174
175 port@1 {
176 status = "okay";
177 label = "lan3";
178 };
179
180 port@2 {
181 status = "okay";
182 label = "lan2";
183 };
184
185 port@3 {
186 status = "okay";
187 label = "lan1";
188 };
189
190 port@4 {
191 status = "okay";
192 label = "wan";
193 mtd-mac-address = <&factory 0x4>;
194 mac-address-increment = <2>;
195 };
196 };
197 };
198
199 &i2c {
200 status = "okay";
201
202 gpio_expander: i2c0gpio-expander@20{
203 #gpio-cells = <2>;
204 #interrupt-cells = <2>;
205 compatible = "semtech,sx1503q";
206 reg = <0x20>;
207
208 gpio-controller;
209 };
210 };
211
212 &nand {
213 status = "okay";
214
215 partitions {
216 compatible = "fixed-partitions";
217 #address-cells = <1>;
218 #size-cells = <1>;
219
220 partition@0 {
221 label = "u-boot";
222 reg = <0x0 0x100000>;
223 read-only;
224 };
225
226 partition@100000 {
227 label = "SC PART_MAP";
228 reg = <0x100000 0x100000>;
229 read-only;
230 };
231
232 partition@200000 {
233 label = "kernel";
234 reg = <0x200000 0x400000>;
235 };
236
237 partition@600000 {
238 label = "ubi";
239 reg = <0x600000 0x2800000>;
240 };
241
242 partition@2e00000 {
243 label = "reserved0";
244 reg = <0x2e00000 0x1800000>;
245 read-only;
246 };
247
248 factory: partition@4600000 {
249 label = "factory";
250 reg = <0x4600000 0x200000>;
251 read-only;
252 };
253
254 partition@4800000 {
255 label = "reserved1";
256 reg = <0x4800000 0x3800000>;
257 read-only;
258 };
259 };
260 };