58e4bbf75741f0ff99bde6951e104fb62556144d
[openwrt/staging/hauke.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 label = "white:status";
30 color = <LED_COLOR_ID_WHITE>;
31 function = LED_FUNCTION_STATUS;
32 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
33 };
34 };
35
36 keys {
37 compatible = "gpio-keys";
38
39 led {
40 label = "led";
41 gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
42 linux,code = <KEY_LIGHTS_TOGGLE>;
43 };
44
45 reset {
46 label = "reset";
47 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
48 linux,code = <KEY_RESTART>;
49 };
50 };
51
52 gpio-export {
53 compatible = "gpio-export";
54
55 poe_passthrough {
56 gpio-export,name = "poe-passthrough";
57 gpio-export,output = <0>;
58 gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
59 };
60 };
61 };
62
63 &ethernet {
64 reg = <0x1e100000 0xe000>;
65 };
66
67 &spi0 {
68 status = "okay";
69
70 flash@0 {
71 compatible = "jedec,spi-nor";
72 reg = <0>;
73 spi-max-frequency = <20000000>;
74
75 partitions {
76 compatible = "fixed-partitions";
77 #address-cells = <1>;
78 #size-cells = <1>;
79
80 partition@0 {
81 label = "u-boot";
82 reg = <0x0 0x80000>;
83 read-only;
84 };
85
86 partition@80000 {
87 label = "partition-table";
88 reg = <0x80000 0x10000>;
89 read-only;
90 };
91
92 info: partition@90000 {
93 label = "product-info";
94 reg = <0x90000 0x10000>;
95 read-only;
96 };
97
98 partition@a0000 {
99 compatible = "denx,fit";
100 label = "firmware";
101 reg = <0xa0000 0xcf0000>;
102 };
103
104 partition@d90000 {
105 label = "user-config";
106 reg = <0xd90000 0x60000>;
107 read-only;
108 };
109
110 partition@f30000 {
111 label = "mutil-log";
112 reg = <0xf30000 0x80000>;
113 read-only;
114 };
115
116 partition@fb0000 {
117 label = "oops";
118 reg = <0xfb0000 0x40000>;
119 read-only;
120 };
121
122 radio: partition@ff0000 {
123 label = "radio";
124 reg = <0xff0000 0x10000>;
125 read-only;
126 };
127 };
128 };
129 };
130
131 &state_default {
132 gpio {
133 groups = "uart2", "uart3";
134 function = "gpio";
135 };
136 };
137
138 &pcie {
139 status = "okay";
140 };
141
142 &pcie1 {
143 wifi@0,0 {
144 compatible = "mediatek,mt76";
145 reg = <0x0000 0 0 0 0>;
146 mediatek,mtd-eeprom = <&radio 0x0>;
147 mediatek,disable-radar-background;
148 };
149 };
150
151 &gmac0 {
152 nvmem-cells = <&macaddr_info_8>;
153 nvmem-cell-names = "mac-address";
154 };
155
156 &gmac1 {
157 status = "okay";
158 label = "lan0";
159 phy-handle = <&ethphy0>;
160
161 nvmem-cells = <&macaddr_info_8>;
162 nvmem-cell-names = "mac-address";
163 };
164
165 &mdio {
166 ethphy0: ethernet-phy@0 {
167 reg = <0>;
168 };
169 };
170
171 &switch0 {
172 ports {
173 port@1 {
174 status = "okay";
175 label = "lan3";
176 };
177
178 port@2 {
179 status = "okay";
180 label = "lan2";
181 };
182
183 port@3 {
184 status = "okay";
185 label = "lan1";
186 };
187 };
188 };
189
190 &info {
191 compatible = "nvmem-cells";
192 #address-cells = <1>;
193 #size-cells = <1>;
194
195 macaddr_info_8: macaddr@8 {
196 reg = <0x8 0x6>;
197 };
198 };