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