ramips: add support for SNR-CPE-ME2-SFP
[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 label = "config";
103 reg = <0xfa0000 0x50000>;
104 read-only;
105 };
106
107 radio: partition@ff0000 {
108 label = "radio";
109 reg = <0xff0000 0x10000>;
110 read-only;
111 };
112 };
113 };
114 };
115
116 &state_default {
117 gpio {
118 groups = "i2c", "rgmii2", "uart2", "uart3", "jtag", "wdt";
119 function = "gpio";
120 };
121 };
122
123 &pcie {
124 status = "okay";
125 };
126
127 &pcie0 {
128 wifi@0,0 {
129 compatible = "mediatek,mt76";
130 reg = <0x0000 0 0 0 0>;
131 mediatek,mtd-eeprom = <&radio 0x0>;
132 nvmem-cells = <&macaddr_config_8>;
133 nvmem-cell-names = "mac-address";
134 mac-address-increment = <1>;
135 ieee80211-freq-limit = <2400000 2500000>;
136 };
137 };
138
139 &pcie1 {
140 wifi@0,0 {
141 compatible = "mediatek,mt76";
142 reg = <0x0000 0 0 0 0>;
143 mediatek,mtd-eeprom = <&radio 0x8000>;
144 nvmem-cells = <&macaddr_config_8>;
145 nvmem-cell-names = "mac-address";
146 mac-address-increment = <2>;
147 ieee80211-freq-limit = <5000000 6000000>;
148 };
149 };
150
151 &ethernet {
152 pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>;
153 };
154
155 &gmac0 {
156 nvmem-cells = <&macaddr_config_8>;
157 nvmem-cell-names = "mac-address";
158 };
159
160 &switch0 {
161 ports {
162 port@0 {
163 status = "okay";
164 label = "wan";
165 };
166
167 port@1 {
168 status = "okay";
169 label = "lan1";
170 };
171
172 port@2 {
173 status = "okay";
174 label = "lan2";
175 };
176
177 port@3 {
178 status = "okay";
179 label = "lan3";
180 };
181
182 port@4 {
183 status = "okay";
184 label = "lan4";
185 };
186 };
187 };
188
189 &config {
190 compatible = "nvmem-cells";
191 #address-cells = <1>;
192 #size-cells = <1>;
193
194 macaddr_config_8: macaddr@8 {
195 reg = <0x8 0x6>;
196 };
197 };