af55d1058f6e0750b452b5d75c510e83f1b2ecd1
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_sercomm_na502.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "sercomm,na502", "mediatek,mt7621-soc";
10 model = "SERCOMM NA502";
11
12 aliases {
13 led-boot = &led_power;
14 led-failsafe = &led_power;
15 led-running = &led_power;
16 led-upgrade = &led_power;
17 };
18
19 leds {
20 compatible = "gpio-leds";
21
22 led_power: power {
23 label = "green:power";
24 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
25 };
26
27 internet {
28 label = "green:internet";
29 gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
30 };
31
32 wifi {
33 label = "green:wifi";
34 gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
35 linux,default-trigger = "phy0tpt";
36 };
37
38 zwave {
39 label = "green:zwave";
40 gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
41 };
42
43 service {
44 label = "green:service";
45 gpios = <&gpio 26 GPIO_ACTIVE_LOW>;
46 };
47
48 zigbee {
49 label = "green:zigbee";
50 gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
51 };
52
53 bluetooth {
54 label = "green:bluetooth";
55 gpios = <&gpio 25 GPIO_ACTIVE_LOW>;
56 };
57 };
58
59 keys {
60 compatible = "gpio-keys";
61
62 reset {
63 label = "reset";
64 gpios = <&gpio 28 GPIO_ACTIVE_LOW>;
65 linux,code = <KEY_RESTART>;
66 };
67
68 select {
69 label = "select";
70 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
71 linux,code = <BTN_0>;
72 };
73
74 sync {
75 label = "sync";
76 gpios = <&gpio 32 GPIO_ACTIVE_LOW>;
77 linux,code = <KEY_RFKILL>;
78 };
79 };
80
81 gpio-export {
82 compatible = "gpio-export";
83
84 zwave_reset {
85 gpio-export,name = "zwave_reset";
86 gpio-export,output = <1>;
87 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
88 };
89
90 zigbee_reset {
91 gpio-export,name = "zigbee_reset";
92 gpio-export,output = <1>;
93 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
94 };
95 };
96 };
97
98 &gmac0 {
99 mtd-mac-address = <&factory 0xe000>;
100 };
101
102 &nand {
103 status = "okay";
104
105 partitions {
106 compatible = "fixed-partitions";
107 #address-cells = <1>;
108 #size-cells = <1>;
109
110 partition@0 {
111 label = "u-boot";
112 reg = <0x0 0x80000>;
113 read-only;
114 };
115
116 partition@80000 {
117 label = "config";
118 reg = <0x80000 0x80000>;
119 read-only;
120 };
121
122 factory: partition@100000 {
123 label = "factory";
124 reg = <0x100000 0x40000>;
125 };
126
127 partition@140000 {
128 label = "kernel1";
129 reg = <0x140000 0x1400000>;
130 };
131
132 partition@1540000 {
133 label = "kernel";
134 reg = <0x1540000 0x400000>;
135 };
136
137 partition@1940000 {
138 label = "ubi";
139 reg = <0x1940000 0x1000000>;
140 };
141
142 partition@2940000 {
143 label = "user_storage";
144 reg = <0x2940000 0x100000>;
145 };
146
147 partition@2a40000 {
148 label = "data";
149 reg = <0x2a40000 0x1000000>;
150 };
151
152 partition@3a40000 {
153 label = "storage";
154 reg = <0x3a40000 0x3200000>;
155 };
156
157 partition@6c40000 {
158 label = "backup";
159 reg = <0x6c40000 0x1340000>;
160 };
161 };
162 };
163
164 &pcie {
165 status = "okay";
166 };
167
168 &pcie0 {
169 wifi@0,0 {
170 compatible = "mediatek,mt76";
171 reg = <0x0000 0 0 0 0>;
172 mediatek,mtd-eeprom = <&factory 0x8000>;
173 mtd-mac-address = <&factory 0xe000>;
174 mtd-mac-address-increment = <1>;
175 ieee80211-freq-limit = <5000000 6000000>;
176 };
177 };
178
179 &pcie1 {
180 wifi@0,0 {
181 compatible = "mediatek,mt76";
182 reg = <0x0 0 0 0 0>;
183 mediatek,mtd-eeprom = <&factory 0x0000>;
184 mtd-mac-address = <&factory 0xe000>;
185 mtd-mac-address-increment = <2>;
186 ieee80211-freq-limit = <2400000 2500000>;
187 };
188 };
189
190 &state_default {
191 gpio {
192 groups = "jtag", "rgmii2";
193 function = "gpio";
194 };
195 };
196
197 &switch0 {
198 ports {
199 port@4 {
200 status = "okay";
201 label = "lan";
202 };
203 };
204 };
205
206 &uartlite2 {
207 status = "okay";
208 };
209
210 &uartlite3 {
211 status = "okay";
212 };