ath79: add support for Netgear WNR1000 v2
[openwrt/openwrt.git] / target / linux / ath79 / dts / qca9563_tplink_archer-x6-v2.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 = &power;
16 led-failsafe = &power;
17 led-running = &power;
18 led-upgrade = &power;
19 label-mac-device = &eth0;
20 };
21
22 leds {
23 compatible = "gpio-leds";
24
25 power: power {
26 label = "tp-link:green:power";
27 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
28 default-state = "on";
29 };
30
31 wlan2g {
32 label = "tp-link:green:wlan2g";
33 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
34 linux,default-trigger = "phy1tpt";
35 };
36
37 wlan5g {
38 label = "tp-link:green:wlan5g";
39 gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
40 linux,default-trigger = "phy0tpt";
41 };
42
43 lan {
44 label = "tp-link:green:lan";
45 gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
46 };
47
48 wan {
49 label = "tp-link:green:wan";
50 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
51 };
52
53 wan_fail {
54 label = "tp-link:amber:wan";
55 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
56 };
57
58 wps {
59 label = "tp-link:green:wps";
60 gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
61 };
62 };
63
64 keys {
65 compatible = "gpio-keys";
66
67 reset {
68 label = "Reset button";
69 linux,code = <KEY_RESTART>;
70 gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
71 debounce-interval = <60>;
72 };
73
74 wps {
75 label = "WPS button";
76 linux,code = <KEY_WPS_BUTTON>;
77 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
78 debounce-interval = <60>;
79 };
80 };
81 };
82
83 &pcie {
84 status = "okay";
85 };
86
87 &uart {
88 status = "okay";
89 };
90
91 &gpio {
92 status = "okay";
93 };
94
95 &spi {
96 status = "okay";
97 num-cs = <1>;
98
99 flash@0 {
100 compatible = "jedec,spi-nor";
101 reg = <0>;
102 spi-max-frequency = <25000000>;
103
104 partitions {
105 compatible = "fixed-partitions";
106 #address-cells = <1>;
107 #size-cells = <1>;
108
109 partition@0 {
110 label = "u-boot";
111 reg = <0x000000 0x020000>;
112 read-only;
113 };
114
115 mac: partition@20000 {
116 label = "mac";
117 reg = <0x020000 0x010000>;
118 read-only;
119 };
120
121 partition@30000 {
122 compatible = "denx,uimage";
123 label = "firmware";
124 reg = <0x030000 0x7a0000>;
125 };
126
127 partition@7d0000 {
128 label = "tplink";
129 reg = <0x7d0000 0x020000>;
130 read-only;
131 };
132
133 art: partition@7f0000 {
134 label = "art";
135 reg = <0x7f0000 0x010000>;
136 read-only;
137 };
138 };
139 };
140 };
141
142 &mdio0 {
143 status = "okay";
144
145 phy-mask = <0>;
146
147 phy0: ethernet-phy@0 {
148 reg = <0>;
149 phy-mode = "sgmii";
150 qca,mib-poll-interval = <500>;
151
152 qca,ar8327-initvals = <
153 0x04 0x00080080 /* PORT0 PAD MODE CTRL */
154 0x7c 0x0000007e /* PORT0_STATUS */
155 >;
156 };
157 };
158
159 &eth0 {
160 status = "okay";
161
162 phy-mode = "sgmii";
163 mtd-mac-address = <&mac 0x8>;
164 phy-handle = <&phy0>;
165 };
166
167 &wmac {
168 status = "okay";
169
170 mtd-cal-data = <&art 0x1000>;
171 mtd-mac-address = <&mac 0x8>;
172 };