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