ramips: move redundant console setup to mt7621 SoC DTSI
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / mt7621_elecom_wrc-gs.dtsi
1 // SPDX-License-Identifier: GPL-2.0
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 aliases {
10 led-boot = &led_power_green;
11 led-failsafe = &led_power_green;
12 led-running = &led_power_green;
13 led-upgrade = &led_power_green;
14 label-mac-device = &wan;
15 };
16
17 leds {
18 compatible = "gpio-leds";
19
20 led_power_green: power_green {
21 label = "wrc-gst:green:power";
22 gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
23 };
24
25 power_blue {
26 label = "wrc-gst:blue:power";
27 gpios = <&gpio 8 GPIO_ACTIVE_HIGH>;
28 };
29
30 wps {
31 label = "wrc-gst:red:wps";
32 gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
33 };
34
35 power_red {
36 label = "wrc-gst:red:power";
37 gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
38 };
39 };
40
41 keys {
42 compatible = "gpio-keys";
43
44 reset {
45 label = "reset";
46 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
47 linux,code = <KEY_RESTART>;
48 };
49
50 wps {
51 label = "wps";
52 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
53 linux,code = <KEY_WPS_BUTTON>;
54 };
55
56 client {
57 label = "client";
58 gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
59 linux,code = <BTN_0>;
60 linux,input-type = <EV_SW>;
61 };
62
63 ap {
64 label = "ap";
65 gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
66 linux,code = <BTN_0>;
67 linux,input-type = <EV_SW>;
68 };
69
70 extender {
71 label = "extender";
72 gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
73 linux,code = <BTN_0>;
74 linux,input-type = <EV_SW>;
75 };
76
77 router {
78 label = "router";
79 gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
80 linux,code = <BTN_0>;
81 linux,input-type = <EV_SW>;
82 };
83 };
84 };
85
86 &gmac0 {
87 mtd-mac-address = <&factory 0xe000>;
88 };
89
90 &switch0 {
91 ports {
92 wan: port@0 {
93 status = "okay";
94 label = "wan";
95 mtd-mac-address = <&factory 0xe006>;
96 };
97
98 port@1 {
99 status = "okay";
100 label = "lan4";
101 };
102
103 port@2 {
104 status = "okay";
105 label = "lan3";
106 };
107
108 port@3 {
109 status = "okay";
110 label = "lan2";
111 };
112
113 port@4 {
114 status = "okay";
115 label = "lan1";
116 };
117 };
118 };
119
120 &spi0 {
121 status = "okay";
122
123 flash@0 {
124 compatible = "jedec,spi-nor";
125 reg = <0>;
126 spi-max-frequency = <40000000>;
127
128 partitions: partitions {
129 compatible = "fixed-partitions";
130 #address-cells = <1>;
131 #size-cells = <1>;
132
133 partition@0 {
134 label = "u-boot";
135 reg = <0x0 0x30000>;
136 read-only;
137 };
138
139 partition@30000 {
140 label = "u-boot-env";
141 reg = <0x30000 0x10000>;
142 read-only;
143 };
144
145 factory: partition@40000 {
146 label = "factory";
147 reg = <0x40000 0x10000>;
148 read-only;
149 };
150 };
151 };
152 };
153
154 &state_default {
155 gpio {
156 groups = "uart3", "jtag", "wdt", "sdhci";
157 function = "gpio";
158 };
159 };
160
161 &pcie {
162 status = "okay";
163 };
164
165 &pcie0 {
166 wifi@0,0 {
167 compatible = "mediatek,mt76";
168 reg = <0x0000 0 0 0 0>;
169 mediatek,mtd-eeprom = <&factory 0x0000>;
170 ieee80211-freq-limit = <2400000 2500000>;
171
172 led {
173 led-sources = <0>;
174 led-active-low;
175 };
176 };
177 };
178
179 &pcie1 {
180 wifi@0,0 {
181 compatible = "mediatek,mt76";
182 reg = <0x0000 0 0 0 0>;
183 mediatek,mtd-eeprom = <&factory 0x8000>;
184 ieee80211-freq-limit = <5000000 6000000>;
185
186 led {
187 led-sources = <0>;
188 led-active-low;
189 };
190 };
191 };
192
193 &xhci {
194 status = "disabled";
195 };