ath79: add support for Netgear WNR1000 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 = &system;
16 led-failsafe = &system;
17 led-running = &system;
18 led-upgrade = &system;
19 label-mac-device = &eth0;
20 };
21
22 gpio_leds: leds {
23 compatible = "gpio-leds";
24
25 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 led_wlan2g: 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 gpio_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 num-cs = <1>;
138
139 flash@0 {
140 compatible = "jedec,spi-nor";
141 reg = <0>;
142 spi-max-frequency = <25000000>;
143
144 mtdparts: partitions {
145 compatible = "fixed-partitions";
146 #address-cells = <1>;
147 #size-cells = <1>;
148 };
149 };
150 };
151
152 &mdio0 {
153 status = "okay";
154
155 phy-mask = <0>;
156
157 phy0: ethernet-phy@0 {
158 reg = <0>;
159 phy-mode = "sgmii";
160 qca,mib-poll-interval = <500>;
161
162 qca,ar8327-initvals = <
163 0x04 0x80080080 /* PORT0 PAD MODE CTRL */
164 0x08 0x00000000 /* PORT5 PAD MODE CTRL */
165 0x0c 0x00000000 /* PORT6 PAD MODE CTRL */
166 0x10 0x00000080 /* POWER_ON_STRIP */
167 0x7c 0x0000007e /* PORT0_STATUS */
168 0x94 0x00000200 /* PORT6_STATUS */
169 >;
170 };
171 };
172
173 &eth0 {
174 status = "okay";
175
176 pll-data = <0x03000101 0x00000101 0x00001919>;
177
178 phy-mode = "sgmii";
179 mtd-mac-address = <&info 0x8>;
180 phy-handle = <&phy0>;
181 };
182
183 &wmac {
184 status = "okay";
185 mtd-cal-data = <&art 0x1000>;
186 mtd-mac-address = <&info 0x8>;
187 };