7fe0258223b8cd0b7ab77bdea21a4a5bd5a59370
[openwrt/staging/hauke.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 &ethernet {
99 pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>;
100 };
101
102 &gmac0 {
103 nvmem-cells = <&macaddr_factory_e000>;
104 nvmem-cell-names = "mac-address";
105 };
106
107 &nand {
108 status = "okay";
109
110 partitions {
111 compatible = "fixed-partitions";
112 #address-cells = <1>;
113 #size-cells = <1>;
114
115 partition@0 {
116 label = "u-boot";
117 reg = <0x0 0x80000>;
118 read-only;
119 };
120
121 partition@80000 {
122 label = "config";
123 reg = <0x80000 0x80000>;
124 read-only;
125 };
126
127 factory: partition@100000 {
128 compatible = "nvmem-cells";
129 label = "factory";
130 reg = <0x100000 0x40000>;
131 #address-cells = <1>;
132 #size-cells = <1>;
133
134 eeprom_factory_0: eeprom@0 {
135 reg = <0x0 0x400>;
136 };
137
138 eeprom_factory_8000: eeprom@8000 {
139 reg = <0x8000 0x200>;
140 };
141
142 macaddr_factory_e000: macaddr@e000 {
143 reg = <0xe000 0x6>;
144 };
145 };
146
147 partition@140000 {
148 label = "kernel1";
149 reg = <0x140000 0x1400000>;
150 };
151
152 partition@1540000 {
153 label = "kernel";
154 reg = <0x1540000 0x400000>;
155 };
156
157 partition@1940000 {
158 label = "ubi";
159 reg = <0x1940000 0x1000000>;
160 };
161
162 partition@2940000 {
163 label = "user_storage";
164 reg = <0x2940000 0x100000>;
165 };
166
167 partition@2a40000 {
168 label = "data";
169 reg = <0x2a40000 0x1000000>;
170 };
171
172 partition@3a40000 {
173 label = "storage";
174 reg = <0x3a40000 0x3200000>;
175 };
176
177 partition@6c40000 {
178 label = "backup";
179 reg = <0x6c40000 0x1340000>;
180 };
181 };
182 };
183
184 &pcie {
185 status = "okay";
186 };
187
188 &pcie0 {
189 wifi@0,0 {
190 compatible = "mediatek,mt76";
191 reg = <0x0000 0 0 0 0>;
192 nvmem-cells = <&eeprom_factory_8000>, <&macaddr_factory_e000>;
193 nvmem-cell-names = "eeprom", "mac-address";
194 mac-address-increment = <1>;
195 ieee80211-freq-limit = <5000000 6000000>;
196 };
197 };
198
199 &pcie1 {
200 wifi@0,0 {
201 compatible = "mediatek,mt76";
202 reg = <0x0 0 0 0 0>;
203 nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_e000>;
204 nvmem-cell-names = "eeprom", "mac-address";
205 mac-address-increment = <2>;
206 ieee80211-freq-limit = <2400000 2500000>;
207 };
208 };
209
210 &state_default {
211 gpio {
212 groups = "jtag", "rgmii2";
213 function = "gpio";
214 };
215 };
216
217 &switch0 {
218 ports {
219 port@4 {
220 status = "okay";
221 label = "lan";
222 };
223 };
224 };
225
226 &uartlite2 {
227 status = "okay";
228 };
229
230 &uartlite3 {
231 status = "okay";
232 };