ramips: correct the PCIe port number for Unielec u7621-01
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_tplink_archer-ax23-v1.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-ax23-v1", "mediatek,mt7621-soc";
10 model = "TP-Link Archer AX23 v1";
11
12 aliases {
13 led-boot = &led_power;
14 led-failsafe = &led_power;
15 led-running = &led_power;
16 led-upgrade = &led_power;
17 label-mac-device = &gmac0;
18 };
19
20 chosen {
21 bootargs = "console=ttyS0,115200";
22 };
23
24 keys {
25 compatible = "gpio-keys";
26
27 reset {
28 label = "reset";
29 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
30 linux,code = <KEY_RESTART>;
31 };
32
33 wps {
34 label = "rfkill";
35 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
36 linux,code = <KEY_RFKILL>;
37 };
38 };
39
40 leds {
41 compatible = "gpio-leds";
42
43 led_power: power {
44 label = "green:power";
45 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
46 };
47
48 wifi2g {
49 label = "green:wifi2g";
50 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
51 linux,default-trigger = "phy0tpt";
52 };
53
54 wifi5g {
55 label = "green:wifi5g";
56 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
57 linux,default-trigger = "phy1tpt";
58 };
59
60 wan-green {
61 label = "green:wan";
62 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
63 };
64
65 wan-orange {
66 label = "orange:wan";
67 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
68 };
69
70 lan {
71 label = "green:lan";
72 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
73 };
74
75 wps {
76 label = "green:wps";
77 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
78 };
79 };
80 };
81
82 &spi0 {
83 status = "okay";
84
85 flash@0 {
86 compatible = "jedec,spi-nor";
87 reg = <0>;
88 spi-max-frequency = <25000000>;
89
90 partitions {
91 compatible = "fixed-partitions";
92 #address-cells = <1>;
93 #size-cells = <1>;
94
95 partition@0 {
96 label = "u-boot";
97 reg = <0x000000 0x040000>;
98 read-only;
99 };
100
101 partition@40000 {
102 compatible = "denx,uimage";
103 label = "firmware";
104 reg = <0x040000 0xf60000>;
105 };
106
107 config: partition@fa0000 {
108 label = "config";
109 reg = <0xfa0000 0x010000>;
110 read-only;
111
112 nvmem-layout {
113 compatible = "fixed-layout";
114 #address-cells = <1>;
115 #size-cells = <1>;
116
117 macaddr_config_8: macaddr@8 {
118 compatible = "mac-base";
119 reg = <0x8 0x6>;
120 #nvmem-cell-cells = <1>;
121 };
122 };
123 };
124
125 partition@fb0000 {
126 label = "tplink";
127 reg = <0xfb0000 0x040000>;
128 read-only;
129 };
130
131 radio: partition@ff0000 {
132 label = "radio";
133 reg = <0xff0000 0x010000>;
134 read-only;
135 };
136 };
137 };
138 };
139
140 &pcie {
141 status = "okay";
142 };
143
144 &pcie1 {
145 wifi@0,0 {
146 compatible = "mediatek,mt76";
147 reg = <0x0000 0 0 0 0>;
148 mediatek,mtd-eeprom = <&radio 0x0>;
149 nvmem-cells = <&macaddr_config_8 0>;
150 nvmem-cell-names = "mac-address";
151 mediatek,disable-radar-background;
152 };
153 };
154
155 &gmac0 {
156 nvmem-cells = <&macaddr_config_8 0>;
157 nvmem-cell-names = "mac-address";
158 };
159
160 &gmac1 {
161 status = "okay";
162 label = "wan";
163 phy-handle = <&ethphy4>;
164
165 nvmem-cells = <&macaddr_config_8 1>;
166 nvmem-cell-names = "mac-address";
167 };
168
169 &mdio {
170 ethphy4: ethernet-phy@4 {
171 reg = <4>;
172 };
173 };
174
175 &switch0 {
176 ports {
177 port@0 {
178 status = "okay";
179 label = "lan1";
180 };
181
182 port@1 {
183 status = "okay";
184 label = "lan2";
185 };
186
187 port@2 {
188 status = "okay";
189 label = "lan3";
190 };
191
192 port@3 {
193 status = "okay";
194 label = "lan4";
195 };
196 };
197 };
198
199 &state_default {
200 gpio {
201 groups = "i2c", "uart3", "jtag", "wdt";
202 function = "gpio";
203 };
204 };