ramips: convert MT7915 EEPROM to NVMEM format
[openwrt/staging/nbd.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 compatible = "nvmem-cells";
94 label = "product-info";
95 reg = <0x90000 0x10000>;
96 #address-cells = <1>;
97 #size-cells = <1>;
98 read-only;
99
100 macaddr_info_8: macaddr@8 {
101 reg = <0x8 0x6>;
102 };
103 };
104
105 partition@a0000 {
106 compatible = "denx,fit";
107 label = "firmware";
108 reg = <0xa0000 0xcf0000>;
109 };
110
111 partition@d90000 {
112 label = "user-config";
113 reg = <0xd90000 0x60000>;
114 read-only;
115 };
116
117 partition@f30000 {
118 label = "mutil-log";
119 reg = <0xf30000 0x80000>;
120 read-only;
121 };
122
123 partition@fb0000 {
124 label = "oops";
125 reg = <0xfb0000 0x40000>;
126 read-only;
127 };
128
129 radio: partition@ff0000 {
130 compatible = "nvmem-cells";
131 label = "radio";
132 reg = <0xff0000 0x10000>;
133 #address-cells = <1>;
134 #size-cells = <1>;
135 read-only;
136
137 eeprom_radio_0: eeprom@0 {
138 reg = <0x0 0xe00>;
139 };
140 };
141 };
142 };
143 };
144
145 &state_default {
146 gpio {
147 groups = "uart2", "uart3";
148 function = "gpio";
149 };
150 };
151
152 &pcie {
153 status = "okay";
154 };
155
156 &pcie1 {
157 wifi@0,0 {
158 compatible = "mediatek,mt76";
159 reg = <0x0000 0 0 0 0>;
160 nvmem-cells = <&eeprom_radio_0>;
161 nvmem-cell-names = "eeprom";
162 mediatek,disable-radar-background;
163 };
164 };
165
166 &gmac0 {
167 nvmem-cells = <&macaddr_info_8>;
168 nvmem-cell-names = "mac-address";
169 };
170
171 &gmac1 {
172 status = "okay";
173 label = "lan0";
174 phy-handle = <&ethphy0>;
175
176 nvmem-cells = <&macaddr_info_8>;
177 nvmem-cell-names = "mac-address";
178 };
179
180 &mdio {
181 ethphy0: ethernet-phy@0 {
182 reg = <0>;
183 };
184 };
185
186 &switch0 {
187 ports {
188 port@1 {
189 status = "okay";
190 label = "lan3";
191 };
192
193 port@2 {
194 status = "okay";
195 label = "lan2";
196 };
197
198 port@3 {
199 status = "okay";
200 label = "lan1";
201 };
202 };
203 };