598c5570aa916b367d2c8e5b9d8c5cbc87da9a5d
[openwrt/openwrt.git] / target / linux / ath79 / dts / qca9558_tplink_archer-d7.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 {
17 compatible = "gpio-leds";
18
19 led_system: system {
20 label = "white:system";
21 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
22 default-state = "on";
23 };
24
25 wlan {
26 label = "white:wlan";
27 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
28 };
29
30 lan {
31 label = "white:lan";
32 gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
33 };
34
35 usb {
36 label = "white:usb";
37 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
38 trigger-sources = <&hub_port1>, <&hub_port0>;
39 linux,default-trigger = "usbport";
40 };
41
42 qss {
43 label = "white:qss";
44 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
45 };
46 };
47
48 keys {
49 compatible = "gpio-keys";
50
51 wifi {
52 label = "WiFi button";
53 linux,code = <KEY_RFKILL>;
54 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
55 };
56
57 wps {
58 label = "WPS button";
59 linux,code = <KEY_WPS_BUTTON>;
60 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
61 };
62
63 reset {
64 label = "Reset button";
65 linux,code = <KEY_RESTART>;
66 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
67 };
68 };
69
70 reg_usb0_vbus: regulator {
71 compatible = "regulator-fixed";
72 regulator-name = "usb_vbus";
73 regulator-min-microvolt = <5000000>;
74 regulator-max-microvolt = <5000000>;
75 gpio = <&gpio 21 GPIO_ACTIVE_HIGH>;
76 enable-active-high;
77 };
78
79 reg_usb1_vbus: regulator {
80 compatible = "regulator-fixed";
81 regulator-name = "usb_vbus";
82 regulator-min-microvolt = <5000000>;
83 regulator-max-microvolt = <5000000>;
84 gpio = <&gpio 22 GPIO_ACTIVE_HIGH>;
85 enable-active-high;
86 };
87 };
88
89 &mdio0 {
90 status = "okay";
91
92 phy0: ethernet-phy@0 {
93 reg = <0>;
94
95 qca,ar8327-initvals = <
96 0x04 0x00080080 /* PORT0 PAD MODE CTRL */
97 0x0c 0x07600000 /* PORT6 PAD MODE CTRL */
98 0x50 0xc737c737 /* LED_CTRL0 */
99 0x54 0x00000000 /* LED_CTRL1 */
100 0x58 0x00000000 /* LED_CTRL2 */
101 0x5c 0x0030c300 /* LED_CTRL3 */
102 0x7c 0x0000007e /* PORT0_STATUS */
103 0x94 0x0000007e /* PORT6 STATUS */
104 >;
105 };
106 };
107
108 &eth0 {
109 status = "okay";
110
111 phy-handle = <&phy0>;
112 pll-data = <0x56000000 0x00000101 0x00001616>;
113
114 gmac-config {
115 device = <&gmac>;
116 rgmii-enabled = <1>;
117 };
118 };
119
120 &eth1 {
121 status = "okay";
122
123 pll-data = <0x03000101 0x00000101 0x00001616>;
124
125 fixed-link {
126 speed = <1000>;
127 full-duplex;
128 };
129 };
130
131 &wmac {
132 status = "okay";
133 };
134
135 &pcie1 {
136 status = "okay";
137 };
138
139 &uart {
140 status = "okay";
141 };
142
143 &usb_phy0 {
144 status = "okay";
145 };
146
147 &usb0 {
148 #address-cells = <1>;
149 #size-cells = <0>;
150 dr_mode = "host";
151 vbus-supply = <&reg_usb0_vbus>;
152 status = "okay";
153
154 hub_port0: port@1 {
155 reg = <1>;
156 #trigger-source-cells = <0>;
157 };
158 };
159
160 &usb_phy1 {
161 status = "okay";
162 };
163
164 &usb1 {
165 #address-cells = <1>;
166 #size-cells = <0>;
167 dr_mode = "host";
168 vbus-supply = <&reg_usb1_vbus>;
169 status = "okay";
170
171 hub_port1: port@1 {
172 reg = <1>;
173 #trigger-source-cells = <0>;
174 };
175 };