ath79: improve common DTSI name for TP-Link Archer C5, C7 v1/v2
[openwrt/openwrt.git] / target / linux / ath79 / dts / qca9558_tplink_tl-wr1043nd.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-boot = &led_system;
16 led-failsafe = &led_system;
17 led-running = &led_system;
18 led-upgrade = &led_system;
19 label-mac-device = &wmac;
20 };
21
22 leds {
23 compatible = "gpio-leds";
24
25 led_system: system {
26 label = "tp-link:green:system";
27 gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
28 linux,default-trigger = "heartbeat";
29 };
30
31 usb {
32 label = "tp-link:green:usb";
33 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
34 trigger-sources = <&hub_port0>;
35 linux,default-trigger = "usbport";
36 };
37
38 wifi_green {
39 label = "tp-link:green:wlan";
40 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
41 linux,default-trigger = "phy0tpt";
42 };
43
44 wifi_wps {
45 label = "tp-link:green:wps";
46 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
47 };
48 };
49
50 keys {
51 compatible = "gpio-keys";
52
53 reset {
54 label = "Reset button";
55 linux,code = <KEY_RESTART>;
56 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
57 debounce-interval = <60>;
58 };
59
60 wifi {
61 label = "RFKILL button";
62 linux,code = <KEY_RFKILL>;
63 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
64 debounce-interval = <60>;
65 };
66 };
67
68 gpio-export {
69 compatible = "gpio-export";
70 #size-cells = <0>;
71
72 gpio_usb_power {
73 gpio-export,name = "tp-link:power:usb";
74 gpio-export,output = <1>;
75 gpios = <&gpio 21 GPIO_ACTIVE_HIGH>;
76 };
77 };
78 };
79
80 &uart {
81 status = "okay";
82 };
83
84 &gpio {
85 status = "okay";
86 };
87
88 &usb_phy0 {
89 status = "okay";
90 };
91
92 &usb0 {
93 #address-cells = <1>;
94 #size-cells = <0>;
95 status = "okay";
96
97 hub_port0: port@1 {
98 reg = <1>;
99 #trigger-source-cells = <0>;
100 };
101 };
102
103 &spi {
104 status = "okay";
105 num-cs = <1>;
106
107 flash@0 {
108 compatible = "jedec,spi-nor";
109 reg = <0>;
110 spi-max-frequency = <25000000>;
111
112 partitions {
113 compatible = "fixed-partitions";
114 #address-cells = <1>;
115 #size-cells = <1>;
116
117 uboot: partition@0 {
118 label = "u-boot";
119 reg = <0x000000 0x020000>;
120 read-only;
121 };
122
123 partition@20000 {
124 compatible = "tplink,firmware";
125 label = "firmware";
126 reg = <0x020000 0x7d0000>;
127 };
128
129 art: partition@7f0000 {
130 label = "art";
131 reg = <0x7f0000 0x010000>;
132 read-only;
133 };
134 };
135 };
136 };
137
138 &mdio0 {
139 status = "okay";
140
141 phy0: ethernet-phy@0 {
142 reg = <0>;
143 qca,ar8327-initvals = <
144 0x04 0x00080080 /* PORT0 PAD MODE CTRL */
145 0x0c 0x07600000 /* PORT6 PAD MODE CTRL */
146 0x10 0x81000080 /* POWER_ON_STRIP */
147 0x50 0xcc35cc35 /* LED_CTRL0 */
148 0x54 0xca35ca35 /* LED_CTRL1 */
149 0x58 0xc935c935 /* LED_CTRL2 */
150 0x5c 0x03ffff00 /* LED_CTRL3 */
151 0x7c 0x0000007e /* PORT0_STATUS */
152 0x94 0x0000007e /* PORT6 STATUS */
153 >;
154 };
155 };
156
157 &eth0 {
158 status = "okay";
159
160 pll-data = <0x56000000 0x00000101 0x00001616>;
161
162 mtd-mac-address = <&uboot 0x1fc00>;
163 mtd-mac-address-increment = <1>;
164 phy-handle = <&phy0>;
165 };
166
167 &eth1 {
168 status = "okay";
169
170 pll-data = <0x03000101 0x00000101 0x00001616>;
171
172 mtd-mac-address = <&uboot 0x1fc00>;
173
174 fixed-link {
175 speed = <1000>;
176 full-duplex;
177 };
178 };
179
180 &wmac {
181 status = "okay";
182 mtd-cal-data = <&art 0x1000>;
183 mtd-mac-address = <&uboot 0x1fc00>;
184 };