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