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