ath79: fix/improve LED control for TL-WPA8630 v1/v2
[openwrt/openwrt.git] / target / linux / ath79 / dts / qca9563_tplink_tl-wpa8630.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 #include "qca956x.dtsi"
7
8 / {
9 aliases {
10 led-boot = &led_power;
11 led-failsafe = &led_power;
12 led-running = &led_power;
13 led-upgrade = &led_power;
14 };
15
16 keys {
17 compatible = "gpio-keys";
18
19 reset {
20 label = "Reset button";
21 linux,code = <KEY_RESTART>;
22 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
23 debounce-interval = <60>;
24 };
25
26 leds {
27 label = "LED control button";
28 linux,code = <KEY_LIGHTS_TOGGLE>;
29 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
30 debounce-interval = <60>;
31 };
32
33 pair {
34 label = "Pair button";
35 linux,code = <BTN_1>;
36 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
37 debounce-interval = <60>;
38 };
39
40 wifi {
41 label = "WiFi button";
42 linux,code = <KEY_RFKILL>;
43 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
44 debounce-interval = <60>;
45 };
46 };
47
48 leds {
49 compatible = "gpio-leds";
50
51 led_power: power {
52 label = "tp-link:green:power";
53 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
54 };
55
56 lan {
57 label = "tp-link:green:lan";
58 gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
59 };
60
61 wifi2g {
62 label = "tp-link:green:wifi2g";
63 gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
64 linux,default-trigger = "phy1tpt";
65 };
66
67 wifi5g {
68 label = "tp-link:green:wifi5g";
69 gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
70 linux,default-trigger = "phy0tpt";
71 };
72 };
73
74 gpio-export {
75 compatible = "gpio-export";
76
77 led_control {
78 gpio-export,name = "tp-link:led:control";
79 gpio-export,output = <0>;
80 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
81 };
82 };
83 };
84
85 &spi {
86 status = "okay";
87
88 num-cs = <1>;
89
90 flash@0 {
91 compatible = "jedec,spi-nor";
92 reg = <0>;
93 spi-max-frequency = <25000000>;
94
95 partitions: partitions {
96 compatible = "fixed-partitions";
97 #address-cells = <1>;
98 #size-cells = <1>;
99 };
100 };
101 };
102
103 &pcie {
104 status = "okay";
105 };
106
107 &uart {
108 status = "okay";
109 };
110
111 &mdio0 {
112 status = "okay";
113
114 phy-mask = <0>;
115
116 phy0: ethernet-phy@0 {
117 reg = <0>;
118 phy-mode = "sgmii";
119 qca,mib-poll-interval = <500>;
120
121 qca,ar8327-initvals = <
122 0x04 0x00080080 /* PORT0 PAD MODE CTRL */
123 0x7c 0x0000007e /* PORT0_STATUS */
124 >;
125 };
126 };
127
128 &eth0 {
129 status = "okay";
130
131 phy-handle = <&phy0>;
132 phy-mode = "sgmii";
133 };
134
135 &wmac {
136 status = "okay";
137
138 mtd-cal-data = <&art 0x1000>;
139 };