ath79: convert to new LED color/function format where possible
[openwrt/openwrt.git] / target / linux / ath79 / dts / qca9563_tplink_archer-x7-v5.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "qca956x.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 = "green:system";
22 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
23 default-state = "on";
24 };
25
26 usb {
27 function = LED_FUNCTION_USB;
28 color = <LED_COLOR_ID_GREEN>;
29 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
30 trigger-sources = <&hub_port0>;
31 linux,default-trigger = "usbport";
32 };
33
34 wlan5g {
35 label = "green:wlan5g";
36 gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
37 linux,default-trigger = "phy0tpt";
38 };
39
40 wlan2g {
41 label = "green:wlan2g";
42 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
43 linux,default-trigger = "phy1tpt";
44 };
45
46 wan {
47 function = LED_FUNCTION_WAN;
48 color = <LED_COLOR_ID_GREEN>;
49 gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
50 };
51
52 wan_fail {
53 function = LED_FUNCTION_WAN;
54 color = <LED_COLOR_ID_ORANGE>;
55 gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
56 };
57
58 lan1 {
59 label = "green:lan1";
60 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
61 };
62
63 lan2 {
64 label = "green:lan2";
65 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
66 };
67
68 lan3 {
69 label = "green:lan3";
70 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
71 };
72
73 lan4 {
74 label = "green:lan4";
75 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
76 };
77
78 wps {
79 function = LED_FUNCTION_WPS;
80 color = <LED_COLOR_ID_GREEN>;
81 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
82 };
83 };
84
85 keys: keys {
86 compatible = "gpio-keys";
87
88 wps {
89 label = "WPS button";
90 linux,code = <KEY_WPS_BUTTON>;
91 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
92 debounce-interval = <60>;
93 };
94 };
95
96 gpio-export {
97 compatible = "gpio-export";
98
99 gpio_usb_power {
100 gpio-export,name = "tp-link:power:usb";
101 gpio-export,output = <1>;
102 gpios = <&gpio 19 GPIO_ACTIVE_HIGH>;
103 };
104 };
105 };
106
107 &pcie {
108 status = "okay";
109 };
110
111 &usb_phy0 {
112 status = "okay";
113 };
114
115 &usb0 {
116 status = "okay";
117 };
118
119 &spi {
120 status = "okay";
121
122 flash@0 {
123 compatible = "jedec,spi-nor";
124 reg = <0>;
125 spi-max-frequency = <25000000>;
126
127 mtdparts: partitions {
128 compatible = "fixed-partitions";
129 #address-cells = <1>;
130 #size-cells = <1>;
131 };
132 };
133 };
134
135 &mdio0 {
136 status = "okay";
137
138 phy0: ethernet-phy@0 {
139 reg = <0>;
140 phy-mode = "sgmii";
141 qca,mib-poll-interval = <500>;
142
143 qca,ar8327-initvals = <
144 0x04 0x80080080 /* PORT0 PAD MODE CTRL */
145 0x08 0x00000000 /* PORT5 PAD MODE CTRL */
146 0x0c 0x00000000 /* PORT6 PAD MODE CTRL */
147 0x10 0x00000080 /* POWER_ON_STRAP */
148 0x7c 0x0000007e /* PORT0_STATUS */
149 0x94 0x00000200 /* PORT6_STATUS */
150 >;
151 };
152 };
153
154 &eth0 {
155 status = "okay";
156
157 pll-data = <0x03000101 0x00000101 0x00001919>;
158
159 phy-mode = "sgmii";
160 phy-handle = <&phy0>;
161 };
162
163 &wmac {
164 status = "okay";
165 };