ramips: add support for TP-Link MR600 V2(EU)
[openwrt/staging/jow.git] / target / linux / ramips / dts / mt7621_tplink_mr600-v2-eu.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,mr600-v2-eu", "mediatek,mt7621-soc";
11 model = "TP-Link MR600 v2 (EU)";
12
13 aliases {
14 led-boot = &led_power;
15 led-failsafe = &led_power;
16 led-running = &led_power;
17 led-upgrade = &led_power;
18 label-mac-device = &gmac0;
19 };
20
21 chosen {
22 bootargs = "console=ttyS0,115200";
23 };
24
25 keys {
26 compatible = "gpio-keys";
27
28 wlan {
29 label = "wlan";
30 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
31 linux,code = <KEY_WLAN>;
32 };
33
34 reset {
35 label = "reset";
36 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
37 linux,code = <KEY_RESTART>;
38 };
39 };
40
41 leds {
42 compatible = "gpio-leds";
43
44 led_power: power {
45 label = "white:power";
46 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
47 };
48 wlan {
49 label = "white:wlan";
50 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
51 linux,default-trigger = "phy1tpt";
52 };
53 wan {
54 label = "white:wan";
55 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
56 };
57
58 signal1 {
59 label = "white:signal1";
60 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
61 };
62
63 signal2 {
64 label = "white:signal2";
65 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
66 };
67
68 signal3 {
69 label = "white:signal3";
70 gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
71 };
72
73 4g {
74 label = "white:4g";
75 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
76 };
77 lan {
78 label = "white:lan";
79 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
80 };
81 };
82
83 };
84
85 &spi0 {
86 status = "okay";
87
88 flash@0 {
89 compatible = "jedec,spi-nor";
90 reg = <0>;
91 spi-max-frequency = <80000000>;
92
93 partitions {
94 compatible = "fixed-partitions";
95 #address-cells = <1>;
96 #size-cells = <1>;
97
98 partition@0 {
99 label = "uboot";
100 reg = <0x00000 0x20000>;
101 read-only;
102 };
103
104 partition@20000 {
105 compatible = "openwrt,uimage";
106 openwrt,offset = <512>; /* account for the 512-byte long header */
107 label = "firmware";
108 reg = <0x20000 0xfa0000>;
109 };
110
111 romfile: partition@fc0000 {
112 label = "romfile";
113 reg = <0xfc0000 0x10000>;
114 read-only;
115 };
116
117 partition@fd0000 {
118 label = "config";
119 reg = <0xfd0000 0x10000>;
120 read-only;
121 };
122
123 radio: partition@fe0000 {
124 label = "radio";
125 reg = <0xfe0000 0x10000>;
126 read-only;
127 };
128 };
129 };
130 };
131
132 &pcie {
133 status = "okay";
134 };
135
136
137 &pcie0 {
138 mt76@0,0 {
139 compatible = "mediatek,mt76";
140 reg = <0x0000 0 0 0 0>;
141 nvmem-cells = <&macaddr_romfile_f100>;
142 nvmem-cell-names = "mac-address";
143 mediatek,mtd-eeprom = <&radio 0x0>;
144 mtd-mac-address = <&romfile 0xf100>;
145 ieee80211-freq-limit = <2400000 2500000>;
146 };
147 };
148
149 &pcie1 {
150 mt76@0,0 {
151 compatible = "mediatek,mt76";
152 reg = <0x0000 0 0 0 0>;
153 mediatek,mtd-eeprom = <&radio 0x8000>;
154 ieee80211-freq-limit = <5000000 6000000>;
155 nvmem-cells = <&macaddr_romfile_f100>;
156 nvmem-cell-names = "mac-address";
157 mac-address-increment = <(-1)>;
158 };
159 };
160
161 &gmac0 {
162 nvmem-cells = <&macaddr_romfile_f100>;
163 nvmem-cell-names = "mac-address";
164 };
165
166 &gmac1 {
167 status = "okay";
168 label = "wan";
169 phy-handle = <&ethphy4>;
170
171 nvmem-cells = <&macaddr_romfile_f100>;
172 nvmem-cell-names = "mac-address";
173 };
174
175 &mdio {
176 ethphy4: ethernet-phy@4 {
177 reg = <4>;
178 };
179 };
180
181
182 &switch0 {
183 ports {
184 port@1 {
185 status = "okay";
186 label = "lan1";
187 };
188 port@2 {
189 status = "okay";
190 label = "lan2";
191 };
192 port@3 {
193 status = "okay";
194 label = "lan3";
195 };
196 };
197 };
198
199 &romfile {
200 compatible = "nvmem-cells";
201 #address-cells = <1>;
202 #size-cells = <1>;
203
204 macaddr_romfile_f100: romfile@f100 {
205 reg = <0xf100 0x6>;
206 };
207 };