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