f629838f1ae2a0bdf2e436ae9706af0350d63bff
[openwrt/staging/ldir.git] / target / linux / ath79 / dts / qca9558_tplink_archer-c.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "qca955x.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 aliases {
10 led-boot = &led_system;
11 led-failsafe = &led_system;
12 led-running = &led_system;
13 led-upgrade = &led_system;
14 };
15
16 leds: leds {
17 compatible = "gpio-leds";
18
19 led_system: system {
20 label = "green:system";
21 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
22 default-state = "on";
23 };
24
25 usb1 {
26 label = "green:usb1";
27 gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
28 trigger-sources = <&hub_port1>;
29 linux,default-trigger = "usbport";
30 };
31
32 usb2 {
33 label = "green:usb2";
34 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
35 trigger-sources = <&hub_port0>;
36 linux,default-trigger = "usbport";
37 };
38
39 wlan2g {
40 label = "green:wlan2g";
41 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
42 linux,default-trigger = "phy1tpt";
43 };
44
45 qss {
46 label = "green:qss";
47 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
48 };
49 };
50
51 keys: keys {
52 compatible = "gpio-keys";
53
54 reset {
55 label = "Reset button";
56 linux,code = <KEY_RESTART>;
57 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
58 debounce-interval = <60>;
59 };
60 };
61
62 gpio-export {
63 compatible = "gpio-export";
64
65 gpio_usb1_power {
66 gpio-export,name = "tp-link:power:usb1";
67 gpio-export,output = <1>;
68 gpios = <&gpio 21 GPIO_ACTIVE_HIGH>;
69 };
70
71 gpio_usb2_power {
72 gpio-export,name = "tp-link:power:usb2";
73 gpio-export,output = <1>;
74 gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
75 };
76 };
77 };
78
79 &pcie1 {
80 status = "okay";
81 };
82
83 &usb_phy0 {
84 status = "okay";
85 };
86
87 &usb0 {
88 #address-cells = <1>;
89 #size-cells = <0>;
90 status = "okay";
91
92 hub_port0: port@1 {
93 reg = <1>;
94 #trigger-source-cells = <0>;
95 };
96 };
97
98 &usb_phy1 {
99 status = "okay";
100 };
101
102 &usb1 {
103 #address-cells = <1>;
104 #size-cells = <0>;
105 status = "okay";
106
107 hub_port1: port@1 {
108 reg = <1>;
109 #trigger-source-cells = <0>;
110 };
111 };
112
113 &spi {
114 status = "okay";
115
116 flash@0 {
117 compatible = "jedec,spi-nor";
118 reg = <0>;
119 spi-max-frequency = <25000000>;
120
121 mtdparts: partitions {
122 compatible = "fixed-partitions";
123 #address-cells = <1>;
124 #size-cells = <1>;
125 };
126 };
127 };
128
129 &mdio0 {
130 status = "okay";
131
132 phy0: ethernet-phy@0 {
133 reg = <0>;
134
135 qca,ar8327-initvals = <
136 0x04 0x00080080 /* PORT0 PAD MODE CTRL */
137 0x0c 0x07600000 /* PORT6 PAD MODE CTRL */
138 0x50 0xc737c737 /* LED_CTRL0 */
139 0x54 0x00000000 /* LED_CTRL1 */
140 0x58 0x00000000 /* LED_CTRL2 */
141 0x5c 0x0030c300 /* LED_CTRL3 */
142 0x7c 0x0000007e /* PORT0_STATUS */
143 0x94 0x0000007e /* PORT6 STATUS */
144 >;
145 };
146 };
147
148 &eth0 {
149 status = "okay";
150
151 phy-handle = <&phy0>;
152 pll-data = <0x56000000 0x00000101 0x00001616>;
153
154 gmac-config {
155 device = <&gmac>;
156 rgmii-enabled = <1>;
157 };
158 };
159
160 &eth1 {
161 status = "okay";
162
163 pll-data = <0x03000101 0x00000101 0x00001616>;
164
165 fixed-link {
166 speed = <1000>;
167 full-duplex;
168 };
169 };
170
171 &wmac {
172 status = "okay";
173 };