rockchip: add Radxa CM3 IO board support
[openwrt/staging/jow.git] / target / linux / ramips / dts / mt7621_sercomm_s1500.dtsi
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 #include <dt-bindings/leds/common.h>
8
9 / {
10 aliases {
11 led-boot = &led_status;
12 led-running = &led_status;
13 led-upgrade = &led_wps;
14 led-failsafe = &led_wps;
15 };
16
17 keys {
18 compatible = "gpio-keys";
19
20 button-0 {
21 label = "reset";
22 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
23 linux,code = <KEY_RESTART>;
24 };
25
26 button-1 {
27 label = "wps";
28 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
29 linux,code = <KEY_WPS_BUTTON>;
30 };
31 };
32
33 leds {
34 compatible = "gpio-leds";
35
36 led-0 {
37 color = <LED_COLOR_ID_AMBER>;
38 function = LED_FUNCTION_LAN;
39 function-enumerator = <4>;
40 linux,default-trigger = "mt7530-0:00:1Gbps";
41 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
42 };
43
44 led-1 {
45 color = <LED_COLOR_ID_GREEN>;
46 function = LED_FUNCTION_LAN;
47 function-enumerator = <4>;
48 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
49 };
50
51 led-2 {
52 color = <LED_COLOR_ID_AMBER>;
53 function = LED_FUNCTION_LAN;
54 function-enumerator = <3>;
55 linux,default-trigger = "mt7530-0:01:1Gbps";
56 gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
57 };
58
59 led-3 {
60 color = <LED_COLOR_ID_GREEN>;
61 function = LED_FUNCTION_LAN;
62 function-enumerator = <3>;
63 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
64 };
65
66 led-4 {
67 color = <LED_COLOR_ID_AMBER>;
68 function = LED_FUNCTION_LAN;
69 function-enumerator = <2>;
70 linux,default-trigger = "mt7530-0:02:1Gbps";
71 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
72 };
73
74 led-5 {
75 color = <LED_COLOR_ID_AMBER>;
76 function = LED_FUNCTION_LAN;
77 function-enumerator = <1>;
78 linux,default-trigger = "mt7530-0:03:1Gbps";
79 gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
80 };
81
82 led-6 {
83 color = <LED_COLOR_ID_GREEN>;
84 function = LED_FUNCTION_LAN;
85 function-enumerator = <1>;
86 gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
87 };
88
89 led-7 {
90 color = <LED_COLOR_ID_AMBER>;
91 function = LED_FUNCTION_WAN;
92 linux,default-trigger = "mt7530-0:04:1Gbps";
93 gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
94 };
95
96 led-8 {
97 color = <LED_COLOR_ID_GREEN>;
98 function = LED_FUNCTION_WAN;
99 gpios = <&gpio 25 GPIO_ACTIVE_LOW>;
100 };
101
102 led-9 {
103 color = <LED_COLOR_ID_GREEN>;
104 function = LED_FUNCTION_LAN;
105 function-enumerator = <2>;
106 gpios = <&gpio 26 GPIO_ACTIVE_LOW>;
107 };
108
109 led-10 {
110 color = <LED_COLOR_ID_WHITE>;
111 function = LED_FUNCTION_WLAN;
112 function-enumerator = <24>;
113 linux,default-trigger = "phy1tpt";
114 gpios = <&gpio 28 GPIO_ACTIVE_LOW>;
115 };
116
117 led_wps: led-11 {
118 function = LED_FUNCTION_WPS;
119 gpios = <&gpio 29 GPIO_ACTIVE_LOW>;
120 panic-indicator;
121 };
122
123 led_status: led-12 {
124 color = <LED_COLOR_ID_WHITE>;
125 function = LED_FUNCTION_STATUS;
126 gpios = <&gpio 30 GPIO_ACTIVE_LOW>;
127 };
128
129 led-13 {
130 color = <LED_COLOR_ID_WHITE>;
131 function = LED_FUNCTION_WLAN;
132 function-enumerator = <50>;
133 linux,default-trigger = "phy0tpt";
134 gpios = <&gpio 32 GPIO_ACTIVE_LOW>;
135 };
136 };
137 };
138
139 &ethernet {
140 pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>;
141 };
142
143 &gmac0 {
144 nvmem-cells = <&macaddr_factory_1000 0>;
145 nvmem-cell-names = "mac-address";
146 };
147
148 &nand {
149 status = "okay";
150
151 partitions: partitions {
152 compatible = "fixed-partitions";
153 #address-cells = <1>;
154 #size-cells = <1>;
155
156 partition@0 {
157 label = "u-boot";
158 reg = <0x0 0x100000>;
159 read-only;
160 };
161
162 factory: partition@100000 {
163 label = "Factory";
164 reg = <0x100000 0x100000>;
165 read-only;
166
167 nvmem-layout {
168 compatible = "fixed-layout";
169 #address-cells = <1>;
170 #size-cells = <1>;
171
172 eeprom_factory_0: eeprom@0 {
173 reg = <0x0 0x200>;
174 };
175
176 eeprom_factory_8000: eeprom@8000 {
177 reg = <0x8000 0x200>;
178 };
179
180 macaddr_factory_1000: macaddr@1000 {
181 compatible = "mac-base";
182 reg = <0x1000 0x6>;
183 #nvmem-cell-cells = <1>;
184 };
185 };
186 };
187
188 partition@1600000 {
189 label = "boot_flag";
190 reg = <0x1600000 0x100000>;
191 };
192
193 partition@1700000 {
194 label = "kernel";
195 reg = <0x1700000 0x400000>;
196 };
197
198 partition@1b00000 {
199 label = "Kernel_2";
200 reg = <0x1b00000 0x400000>;
201 read-only;
202 };
203 };
204 };
205
206 &pcie {
207 status = "okay";
208
209 reset-gpios = <&gpio 8 GPIO_ACTIVE_LOW>,
210 <&gpio 19 GPIO_ACTIVE_LOW>;
211 };
212
213 &pcie0 {
214 wifi@0,0 {
215 compatible = "mediatek,mt76";
216 reg = <0x0000 0 0 0 0>;
217 ieee80211-freq-limit = <5000000 6000000>;
218
219 nvmem-cells = <&eeprom_factory_8000>, <&macaddr_factory_1000 2>;
220 nvmem-cell-names = "eeprom", "mac-address";
221 };
222 };
223
224 &state_default {
225 gpio {
226 groups = "wdt", "uart3", "jtag", "uart2", "i2c", "rgmii2";
227 function = "gpio";
228 };
229 };
230
231 &switch0 {
232 ports {
233 port@0 {
234 status = "okay";
235 label = "lan4";
236 };
237
238 port@1 {
239 status = "okay";
240 label = "lan3";
241 };
242
243 port@2 {
244 status = "okay";
245 label = "lan2";
246 };
247
248 port@3 {
249 status = "okay";
250 label = "lan1";
251 };
252
253 wan: port@4 {
254 status = "okay";
255 label = "wan";
256
257 nvmem-cells = <&macaddr_factory_1000 1>;
258 nvmem-cell-names = "mac-address";
259 };
260 };
261 };