ramips: clean and improve MAC address setup in 02_network
[oweals/openwrt.git] / target / linux / ramips / dts / mt7621_elecom_wrc-gst.dtsi
1 // SPDX-License-Identifier: GPL-2.0
2 /dts-v1/;
3
4 #include "mt7621.dtsi"
5
6 #include <dt-bindings/gpio/gpio.h>
7 #include <dt-bindings/input/input.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         };
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 = <&gpio0 7 GPIO_ACTIVE_HIGH>;
27                 };
28
29                 power_blue {
30                         label = "wrc-gst:blue:power";
31                         gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
32                 };
33
34                 wps {
35                         label = "wrc-gst:red:wps";
36                         gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
37                 };
38
39                 power_red {
40                         label = "wrc-gst:red:power";
41                         gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>;
42                 };
43         };
44
45         keys {
46                 compatible = "gpio-keys-polled";
47                 poll-interval = <20>;
48
49                 reset {
50                         label = "reset";
51                         gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
52                         linux,code = <KEY_RESTART>;
53                 };
54
55                 wps {
56                         label = "wps";
57                         gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
58                         linux,code = <KEY_WPS_BUTTON>;
59                 };
60
61                 client {
62                         label = "client";
63                         gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
64                         linux,code = <BTN_0>;
65                         linux,input-type = <EV_SW>;
66                 };
67
68                 ap {
69                         label = "ap";
70                         gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
71                         linux,code = <BTN_0>;
72                         linux,input-type = <EV_SW>;
73                 };
74
75                 extender {
76                         label = "extender";
77                         gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
78                         linux,code = <BTN_0>;
79                         linux,input-type = <EV_SW>;
80                 };
81
82                 router {
83                         label = "router";
84                         gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
85                         linux,code = <BTN_0>;
86                         linux,input-type = <EV_SW>;
87                 };
88         };
89 };
90
91 &ethernet {
92         mtd-mac-address = <&factory 0xe000>;
93 };
94
95 &spi0 {
96         status = "okay";
97
98         m25p80@0 {
99                 compatible = "jedec,spi-nor";
100                 reg = <0>;
101                 spi-max-frequency = <10000000>;
102
103                 partitions {
104                         compatible = "fixed-partitions";
105                         #address-cells = <1>;
106                         #size-cells = <1>;
107
108                         partition@0 {
109                                 label = "u-boot";
110                                 reg = <0x0 0x30000>;
111                                 read-only;
112                         };
113
114                         partition@30000 {
115                                 label = "u-boot-env";
116                                 reg = <0x30000 0x10000>;
117                                 read-only;
118                         };
119
120                         factory: partition@40000 {
121                                 label = "factory";
122                                 reg = <0x40000 0x10000>;
123                                 read-only;
124                         };
125
126                         partition@50000 {
127                                 compatible = "denx,uimage";
128                                 label = "firmware";
129                                 reg = <0x50000 0xb00000>;
130                         };
131
132                         partition@b50000 {
133                                 label = "tm_pattern";
134                                 reg = <0xb50000 0x380000>;
135                                 read-only;
136                         };
137
138                         partition@ed0000 {
139                                 label = "tm_key";
140                                 reg = <0xed0000 0x80000>;
141                                 read-only;
142                         };
143
144                         partition@f50000 {
145                                 label = "art_block";
146                                 reg = <0xf50000 0x30000>;
147                                 read-only;
148                         };
149
150                         partition@f80000 {
151                                 label = "user_data";
152                                 reg = <0xf80000 0x80000>;
153                                 read-only;
154                         };
155                 };
156         };
157 };
158
159 &pinctrl {
160         state_default: pinctrl0 {
161                 gpio {
162                         ralink,group = "uart3", "jtag", "wdt", "sdhci";
163                         ralink,function = "gpio";
164                 };
165         };
166 };
167
168 &pcie {
169         status = "okay";
170         /* WRC-xxxxGST has MT7615 for 2.4/5 GHz wifi, but it's not supported */
171 };
172
173 &xhci {
174         status = "disabled";
175 };