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