ath79: DTS file style update and harmonization
[oweals/openwrt.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
113                 partitions {
114                         compatible = "fixed-partitions";
115                         #address-cells = <1>;
116                         #size-cells = <1>;
117
118                         uboot:  partition@0 {
119                                 label = "u-boot";
120                                 reg = <0x000000 0x020000>;
121                                 read-only;
122                         };
123
124                         partition@20000 {
125                                 compatible = "tplink,firmware";
126                                 label = "firmware";
127                                 reg = <0x020000 0x7d0000>;
128                         };
129
130                         partition@7f0000 {
131                                 label = "art";
132                                 reg = <0x7f0000 0x010000>;
133                                 read-only;
134                         };
135                 };
136         };
137 };
138
139 &uart {
140         status = "okay";
141 };
142
143 &usb {
144         #address-cells = <1>;
145         #size-cells = <0>;
146         status = "okay";
147
148         hub_port: port@1 {
149                 reg = <1>;
150                 #trigger-source-cells = <0>;
151         };
152 };
153
154 &usb_phy {
155         status = "okay";
156 };
157
158 &pcie {
159         status = "okay";
160
161         ath9k: wifi@0,0 {
162                 reg = <0x0000 0 0 0 0>;
163                 #gpio-cells = <2>;
164                 gpio-controller;
165                 qca,no-eeprom;
166                 mtd-mac-address = <&uboot 0x1fc00>;
167         };
168 };
169
170 &eth0 {
171         status = "okay";
172
173         phy-mode = "rgmii";
174         mtd-mac-address = <&uboot 0x1fc00>;
175
176         phy-handle = <&phy0>;
177         fixed-link {
178                 speed = <1000>;
179                 full-duplex;
180         };
181 };