ath79: initial tl-wr1043nd v1 support
[openwrt/openwrt.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 port@1 {
108 reg = <1>;
109 #trigger-source-cells = <0>;
110
111 hub_port: port@1 {
112 reg = <1>;
113 #trigger-source-cells = <0>;
114 };
115 };
116 };
117
118 &usb_phy {
119 status = "okay";
120 };
121
122 &spi {
123 status = "okay";
124 num-cs = <1>;
125
126 flash@0 {
127 #address-cells = <1>;
128 #size-cells = <1>;
129 compatible = "jedec,spi-nor";
130 reg = <0>;
131 spi-max-frequency = <25000000>;
132
133 partitions {
134 compatible = "fixed-partitions";
135 #address-cells = <1>;
136 #size-cells = <1>;
137
138 uboot: partition@0 {
139 label = "u-boot";
140 reg = <0x000000 0x020000>;
141 read-only;
142 };
143
144 partition@020000 {
145 label = "firmware";
146 reg = <0x020000 0x7D0000>;
147 };
148
149 art: partition@7F0000 {
150 label = "art";
151 reg = <0x7F0000 0x010000>;
152 read-only;
153 };
154 };
155 };
156 };
157
158 &eth0 {
159 status = "okay";
160
161 phy-mode = "rgmii";
162 mtd-mac-address = <&uboot 0x1fc00>;
163
164 resets = <&rst 9>;
165 reset-names = "mac";
166
167 phy-handle = <&phy0>;
168 fixed-link {
169 speed = <1000>;
170 full-duplex;
171 };
172 };
173
174 &wmac {
175 status = "okay";
176 mtd-cal-data = <&art 0x1000>;
177 mtd-mac-address = <&uboot 0x1fc00>;
178 };