ath79: improve common DTSI name for TP-Link Archer C5, C7 v1/v2
[openwrt/openwrt.git] / target / linux / ath79 / dts / qca9563_tplink_archer-x7-v5.dtsi
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 "qca956x.dtsi"
8
9 / {
10 chosen {
11 bootargs = "console=ttyS0,115200n8";
12 };
13
14 aliases {
15 led-boot = &led_system;
16 led-failsafe = &led_system;
17 led-running = &led_system;
18 led-upgrade = &led_system;
19 label-mac-device = &eth0;
20 };
21
22 leds {
23 compatible = "gpio-leds";
24
25 led_system: system {
26 label = "tp-link:green:system";
27 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
28 default-state = "on";
29 };
30
31 usb {
32 label = "tp-link:green:usb";
33 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
34 trigger-sources = <&hub_port0>;
35 linux,default-trigger = "usbport";
36 };
37
38 wlan5g {
39 label = "tp-link:green:wlan5g";
40 gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
41 linux,default-trigger = "phy0tpt";
42 };
43
44 wlan2g {
45 label = "tp-link:green:wlan2g";
46 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
47 linux,default-trigger = "phy1tpt";
48 };
49
50 wan {
51 label = "tp-link:green:wan";
52 gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
53 };
54
55 wan_fail {
56 label = "tp-link:orange:wan";
57 gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
58 };
59
60 lan1 {
61 label = "tp-link:green:lan1";
62 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
63 };
64
65 lan2 {
66 label = "tp-link:green:lan2";
67 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
68 };
69
70 lan3 {
71 label = "tp-link:green:lan3";
72 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
73 };
74
75 lan4 {
76 label = "tp-link:green:lan4";
77 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
78 };
79
80 wps {
81 label = "tp-link:green:wps";
82 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
83 };
84 };
85
86 keys: keys {
87 compatible = "gpio-keys";
88
89 wps {
90 label = "WPS button";
91 linux,code = <KEY_WPS_BUTTON>;
92 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
93 debounce-interval = <60>;
94 };
95 };
96
97 gpio-export {
98 compatible = "gpio-export";
99
100 gpio_usb_power {
101 gpio-export,name = "tp-link:power:usb";
102 gpio-export,output = <1>;
103 gpios = <&gpio 19 GPIO_ACTIVE_HIGH>;
104 };
105 };
106 };
107
108 &pcie {
109 status = "okay";
110 };
111
112 &uart {
113 status = "okay";
114 };
115
116 &gpio {
117 status = "okay";
118 };
119
120 &usb_phy0 {
121 status = "okay";
122 };
123
124 &usb0 {
125 #address-cells = <1>;
126 #size-cells = <0>;
127 status = "okay";
128
129 hub_port0: port@1 {
130 reg = <1>;
131 #trigger-source-cells = <0>;
132 };
133 };
134
135 &spi {
136 status = "okay";
137
138 num-cs = <1>;
139
140 flash@0 {
141 compatible = "jedec,spi-nor";
142 reg = <0>;
143 spi-max-frequency = <25000000>;
144
145 mtdparts: partitions {
146 compatible = "fixed-partitions";
147 #address-cells = <1>;
148 #size-cells = <1>;
149 };
150 };
151 };
152
153 &mdio0 {
154 status = "okay";
155
156 phy-mask = <0>;
157
158 phy0: ethernet-phy@0 {
159 reg = <0>;
160 phy-mode = "sgmii";
161 qca,mib-poll-interval = <500>;
162
163 qca,ar8327-initvals = <
164 0x04 0x80080080 /* PORT0 PAD MODE CTRL */
165 0x08 0x00000000 /* PORT5 PAD MODE CTRL */
166 0x0c 0x00000000 /* PORT6 PAD MODE CTRL */
167 0x10 0x00000080 /* POWER_ON_STRIP */
168 0x7c 0x0000007e /* PORT0_STATUS */
169 0x94 0x00000200 /* PORT6_STATUS */
170 >;
171 };
172 };
173
174 &eth0 {
175 status = "okay";
176
177 pll-data = <0x03000101 0x00000101 0x00001919>;
178
179 phy-mode = "sgmii";
180 mtd-mac-address = <&info 0x8>;
181 phy-handle = <&phy0>;
182 };
183
184 &wmac {
185 status = "okay";
186
187 mtd-cal-data = <&art 0x1000>;
188 mtd-mac-address = <&info 0x8>;
189 };