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