ath79: add support for TP-Link TL-WDR6500 v2
[openwrt/openwrt.git] / target / linux / ath79 / dts / qca9533_kuwfi_c910.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "qca953x.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7 #include <dt-bindings/mtd/partitions/uimage.h>
8
9 / {
10 compatible = "kuwfi,c910", "qca,qca9533";
11 model = "KuWFi C910";
12
13 aliases {
14 label-mac-device = &eth1;
15 led-boot = &internet_red;
16 led-failsafe = &internet_red;
17 led-upgrade = &internet_red;
18 };
19
20 virtual_flash {
21 compatible = "mtd-concat";
22 devices = <&fwconcat0 &fwconcat1>;
23
24 partitions {
25 compatible = "fixed-partitions";
26 #address-cells = <1>;
27 #size-cells = <1>;
28
29 partition@0 {
30 reg = <0x0 0x0>;
31 label = "firmware";
32 compatible = "openwrt,uimage", "denx,uimage";
33 openwrt,ih-magic = <IH_MAGIC_OKLI>;
34 };
35 };
36 };
37
38 keys {
39 compatible = "gpio-keys";
40
41 reset {
42 label = "reset";
43 linux,code = <KEY_RESTART>;
44 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
45 debounce-interval = <60>;
46 };
47 };
48
49 leds {
50 compatible = "gpio-leds";
51
52 internet_blue {
53 label = "blue:internet";
54 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
55 };
56
57 wifi {
58 label = "white:wifi";
59 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
60 linux,default-trigger = "phy0tpt";
61 };
62
63 internet_green {
64 label = "green:internet";
65 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
66 };
67
68 wan {
69 label = "white:wan";
70 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
71 };
72
73 lan2 {
74 label = "white:lan2";
75 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
76 };
77
78 // gpio 12 enables or disables LTE (Quectel EC200T)
79
80 internet_red: internet_red {
81 label = "red:internet";
82 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
83 };
84
85 lan1 {
86 label = "white:lan1";
87 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
88 };
89 };
90 };
91
92 &spi {
93 status = "okay";
94
95 flash@0 {
96 compatible = "winbond,w25q128", "jedec,spi-nor";
97 reg = <0>;
98 spi-max-frequency = <25000000>;
99
100 partitions {
101 compatible = "fixed-partitions";
102 #address-cells = <1>;
103 #size-cells = <1>;
104
105 partition@0 {
106 label = "u-boot";
107 reg = <0x000000 0x020000>;
108 read-only;
109 };
110
111 partition@20000 {
112 label = "u-boot-env";
113 reg = <0x020000 0x010000>;
114 read-only;
115 };
116
117 partition@30000 {
118 label = "config";
119 reg = <0x030000 0x020000>;
120 read-only;
121 };
122
123 fwconcat0: partition@50000 {
124 label = "fwconcat0";
125 reg = <0x050000 0xe30000>;
126 };
127
128 partition@e80000 {
129 label = "loader";
130 reg = <0xe80000 0x10000>;
131 };
132
133 fwconcat1: partition@e90000 {
134 label = "fwconcat1";
135 reg = <0xe90000 0x160000>;
136 };
137
138 partition@ff0000 {
139 label = "art";
140 reg = <0xff0000 0x010000>;
141 read-only;
142
143 compatible = "nvmem-cells";
144 #address-cells = <1>;
145 #size-cells = <1>;
146
147 calibration_art_1000: macaddr@1000 {
148 reg = <0x1000 0x440>;
149 };
150
151 macaddr_art_1002: macaddr@1002 {
152 reg = <0x1002 0x6>;
153 };
154 };
155 };
156 };
157 };
158
159 &usb0 {
160 status = "okay";
161 };
162
163 &usb_phy {
164 status = "okay";
165 };
166
167 &eth0 {
168 status = "okay";
169
170 phy-handle = <&swphy0>;
171
172 nvmem-cells = <&macaddr_art_1002>;
173 nvmem-cell-names = "mac-address";
174 mac-address-increment = <1>;
175 };
176
177 &eth1 {
178 phy-handle = <&swphy4>;
179
180 nvmem-cells = <&macaddr_art_1002>;
181 nvmem-cell-names = "mac-address";
182
183 gmac-config {
184 device = <&gmac>;
185 switch-phy-swap = <1>;
186 };
187 };
188
189 &wmac {
190 status = "okay";
191
192 nvmem-cells = <&calibration_art_1000>;
193 nvmem-cell-names = "calibration";
194 };