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