ramips: increase SPI frequency for ELECOM WRC-GST devices
[openwrt/staging/zorun.git] / target / linux / ramips / dts / mt7621_elecom_wrc-gst.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 chosen {
18 bootargs = "console=ttyS0,57600";
19 };
20
21 leds {
22 compatible = "gpio-leds";
23
24 led_power_green: power_green {
25 label = "wrc-gst:green:power";
26 gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
27 };
28
29 power_blue {
30 label = "wrc-gst:blue:power";
31 gpios = <&gpio 8 GPIO_ACTIVE_HIGH>;
32 };
33
34 wps {
35 label = "wrc-gst:red:wps";
36 gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
37 };
38
39 power_red {
40 label = "wrc-gst:red:power";
41 gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
42 };
43 };
44
45 keys {
46 compatible = "gpio-keys";
47
48 reset {
49 label = "reset";
50 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
51 linux,code = <KEY_RESTART>;
52 };
53
54 wps {
55 label = "wps";
56 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
57 linux,code = <KEY_WPS_BUTTON>;
58 };
59
60 client {
61 label = "client";
62 gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
63 linux,code = <BTN_0>;
64 linux,input-type = <EV_SW>;
65 };
66
67 ap {
68 label = "ap";
69 gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
70 linux,code = <BTN_0>;
71 linux,input-type = <EV_SW>;
72 };
73
74 extender {
75 label = "extender";
76 gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
77 linux,code = <BTN_0>;
78 linux,input-type = <EV_SW>;
79 };
80
81 router {
82 label = "router";
83 gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
84 linux,code = <BTN_0>;
85 linux,input-type = <EV_SW>;
86 };
87 };
88 };
89
90 &gmac0 {
91 mtd-mac-address = <&factory 0xe000>;
92 };
93
94 &switch0 {
95 ports {
96 wan: port@0 {
97 status = "okay";
98 label = "wan";
99 mtd-mac-address = <&factory 0xe006>;
100 };
101
102 port@1 {
103 status = "okay";
104 label = "lan4";
105 };
106
107 port@2 {
108 status = "okay";
109 label = "lan3";
110 };
111
112 port@3 {
113 status = "okay";
114 label = "lan2";
115 };
116
117 port@4 {
118 status = "okay";
119 label = "lan1";
120 };
121 };
122 };
123
124 &spi0 {
125 status = "okay";
126
127 flash@0 {
128 compatible = "jedec,spi-nor";
129 reg = <0>;
130 spi-max-frequency = <40000000>;
131
132 partitions {
133 compatible = "fixed-partitions";
134 #address-cells = <1>;
135 #size-cells = <1>;
136
137 partition@0 {
138 label = "u-boot";
139 reg = <0x0 0x30000>;
140 read-only;
141 };
142
143 partition@30000 {
144 label = "u-boot-env";
145 reg = <0x30000 0x10000>;
146 read-only;
147 };
148
149 factory: partition@40000 {
150 label = "factory";
151 reg = <0x40000 0x10000>;
152 read-only;
153 };
154
155 partition@50000 {
156 compatible = "denx,uimage";
157 label = "firmware";
158 reg = <0x50000 0xb00000>;
159 };
160
161 partition@b50000 {
162 label = "tm_pattern";
163 reg = <0xb50000 0x380000>;
164 read-only;
165 };
166
167 partition@ed0000 {
168 label = "tm_key";
169 reg = <0xed0000 0x80000>;
170 read-only;
171 };
172
173 partition@f50000 {
174 label = "art_block";
175 reg = <0xf50000 0x30000>;
176 read-only;
177 };
178
179 partition@f80000 {
180 label = "user_data";
181 reg = <0xf80000 0x80000>;
182 read-only;
183 };
184 };
185 };
186 };
187
188 &state_default {
189 gpio {
190 groups = "uart3", "jtag", "wdt", "sdhci";
191 function = "gpio";
192 };
193 };
194
195 &pcie {
196 status = "okay";
197 /* WRC-xxxxGST has MT7615 for 2.4/5 GHz wifi, but it's not supported */
198 };
199
200 &xhci {
201 status = "disabled";
202 };