ramips: mt7621-dts: describe switch PHYs and adjust PHY muxing
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_tplink_eap615-wall-v1.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later
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 compatible = "tplink,eap615-wall-v1", "mediatek,mt7621-soc";
11 model = "TP-Link EAP615-Wall v1";
12
13 aliases {
14 label-mac-device = &gmac0;
15 led-boot = &led_status;
16 led-failsafe = &led_status;
17 led-running = &led_status;
18 led-upgrade = &led_status;
19 };
20
21 chosen {
22 bootargs = "console=ttyS0,115200";
23 };
24
25 leds {
26 compatible = "gpio-leds";
27
28 led_status: status {
29 color = <LED_COLOR_ID_WHITE>;
30 function = LED_FUNCTION_STATUS;
31 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
32 };
33 };
34
35 keys {
36 compatible = "gpio-keys";
37
38 led {
39 label = "led";
40 gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
41 linux,code = <KEY_LIGHTS_TOGGLE>;
42 };
43
44 reset {
45 label = "reset";
46 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
47 linux,code = <KEY_RESTART>;
48 };
49 };
50
51 gpio-export {
52 compatible = "gpio-export";
53
54 poe_passthrough {
55 gpio-export,name = "poe-passthrough";
56 gpio-export,output = <0>;
57 gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
58 };
59 };
60 };
61
62 &ethernet {
63 reg = <0x1e100000 0xe000>;
64 };
65
66 &spi0 {
67 status = "okay";
68
69 flash@0 {
70 compatible = "jedec,spi-nor";
71 reg = <0>;
72 spi-max-frequency = <20000000>;
73
74 partitions {
75 compatible = "fixed-partitions";
76 #address-cells = <1>;
77 #size-cells = <1>;
78
79 partition@0 {
80 label = "u-boot";
81 reg = <0x0 0x80000>;
82 read-only;
83 };
84
85 partition@80000 {
86 label = "partition-table";
87 reg = <0x80000 0x10000>;
88 read-only;
89 };
90
91 partition@90000 {
92 label = "product-info";
93 reg = <0x90000 0x10000>;
94 read-only;
95
96 nvmem-layout {
97 compatible = "fixed-layout";
98 #address-cells = <1>;
99 #size-cells = <1>;
100
101 macaddr_info_8: macaddr@8 {
102 reg = <0x8 0x6>;
103 };
104 };
105 };
106
107 partition@a0000 {
108 compatible = "denx,fit";
109 label = "firmware";
110 reg = <0xa0000 0xcf0000>;
111 };
112
113 partition@d90000 {
114 label = "user-config";
115 reg = <0xd90000 0x60000>;
116 read-only;
117 };
118
119 partition@f30000 {
120 label = "mutil-log";
121 reg = <0xf30000 0x80000>;
122 read-only;
123 };
124
125 partition@fb0000 {
126 label = "oops";
127 reg = <0xfb0000 0x40000>;
128 read-only;
129 };
130
131 partition@ff0000 {
132 label = "radio";
133 reg = <0xff0000 0x10000>;
134 read-only;
135
136 nvmem-layout {
137 compatible = "fixed-layout";
138 #address-cells = <1>;
139 #size-cells = <1>;
140
141 eeprom_radio_0: eeprom@0 {
142 reg = <0x0 0xe00>;
143 };
144 };
145 };
146 };
147 };
148 };
149
150 &state_default {
151 gpio {
152 groups = "uart2", "uart3";
153 function = "gpio";
154 };
155 };
156
157 &pcie {
158 status = "okay";
159 };
160
161 &pcie1 {
162 wifi@0,0 {
163 compatible = "mediatek,mt76";
164 reg = <0x0000 0 0 0 0>;
165 nvmem-cells = <&eeprom_radio_0>;
166 nvmem-cell-names = "eeprom";
167 mediatek,disable-radar-background;
168 };
169 };
170
171 &gmac0 {
172 nvmem-cells = <&macaddr_info_8>;
173 nvmem-cell-names = "mac-address";
174 };
175
176 &gmac1 {
177 status = "okay";
178 label = "lan0";
179 phy-handle = <&ethphy0>;
180
181 nvmem-cells = <&macaddr_info_8>;
182 nvmem-cell-names = "mac-address";
183 };
184
185 &ethphy0 {
186 /delete-property/ interrupts;
187 };
188
189 &switch0 {
190 ports {
191 port@1 {
192 status = "okay";
193 label = "lan3";
194 };
195
196 port@2 {
197 status = "okay";
198 label = "lan2";
199 };
200
201 port@3 {
202 status = "okay";
203 label = "lan1";
204 };
205 };
206 };