ath79: force SGMII SerDes mode to MAC operation
[openwrt/openwrt.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 label-mac-device = &eth1;
15 };
16
17 leds: leds {
18 compatible = "gpio-leds";
19
20 led_system: system {
21 label = "green:system";
22 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
23 default-state = "on";
24 };
25
26 usb1 {
27 label = "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 = "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 = "green:wlan2g";
42 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
43 linux,default-trigger = "phy1tpt";
44 };
45
46 qss {
47 label = "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 &usb_phy0 {
85 status = "okay";
86 };
87
88 &usb0 {
89 #address-cells = <1>;
90 #size-cells = <0>;
91 status = "okay";
92
93 hub_port0: port@1 {
94 reg = <1>;
95 #trigger-source-cells = <0>;
96 };
97 };
98
99 &usb_phy1 {
100 status = "okay";
101 };
102
103 &usb1 {
104 #address-cells = <1>;
105 #size-cells = <0>;
106 status = "okay";
107
108 hub_port1: port@1 {
109 reg = <1>;
110 #trigger-source-cells = <0>;
111 };
112 };
113
114 &spi {
115 status = "okay";
116
117 flash@0 {
118 compatible = "jedec,spi-nor";
119 reg = <0>;
120 spi-max-frequency = <25000000>;
121
122 mtdparts: partitions {
123 compatible = "fixed-partitions";
124 #address-cells = <1>;
125 #size-cells = <1>;
126 };
127 };
128 };
129
130 &mdio0 {
131 status = "okay";
132
133 phy0: ethernet-phy@0 {
134 reg = <0>;
135
136 qca,ar8327-initvals = <
137 0x04 0x00080080 /* PORT0 PAD MODE CTRL */
138 0x0c 0x07600000 /* PORT6 PAD MODE CTRL */
139 0x50 0xc737c737 /* LED_CTRL0 */
140 0x54 0x00000000 /* LED_CTRL1 */
141 0x58 0x00000000 /* LED_CTRL2 */
142 0x5c 0x0030c300 /* LED_CTRL3 */
143 0x7c 0x0000007e /* PORT0_STATUS */
144 0x94 0x0000007e /* PORT6 STATUS */
145 >;
146 };
147 };
148
149 &eth0 {
150 status = "okay";
151
152 mtd-mac-address = <&uboot 0x1fc00>;
153 mtd-mac-address-increment = <1>;
154 phy-handle = <&phy0>;
155 pll-data = <0x56000000 0x00000101 0x00001616>;
156
157 gmac-config {
158 device = <&gmac>;
159 rgmii-enabled = <1>;
160 };
161 };
162
163 &eth1 {
164 status = "okay";
165
166 mtd-mac-address = <&uboot 0x1fc00>;
167 pll-data = <0x03000101 0x00000101 0x00001616>;
168
169 fixed-link {
170 speed = <1000>;
171 full-duplex;
172 };
173 };
174
175 &wmac {
176 status = "okay";
177
178 mtd-cal-data = <&art 0x1000>;
179 mtd-mac-address = <&uboot 0x1fc00>;
180 };