546a5e33c3dac22584890945f0eadb1744e7fd69
[openwrt/openwrt.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 gpio_leds: 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 led_wlan2g: 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
57 gpio_keys: keys {
58 compatible = "gpio-keys";
59 #address-cells = <1>;
60 #size-cells = <0>;
61
62 reset {
63 label = "Reset button";
64 linux,code = <KEY_RESTART>;
65 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
66 debounce-interval = <60>;
67 };
68 };
69
70 gpio-export {
71 compatible = "gpio-export";
72 #size-cells = <0>;
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 status = "okay";
107
108 hub_port0: port@1 {
109 reg = <1>;
110 #trigger-source-cells = <0>;
111 };
112 };
113
114 &usb_phy1 {
115 status = "okay";
116 };
117
118 &usb1 {
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 num-cs = <1>;
130
131 flash@0 {
132 #address-cells = <1>;
133 #size-cells = <1>;
134 compatible = "jedec,spi-nor";
135 reg = <0>;
136 spi-max-frequency = <25000000>;
137
138 mtdparts: partitions {
139 compatible = "fixed-partitions";
140 #address-cells = <1>;
141 #size-cells = <1>;
142 };
143 };
144 };
145
146 &mdio0 {
147 status = "okay";
148
149 phy0: ethernet-phy@0 {
150 reg = <0>;
151
152 qca,ar8327-initvals = <
153 0x04 0x00080080 /* PORT0 PAD MODE CTRL */
154 0x0c 0x07600000 /* PORT6 PAD MODE CTRL */
155 0x50 0xc737c737 /* LED_CTRL0 */
156 0x54 0x00000000 /* LED_CTRL1 */
157 0x58 0x00000000 /* LED_CTRL2 */
158 0x5c 0x0030c300 /* LED_CTRL3 */
159 0x7c 0x0000007e /* PORT0_STATUS */
160 0x94 0x0000007e /* PORT6 STATUS */
161 >;
162 };
163 };
164
165 &eth0 {
166 status = "okay";
167
168 mtd-mac-address = <&uboot 0x1fc00>;
169 mtd-mac-address-increment = <1>;
170 phy-handle = <&phy0>;
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
183 fixed-link {
184 speed = <1000>;
185 full-duplex;
186 };
187 };
188
189 &wmac {
190 status = "okay";
191 mtd-cal-data = <&art 0x1000>;
192 mtd-mac-address = <&uboot 0x1fc00>;
193 mtd-mac-address-increment = <(-1)>;
194 };