f6a959903fb91635f558f97d1c379a8d2e69927e
[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
3 #include "qca956x.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 aliases {
10 led-boot = &led_system;
11 led-failsafe = &led_system;
12 led-running = &led_system;
13 led-upgrade = &led_system;
14 };
15
16 leds {
17 compatible = "gpio-leds";
18
19 led_system: system {
20 label = "green:system";
21 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
22 default-state = "on";
23 };
24
25 usb {
26 label = "green:usb";
27 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
28 trigger-sources = <&hub_port0>;
29 linux,default-trigger = "usbport";
30 };
31
32 wlan5g {
33 label = "green:wlan5g";
34 gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
35 linux,default-trigger = "phy0tpt";
36 };
37
38 wlan2g {
39 label = "green:wlan2g";
40 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
41 linux,default-trigger = "phy1tpt";
42 };
43
44 wan {
45 label = "green:wan";
46 gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
47 };
48
49 wan_fail {
50 label = "orange:wan";
51 gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
52 };
53
54 lan1 {
55 label = "green:lan1";
56 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
57 };
58
59 lan2 {
60 label = "green:lan2";
61 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
62 };
63
64 lan3 {
65 label = "green:lan3";
66 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
67 };
68
69 lan4 {
70 label = "green:lan4";
71 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
72 };
73
74 wps {
75 label = "green:wps";
76 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
77 };
78 };
79
80 keys: keys {
81 compatible = "gpio-keys";
82
83 wps {
84 label = "WPS button";
85 linux,code = <KEY_WPS_BUTTON>;
86 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
87 debounce-interval = <60>;
88 };
89 };
90
91 gpio-export {
92 compatible = "gpio-export";
93
94 gpio_usb_power {
95 gpio-export,name = "tp-link:power:usb";
96 gpio-export,output = <1>;
97 gpios = <&gpio 19 GPIO_ACTIVE_HIGH>;
98 };
99 };
100 };
101
102 &pcie {
103 status = "okay";
104 };
105
106 &usb_phy0 {
107 status = "okay";
108 };
109
110 &usb0 {
111 status = "okay";
112 };
113
114 &spi {
115 status = "okay";
116
117 flash@0 {
118 compatible = "jedec,spi-nor";
119 reg = <0>;
120 spi-max-frequency = <25000000>;
121
122 mtdparts: partitions {
123 compatible = "fixed-partitions";
124 #address-cells = <1>;
125 #size-cells = <1>;
126 };
127 };
128 };
129
130 &mdio0 {
131 status = "okay";
132
133 phy0: ethernet-phy@0 {
134 reg = <0>;
135 phy-mode = "sgmii";
136 qca,mib-poll-interval = <500>;
137
138 qca,ar8327-initvals = <
139 0x04 0x80080080 /* PORT0 PAD MODE CTRL */
140 0x08 0x00000000 /* PORT5 PAD MODE CTRL */
141 0x0c 0x00000000 /* PORT6 PAD MODE CTRL */
142 0x10 0x00000080 /* POWER_ON_STRAP */
143 0x7c 0x0000007e /* PORT0_STATUS */
144 0x94 0x00000200 /* PORT6_STATUS */
145 >;
146 };
147 };
148
149 &eth0 {
150 status = "okay";
151
152 pll-data = <0x03000101 0x00000101 0x00001919>;
153
154 phy-mode = "sgmii";
155 phy-handle = <&phy0>;
156 };
157
158 &wmac {
159 status = "okay";
160 };