ath79: fix PLL settings for QCA955x
[oweals/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-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
60                 reset {
61                         label = "Reset button";
62                         linux,code = <KEY_RESTART>;
63                         gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
64                         debounce-interval = <60>;
65                 };
66         };
67
68         gpio-export {
69                 compatible = "gpio-export";
70
71                 gpio_usb1_power {
72                         gpio-export,name = "tp-link:power:usb1";
73                         gpio-export,output = <1>;
74                         gpios = <&gpio 21 GPIO_ACTIVE_HIGH>;
75                 };
76
77                 gpio_usb2_power {
78                         gpio-export,name = "tp-link:power:usb2";
79                         gpio-export,output = <1>;
80                         gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
81                 };
82
83         };
84 };
85
86 &pcie1 {
87         status = "okay";
88 };
89
90 &uart {
91         status = "okay";
92 };
93
94 &gpio {
95         status = "okay";
96 };
97
98 &usb_phy0 {
99         status = "okay";
100 };
101
102 &usb0 {
103         #address-cells = <1>;
104         #size-cells = <0>;
105         status = "okay";
106
107         hub_port0: port@1 {
108                 reg = <1>;
109                 #trigger-source-cells = <0>;
110         };
111 };
112
113 &usb_phy1 {
114         status = "okay";
115 };
116
117 &usb1 {
118         #address-cells = <1>;
119         #size-cells = <0>;
120         status = "okay";
121
122         hub_port1: port@1 {
123                 reg = <1>;
124                 #trigger-source-cells = <0>;
125         };
126 };
127
128 &spi {
129         status = "okay";
130         num-cs = <1>;
131
132         flash@0 {
133                 compatible = "jedec,spi-nor";
134                 reg = <0>;
135                 spi-max-frequency = <25000000>;
136
137                 mtdparts: partitions {
138                         compatible = "fixed-partitions";
139                         #address-cells = <1>;
140                         #size-cells = <1>;
141                 };
142         };
143 };
144
145 &mdio0 {
146         status = "okay";
147
148         phy0: ethernet-phy@0 {
149                 reg = <0>;
150
151                 qca,ar8327-initvals = <
152                         0x04 0x00080080 /* PORT0 PAD MODE CTRL */
153                         0x0c 0x07600000 /* PORT6 PAD MODE CTRL */
154                         0x50 0xc737c737 /* LED_CTRL0 */
155                         0x54 0x00000000 /* LED_CTRL1 */
156                         0x58 0x00000000 /* LED_CTRL2 */
157                         0x5c 0x0030c300 /* LED_CTRL3 */
158                         0x7c 0x0000007e /* PORT0_STATUS */
159                         0x94 0x0000007e /* PORT6 STATUS */
160                         >;
161         };
162 };
163
164 &eth0 {
165         status = "okay";
166
167         mtd-mac-address = <&uboot 0x1fc00>;
168         mtd-mac-address-increment = <1>;
169         phy-handle = <&phy0>;
170         pll-data = <0x56000000 0x00000101 0x00001616>;
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         pll-data = <0x03000101 0x00000101 0x00001616>;
183
184         fixed-link {
185                 speed = <1000>;
186                 full-duplex;
187         };
188 };
189
190 &wmac {
191         status = "okay";
192         mtd-cal-data = <&art 0x1000>;
193         mtd-mac-address = <&uboot 0x1fc00>;
194 };