Revert "ramips: convert MT7915 EEPROM to NVMEM format"
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_tplink_archer-x6-v3.dtsi
1 // SPDX-License-Identifier: GPL-2.0-only
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 aliases {
10 label-mac-device = &gmac0;
11 led-boot = &led_power;
12 led-failsafe = &led_power;
13 led-running = &led_power;
14 led-upgrade = &led_power;
15 };
16
17 chosen {
18 bootargs = "console=ttyS0,115200n8";
19 };
20
21 keys {
22 compatible = "gpio-keys";
23
24 wps {
25 label = "wps";
26 gpios = <&gpio 28 GPIO_ACTIVE_LOW>;
27 debounce-interval = <60>;
28 linux,code = <KEY_WPS_BUTTON>;
29 };
30
31 reset {
32 label = "reset";
33 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
34 debounce-interval = <60>;
35 linux,code = <KEY_RESTART>;
36 };
37 };
38
39 leds {
40 compatible = "gpio-leds";
41
42 led_power: power {
43 label = "green:power";
44 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
45 };
46
47 wan_orange {
48 label = "orange:wan";
49 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
50 };
51
52 lan {
53 label = "green:lan";
54 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
55 };
56
57 wifi5g {
58 label = "green:wifi5g";
59 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
60 linux,default-trigger = "phy1tpt";
61 };
62
63 wifi2g {
64 label = "green:wifi2g";
65 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
66 linux,default-trigger = "phy0tpt";
67 };
68
69 wan_green {
70 label = "green:wan";
71 gpios = <&gpio 45 GPIO_ACTIVE_LOW>;
72 };
73 };
74 };
75
76 &spi0 {
77 status = "okay";
78
79 flash@0 {
80 compatible = "jedec,spi-nor";
81 reg = <0>;
82 spi-max-frequency = <40000000>;
83
84 partitions {
85 compatible = "fixed-partitions";
86 #address-cells = <1>;
87 #size-cells = <1>;
88
89 partition@0 {
90 label = "u-boot";
91 reg = <0x0 0x40000>;
92 read-only;
93 };
94
95 partition@40000 {
96 label = "firmware";
97 compatible = "denx,uimage";
98 reg = <0x40000 0xf60000>;
99 };
100
101 config: partition@fa0000 {
102 compatible = "nvmem-cells";
103 label = "config";
104 reg = <0xfa0000 0x50000>;
105 #address-cells = <1>;
106 #size-cells = <1>;
107 read-only;
108
109 macaddr_config_8: macaddr@8 {
110 reg = <0x8 0x6>;
111 };
112 };
113
114 radio: partition@ff0000 {
115 compatible = "nvmem-cells";
116 label = "radio";
117 reg = <0xff0000 0x10000>;
118 #address-cells = <1>;
119 #size-cells = <1>;
120 read-only;
121
122 eeprom_radio_0: eeprom@0 {
123 reg = <0x0 0x400>;
124 };
125
126 eeprom_radio_8000: eeprom@8000 {
127 reg = <0x8000 0x4da8>;
128 };
129 };
130 };
131 };
132 };
133
134 &state_default {
135 gpio {
136 groups = "i2c", "rgmii2", "uart2", "uart3", "jtag", "wdt";
137 function = "gpio";
138 };
139 };
140
141 &pcie {
142 status = "okay";
143 };
144
145 &pcie0 {
146 wifi@0,0 {
147 compatible = "mediatek,mt76";
148 reg = <0x0000 0 0 0 0>;
149 nvmem-cells = <&eeprom_radio_0>, <&macaddr_config_8>;
150 nvmem-cell-names = "eeprom", "mac-address";
151 mac-address-increment = <1>;
152 ieee80211-freq-limit = <2400000 2500000>;
153 };
154 };
155
156 &pcie1 {
157 wifi@0,0 {
158 compatible = "mediatek,mt76";
159 reg = <0x0000 0 0 0 0>;
160 nvmem-cells = <&eeprom_radio_8000>, <&macaddr_config_8>;
161 nvmem-cell-names = "eeprom", "mac-address";
162 mac-address-increment = <2>;
163 ieee80211-freq-limit = <5000000 6000000>;
164 };
165 };
166
167 &ethernet {
168 pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>;
169 };
170
171 &gmac0 {
172 nvmem-cells = <&macaddr_config_8>;
173 nvmem-cell-names = "mac-address";
174 };
175
176 &switch0 {
177 ports {
178 port@0 {
179 status = "okay";
180 label = "wan";
181 };
182
183 port@1 {
184 status = "okay";
185 label = "lan1";
186 };
187
188 port@2 {
189 status = "okay";
190 label = "lan2";
191 };
192
193 port@3 {
194 status = "okay";
195 label = "lan3";
196 };
197
198 port@4 {
199 status = "okay";
200 label = "lan4";
201 };
202 };
203 };