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