ath79: add tl-wr2543-v1 support
[openwrt/openwrt.git] / target / linux / ath79 / dts / ar7242_tl-wr2543-v1.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /dts-v1/;
3
4 #include <dt-bindings/gpio/gpio.h>
5 #include <dt-bindings/input/input.h>
6
7 #include "ar7242.dtsi"
8
9 / {
10 compatible = "tplink,tl-wr2543-v1", "qca,ar7242";
11 model = "TP-LINK TL-WR2543N/ND";
12
13 aliases {
14 led-status = &system;
15 };
16
17 chosen {
18 bootargs = "console=ttyS0,115200n8";
19 };
20
21 memory@0 {
22 device_type = "memory";
23 reg = <0x0 0x4000000>;
24 };
25
26 extosc: ref {
27 compatible = "fixed-clock";
28 #clock-cells = <0>;
29 clock-frequency = <40000000>;
30 };
31
32 gpio-keys {
33 compatible = "gpio-keys-polled";
34 #address-cells = <1>;
35 #size-cells = <0>;
36 poll-interval = <20>;
37
38 reset {
39 label = "reset";
40 linux,code = <KEY_RESTART>;
41 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
42 debounce-interval = <60>;
43 };
44
45 wps {
46 label = "wps";
47 linux,code = <KEY_WPS_BUTTON>;
48 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
49 debounce-interval = <60>;
50 };
51 };
52
53 leds {
54 compatible = "gpio-leds";
55
56 system: wps {
57 label = "tplink:green:wps";
58 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
59 default-state = "off";
60 };
61
62 usb {
63 label = "tplink:green:usb";
64 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
65 default-state = "off";
66 trigger-sources = <&hub_port>;
67 linux,default-trigger = "usbport";
68 };
69 };
70
71 ath9k-leds {
72 compatible = "gpio-leds";
73
74 wlan2g {
75 label = "tplink:green:wlan2g";
76 gpios = <&ath9k 0 GPIO_ACTIVE_LOW>;
77 default-state = "off";
78 linux,default-trigger = "phy0tpt";
79 };
80
81 wlan5g {
82 label = "tplink:green:wlan5g";
83 gpios = <&ath9k 1 GPIO_ACTIVE_LOW>;
84 default-state = "off";
85 linux,default-trigger = "phy0tpt";
86 };
87
88 };
89
90 rtl8367 {
91 compatible = "realtek,rtl8367";
92 gpio-sda = <&gpio 1 GPIO_ACTIVE_HIGH>;
93 gpio-sck = <&gpio 6 GPIO_ACTIVE_HIGH>;
94 realtek,extif0 = <1 0 1 1 1 1 1 1 2>;
95
96 mdio-bus {
97 status = "okay";
98
99 phy0: ethernet-phy@0 {
100 reg = <0>;
101 };
102 };
103 };
104 };
105
106 &pll {
107 clocks = <&extosc>;
108 };
109
110 &spi {
111 status = "okay";
112 num-cs = <1>;
113
114 flash@0 {
115 #address-cells = <1>;
116 #size-cells = <1>;
117 compatible = "jedec,spi-nor";
118 reg = <0>;
119 spi-max-frequency = <25000000>;
120
121 partitions {
122 compatible = "fixed-partitions";
123 #address-cells = <1>;
124 #size-cells = <1>;
125
126 uboot: partition@0 {
127 label = "u-boot";
128 reg = <0x000000 0x020000>;
129 read-only;
130 };
131
132 partition@20000 {
133 label = "firmware";
134 reg = <0x020000 0x7d0000>;
135 };
136
137 partition@7f0000 {
138 label = "art";
139 reg = <0x7f0000 0x010000>;
140 read-only;
141 };
142 };
143 };
144 };
145
146 &uart {
147 status = "okay";
148 };
149
150 &usb {
151 status = "okay";
152
153 hub_port: port@1 {
154 reg = <1>;
155 #trigger-source-cells = <0>;
156 };
157 };
158
159 &usb_phy {
160 status = "okay";
161 };
162
163 &pcie {
164 status = "okay";
165
166 ath9k: wifi@0 {
167 reg = <0x0000 0 0 0 0>;
168 #gpio-cells = <2>;
169 gpio-controller;
170 qca,no-eeprom;
171 mtd-mac-address = <&uboot 0x1fc00>;
172 };
173 };
174
175 &eth0 {
176 status = "okay";
177
178 phy-mode = "rgmii";
179 mtd-mac-address = <&uboot 0x1fc00>;
180
181 phy-handle = <&phy0>;
182 fixed-link {
183 speed = <1000>;
184 full-duplex;
185 };
186 };