08b8e9257c0d8b60d698cb3c51b0a0f3dda6a311
[openwrt/staging/mkresin.git] / target / linux / ath79 / dts / qca9558_tl-archer-c7.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 "qca9557.dtsi"
8
9 / {
10 chosen {
11 bootargs = "console=ttyS0,115200n8";
12 };
13
14 aliases {
15 led-status = &system;
16 };
17
18 leds {
19 compatible = "gpio-leds";
20
21 system: system {
22 label = "tp-link:green:system";
23 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
24 default-state = "on";
25 };
26
27 usb1 {
28 label = "tp-link:green:usb1";
29 gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
30 default-state = "off";
31 trigger-sources = <&hub_port1>;
32 linux,default-trigger = "usbport";
33 };
34
35 usb2 {
36 label = "tp-link:green:usb2";
37 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
38 default-state = "off";
39 trigger-sources = <&hub_port0>;
40 linux,default-trigger = "usbport";
41 };
42
43 wlan2g {
44 label = "tp-link:green:wlan2g";
45 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
46 default-state = "off";
47 linux,default-trigger = "phy1tpt";
48 };
49
50 qss {
51 label = "tp-link:green:qss";
52 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
53 default-state = "off";
54 };
55
56 wlan5g {
57 label = "tp-link:green:wlan5g";
58 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
59 default-state = "off";
60 linux,default-trigger = "phy0tpt";
61 };
62 };
63
64 keys {
65 compatible = "gpio-keys";
66 #address-cells = <1>;
67 #size-cells = <0>;
68
69 reset {
70 label = "Reset button";
71 linux,code = <KEY_RESTART>;
72 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
73 debounce-interval = <60>;
74 };
75
76 rfkill: wifi {
77 linux,code = <KEY_RFKILL>;
78 linux,input-type = <EV_SW>;
79 debounce-interval = <60>;
80 };
81 };
82
83 gpio-export {
84 compatible = "gpio-export";
85 #size-cells = <0>;
86
87 gpio_usb1_power {
88 gpio-export,name = "tp-link:power:usb1";
89 gpio-export,output = <1>;
90 gpios = <&gpio 21 GPIO_ACTIVE_HIGH>;
91 };
92
93 gpio_usb2_power {
94 gpio-export,name = "tp-link:power:usb2";
95 gpio-export,output = <1>;
96 gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
97 };
98
99 };
100 };
101
102 &pcie1 {
103 status = "okay";
104 };
105
106 &uart {
107 status = "okay";
108 };
109
110 &gpio {
111 status = "okay";
112 };
113
114 &usb_phy0 {
115 status = "okay";
116 };
117
118 &usb0 {
119 status = "okay";
120
121 hub_port0: port@1 {
122 reg = <1>;
123 #trigger-source-cells = <0>;
124 };
125 };
126
127 &usb_phy1 {
128 status = "okay";
129 };
130
131 &usb1 {
132 status = "okay";
133
134 hub_port1: port@1 {
135 reg = <1>;
136 #trigger-source-cells = <0>;
137 };
138 };
139
140 &spi {
141 status = "okay";
142 num-cs = <1>;
143
144 flash@0 {
145 #address-cells = <1>;
146 #size-cells = <1>;
147 compatible = "jedec,spi-nor";
148 reg = <0>;
149 spi-max-frequency = <25000000>;
150
151 partitions {
152 compatible = "fixed-partitions";
153 #address-cells = <1>;
154 #size-cells = <1>;
155
156 uboot: partition@0 {
157 label = "u-boot";
158 reg = <0x000000 0x020000>;
159 read-only;
160 };
161
162 partition@20000 {
163 label = "firmware";
164 reg = <0x020000 0xfd0000>;
165 };
166
167 art: partition@ff0000 {
168 label = "art";
169 reg = <0xff0000 0x010000>;
170 read-only;
171 };
172 };
173 };
174 };
175
176 &mdio0 {
177 status = "okay";
178
179 phy0: ethernet-phy@0 {
180 reg = <0>;
181
182 qca,ar8327-initvals = <
183 0x04 0x00080080 /* PORT0 PAD MODE CTRL */
184 0x0c 0x07600000 /* PORT6 PAD MODE CTRL */
185 0x50 0xc737c737 /* LED_CTRL0 */
186 0x54 0x00000000 /* LED_CTRL1 */
187 0x58 0x00000000 /* LED_CTRL2 */
188 0x5c 0x0030c300 /* LED_CTRL3 */
189 0x7c 0x0000007e /* PORT0_STATUS */
190 0x94 0x0000007e /* PORT6 STATUS */
191 >;
192 };
193 };
194
195 &mdio1 {
196 status = "okay";
197
198 phy1: ethernet-phy@1 {
199 reg = <1>;
200 };
201 };
202
203 &eth0 {
204 status = "okay";
205
206 mtd-mac-address = <&uboot 0x1fc00>;
207 mtd-mac-address-increment = <1>;
208 phy-handle = <&phy0>;
209 };
210
211 &eth1 {
212 status = "okay";
213
214 mtd-mac-address = <&uboot 0x1fc00>;
215 phy-handle = <&phy1>;
216
217 fixed-link {
218 speed = <1000>;
219 full-duplex;
220 };
221 };
222
223 &wmac {
224 status = "okay";
225 mtd-cal-data = <&art 0x1000>;
226 mtd-mac-address = <&uboot 0x1fc00>;
227 mtd-mac-address-increment = <(-1)>;
228 };