ramips: add support for YunCore G720
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_elecom_wrc-gs.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 #include <dt-bindings/leds/common.h>
8
9 / {
10 aliases {
11 led-boot = &led_power_green;
12 led-failsafe = &led_power_green;
13 led-running = &led_power_green;
14 led-upgrade = &led_power_green;
15 label-mac-device = &gmac1;
16 };
17
18 leds: leds {
19 compatible = "gpio-leds";
20
21 led_power_green: power_green {
22 function = LED_FUNCTION_POWER;
23 color = <LED_COLOR_ID_GREEN>;
24 gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
25 };
26
27 power_blue {
28 function = LED_FUNCTION_POWER;
29 color = <LED_COLOR_ID_BLUE>;
30 gpios = <&gpio 8 GPIO_ACTIVE_HIGH>;
31 };
32
33 wps {
34 function = LED_FUNCTION_WPS;
35 color = <LED_COLOR_ID_RED>;
36 gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
37 };
38
39 power_red {
40 function = LED_FUNCTION_POWER;
41 color = <LED_COLOR_ID_RED>;
42 gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
43 };
44 };
45
46 keys {
47 compatible = "gpio-keys";
48
49 reset {
50 label = "reset";
51 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
52 linux,code = <KEY_RESTART>;
53 };
54
55 wps {
56 label = "wps";
57 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
58 linux,code = <KEY_WPS_BUTTON>;
59 };
60
61 client {
62 label = "client";
63 gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
64 linux,code = <BTN_0>;
65 linux,input-type = <EV_SW>;
66 };
67
68 ap {
69 label = "ap";
70 gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
71 linux,code = <BTN_0>;
72 linux,input-type = <EV_SW>;
73 };
74
75 extender {
76 label = "extender";
77 gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
78 linux,code = <BTN_0>;
79 linux,input-type = <EV_SW>;
80 };
81
82 router {
83 label = "router";
84 gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
85 linux,code = <BTN_0>;
86 linux,input-type = <EV_SW>;
87 };
88 };
89 };
90
91 &gmac1 {
92 status = "okay";
93 label = "wan";
94 phy-handle = <&ethphy0>;
95 };
96
97 &mdio {
98 ethphy0: ethernet-phy@0 {
99 reg = <0>;
100 };
101 };
102
103 &switch0 {
104 ports {
105 port@1 {
106 status = "okay";
107 label = "lan4";
108 };
109
110 port@2 {
111 status = "okay";
112 label = "lan3";
113 };
114
115 port@3 {
116 status = "okay";
117 label = "lan2";
118 };
119
120 port@4 {
121 status = "okay";
122 label = "lan1";
123 };
124 };
125 };
126
127 &spi0 {
128 status = "okay";
129
130 flash@0 {
131 compatible = "jedec,spi-nor";
132 reg = <0>;
133 spi-max-frequency = <40000000>;
134
135 partitions: partitions {
136 compatible = "fixed-partitions";
137 #address-cells = <1>;
138 #size-cells = <1>;
139
140 partition@0 {
141 label = "u-boot";
142 reg = <0x0 0x30000>;
143 read-only;
144 };
145
146 partition@30000 {
147 label = "u-boot-env";
148 reg = <0x30000 0x10000>;
149 read-only;
150 };
151
152 factory: partition@40000 {
153 label = "factory";
154 reg = <0x40000 0x10000>;
155 read-only;
156
157 nvmem-layout {
158 compatible = "fixed-layout";
159 #address-cells = <1>;
160 #size-cells = <1>;
161
162 eeprom_factory_0: eeprom@0 {
163 reg = <0x0 0x4da8>;
164 };
165
166 eeprom_factory_8000: eeprom@8000 {
167 reg = <0x8000 0x4da8>;
168 };
169 };
170 };
171 };
172 };
173 };
174
175 &pcie {
176 status = "okay";
177 };
178
179 &xhci {
180 status = "disabled";
181 };