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