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