f6bd7ad58f946407ab3042664e95276b948613fa
[openwrt/openwrt.git] / target / linux / ath79 / dts / qca9531_tplink_archer-d50-v1.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "qca953x.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "tplink,archer-d50-v1", "qca,qca9531";
10 model = "TP-Link Archer D50 v1";
11
12 aliases {
13 led-boot = &led_system;
14 led-failsafe = &led_system;
15 led-running = &led_system;
16 led-upgrade = &led_system;
17 label-mac-device = &wmac;
18 };
19
20 leds {
21 compatible = "gpio-leds";
22
23 wlan2g {
24 label = "white:wlan2g";
25 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
26 linux,default-trigger = "phy0tpt";
27 };
28
29 wlan5g {
30 label = "white:wlan5g";
31 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
32 linux,default-trigger = "phy1tpt";
33 };
34
35 qss {
36 label = "white:qss";
37 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
38 };
39
40 wan {
41 label = "white:wan";
42 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
43 };
44
45 lan {
46 label = "white:lan";
47 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
48 };
49
50 usb {
51 label = "white:usb";
52 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
53 trigger-sources = <&hub_port0>;
54 linux,default-trigger = "usbport";
55 };
56
57 internet {
58 label = "white:internet";
59 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
60 };
61
62 led_system: system {
63 label = "white:system";
64 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
65 default-state = "on";
66 };
67 };
68
69 keys {
70 compatible = "gpio-keys";
71
72 reset {
73 label = "Reset button";
74 linux,code = <KEY_RESTART>;
75 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
76 };
77
78 rfkill {
79 label = "RFKILL button";
80 linux,code = <KEY_RFKILL>;
81 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
82 };
83
84 wps {
85 label = "WPS button";
86 linux,code = <KEY_WPS_BUTTON>;
87 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
88 };
89 };
90 };
91
92 &uart {
93 status = "okay";
94 };
95
96 &spi {
97 status = "okay";
98
99 flash@0 {
100 compatible = "jedec,spi-nor";
101 reg = <0>;
102 spi-max-frequency = <10000000>;
103
104 partitions {
105 compatible = "fixed-partitions";
106 #address-cells = <1>;
107 #size-cells = <1>;
108
109 partition@0 {
110 label = "u-boot";
111 reg = <0x000000 0x020000>;
112 read-only;
113 };
114
115 partition@20000 {
116 compatible = "tplink,firmware";
117 label = "firmware";
118 reg = <0x020000 0x7a0000>;
119 };
120
121 partition@7c0000 {
122 label = "config";
123 reg = <0x7c0000 0x010000>;
124 read-only;
125 };
126
127 romfile: partition@7d0000 {
128 label = "romfile";
129 reg = <0x7d0000 0x010000>;
130 read-only;
131 };
132
133 partition@7e0000 {
134 label = "rom";
135 reg = <0x7e0000 0x010000>;
136 read-only;
137 };
138
139 art: partition@7f0000 {
140 label = "art";
141 reg = <0x7f0000 0x010000>;
142 read-only;
143 };
144 };
145 };
146 };
147
148 &eth0 {
149 status = "okay";
150
151 phy-handle = <&swphy4>;
152
153 mtd-mac-address = <&romfile 0xf100>;
154 mtd-mac-address-increment = <1>;
155 };
156
157 &eth1 {
158 mtd-mac-address = <&romfile 0xf100>;
159 };
160
161 &wmac {
162 status = "okay";
163
164 mtd-cal-data = <&art 0x1000>;
165 mtd-mac-address = <&romfile 0xf100>;
166 };
167
168 &pcie0 {
169 status = "okay";
170
171 wifi@0,0 {
172 compatible = "pci168c,003c";
173 reg = <0x0000 0 0 0 0>;
174 };
175 };
176
177 &usb_phy {
178 status = "okay";
179 };
180
181 &usb0 {
182 #address-cells = <1>;
183 #size-cells = <0>;
184 status = "okay";
185
186 hub_port0: port@1 {
187 reg = <1>;
188 #trigger-source-cells = <0>;
189 };
190 };