2c60f3d8b6b9b445f1e6a058d55ce51444cf2880
[openwrt/staging/jow.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
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 = &gmac1;
15 };
16
17 leds: leds {
18 compatible = "gpio-leds";
19
20 led_power_green: power_green {
21 label = "green:power";
22 gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
23 };
24
25 power_blue {
26 label = "blue:power";
27 gpios = <&gpio 8 GPIO_ACTIVE_HIGH>;
28 };
29
30 wps {
31 label = "red:wps";
32 gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
33 };
34
35 power_red {
36 label = "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 &gmac1 {
87 status = "okay";
88 label = "wan";
89 phy-handle = <&ethphy0>;
90 };
91
92 &mdio {
93 ethphy0: ethernet-phy@0 {
94 reg = <0>;
95 };
96 };
97
98 &switch0 {
99 ports {
100 port@1 {
101 status = "okay";
102 label = "lan4";
103 };
104
105 port@2 {
106 status = "okay";
107 label = "lan3";
108 };
109
110 port@3 {
111 status = "okay";
112 label = "lan2";
113 };
114
115 port@4 {
116 status = "okay";
117 label = "lan1";
118 };
119 };
120 };
121
122 &spi0 {
123 status = "okay";
124
125 flash@0 {
126 compatible = "jedec,spi-nor";
127 reg = <0>;
128 spi-max-frequency = <40000000>;
129
130 partitions: partitions {
131 compatible = "fixed-partitions";
132 #address-cells = <1>;
133 #size-cells = <1>;
134
135 partition@0 {
136 label = "u-boot";
137 reg = <0x0 0x30000>;
138 read-only;
139 };
140
141 partition@30000 {
142 label = "u-boot-env";
143 reg = <0x30000 0x10000>;
144 read-only;
145 };
146
147 factory: partition@40000 {
148 compatible = "nvmem-cells";
149 label = "factory";
150 reg = <0x40000 0x10000>;
151 #address-cells = <1>;
152 #size-cells = <1>;
153 read-only;
154
155 eeprom_factory_0: eeprom@0 {
156 reg = <0x0 0x4da8>;
157 };
158
159 eeprom_factory_8000: eeprom@8000 {
160 reg = <0x8000 0x4da8>;
161 };
162 };
163 };
164 };
165 };
166
167 &pcie {
168 status = "okay";
169 };
170
171 &xhci {
172 status = "disabled";
173 };