ramips: mt7621-dts: describe switch PHYs and adjust PHY muxing
[openwrt/staging/pepe2k.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 &ethphy0 {
98 /delete-property/ interrupts;
99 };
100
101 &switch0 {
102 ports {
103 port@1 {
104 status = "okay";
105 label = "lan4";
106 };
107
108 port@2 {
109 status = "okay";
110 label = "lan3";
111 };
112
113 port@3 {
114 status = "okay";
115 label = "lan2";
116 };
117
118 port@4 {
119 status = "okay";
120 label = "lan1";
121 };
122 };
123 };
124
125 &spi0 {
126 status = "okay";
127
128 flash@0 {
129 compatible = "jedec,spi-nor";
130 reg = <0>;
131 spi-max-frequency = <40000000>;
132
133 partitions: partitions {
134 compatible = "fixed-partitions";
135 #address-cells = <1>;
136 #size-cells = <1>;
137
138 partition@0 {
139 label = "u-boot";
140 reg = <0x0 0x30000>;
141 read-only;
142 };
143
144 partition@30000 {
145 label = "u-boot-env";
146 reg = <0x30000 0x10000>;
147 read-only;
148 };
149
150 factory: partition@40000 {
151 label = "factory";
152 reg = <0x40000 0x10000>;
153 read-only;
154
155 nvmem-layout {
156 compatible = "fixed-layout";
157 #address-cells = <1>;
158 #size-cells = <1>;
159
160 eeprom_factory_0: eeprom@0 {
161 reg = <0x0 0x4da8>;
162 };
163
164 eeprom_factory_8000: eeprom@8000 {
165 reg = <0x8000 0x4da8>;
166 };
167 };
168 };
169 };
170 };
171 };
172
173 &pcie {
174 status = "okay";
175 };
176
177 &xhci {
178 status = "disabled";
179 };