ath79: fix usb led on wr-1043nd-v1
[openwrt/staging/hauke.git] / target / linux / ath79 / dts / ar9132_tl-wr1043nd-v1.dts
1 // SPDX-License-Identifier: GPL-2.0
2 /dts-v1/;
3
4 #include <dt-bindings/gpio/gpio.h>
5 #include <dt-bindings/input/input.h>
6
7 #include "ar9132.dtsi"
8
9 / {
10 compatible = "tplink,tl-wr1043nd-v1", "qca,ar9132";
11 model = "TP-Link TL-WR1043ND Version 1";
12
13 aliases {
14 led-status = &system;
15 };
16
17 memory@0 {
18 device_type = "memory";
19 reg = <0x0 0x2000000>;
20 };
21
22 extosc: ref {
23 compatible = "fixed-clock";
24 #clock-cells = <0>;
25 clock-frequency = <40000000>;
26 };
27
28 keys {
29 compatible = "gpio-keys";
30 #address-cells = <1>;
31 #size-cells = <0>;
32
33 button0 {
34 label = "reset";
35 linux,code = <KEY_RESTART>;
36 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
37 debounce-interval = <60>;
38 };
39
40 button1 {
41 label = "qss";
42 linux,code = <KEY_WPS_BUTTON>;
43 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
44 debounce-interval = <60>;
45 };
46 };
47
48 leds {
49 compatible = "gpio-leds";
50 usb {
51 label = "tp-link:green:usb";
52 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
53 default-state = "off";
54 trigger-sources = <&hub_port>;
55 linux,default-trigger = "usbport";
56 };
57
58 system: system {
59 label = "tp-link:green:system";
60 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
61 linux,default-trigger = "heartbeat";
62 };
63
64 qss {
65 label = "tp-link:green:qss";
66 gpios = <&gpio 5 GPIO_ACTIVE_HIGH>;
67 };
68
69 wlan {
70 label = "tp-link:green:wlan";
71 gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
72 default-state = "off";
73 linux,default-trigger = "phy0tpt";
74 };
75 };
76
77 rtl8366rb {
78 compatible = "realtek,rtl8366rb";
79 gpio-sda = <&gpio 18 GPIO_ACTIVE_HIGH>;
80 gpio-sck = <&gpio 19 GPIO_ACTIVE_HIGH>;
81
82 resets = <&rst 8>;
83 reset-names = "switch";
84
85 mdio-bus {
86 status = "okay";
87
88 phy0: ethernet-phy@0 {
89 reg = <0>;
90 };
91 };
92 };
93
94 };
95
96 &uart {
97 status = "okay";
98 };
99
100 &pll {
101 clocks = <&extosc>;
102 };
103
104 &usb {
105 status = "okay";
106
107 hub_port: port@1 {
108 reg = <1>;
109 #trigger-source-cells = <0>;
110 };
111 };
112
113 &usb_phy {
114 status = "okay";
115 };
116
117 &spi {
118 status = "okay";
119 num-cs = <1>;
120
121 flash@0 {
122 #address-cells = <1>;
123 #size-cells = <1>;
124 compatible = "jedec,spi-nor";
125 reg = <0>;
126 spi-max-frequency = <25000000>;
127
128 partitions {
129 compatible = "fixed-partitions";
130 #address-cells = <1>;
131 #size-cells = <1>;
132
133 uboot: partition@0 {
134 label = "u-boot";
135 reg = <0x000000 0x020000>;
136 read-only;
137 };
138
139 partition@20000 {
140 label = "firmware";
141 reg = <0x020000 0x7D0000>;
142 };
143
144 art: partition@7F0000 {
145 label = "art";
146 reg = <0x7F0000 0x010000>;
147 read-only;
148 };
149 };
150 };
151 };
152
153 &eth0 {
154 status = "okay";
155
156 phy-mode = "rgmii";
157 mtd-mac-address = <&uboot 0x1fc00>;
158
159 resets = <&rst 9>;
160 reset-names = "mac";
161
162 phy-handle = <&phy0>;
163 fixed-link {
164 speed = <1000>;
165 full-duplex;
166 };
167 };
168
169 &wmac {
170 status = "okay";
171 mtd-cal-data = <&art 0x1000>;
172 mtd-mac-address = <&uboot 0x1fc00>;
173 };