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