treewide: fix some cosmetic glitches in dts files
[openwrt/staging/wigyori.git] / target / linux / ath79 / dts / qca9558_tplink_tl-wdr4900-v2.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 "qca9557.dtsi"
8
9 / {
10 compatible = "tplink,tl-wdr4900-v2", "qca,qca9558";
11 model = "TP-Link TL-WDR4900 v2";
12
13 chosen {
14 bootargs = "console=ttyS0,115200n8";
15 };
16
17 aliases {
18 led-boot = &led_system;
19 led-failsafe = &led_system;
20 led-running = &led_system;
21 led-upgrade = &led_system;
22 };
23
24 gpio_leds: leds {
25 compatible = "gpio-leds";
26
27 led_system: system {
28 label = "tp-link:blue:system";
29 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
30 default-state = "on";
31 };
32
33 usb1 {
34 label = "tp-link:green:usb1";
35 gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
36 default-state = "off";
37 trigger-sources = <&hub_port1>;
38 linux,default-trigger = "usbport";
39 };
40
41 usb2 {
42 label = "tp-link:green:usb2";
43 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
44 default-state = "off";
45 trigger-sources = <&hub_port0>;
46 linux,default-trigger = "usbport";
47 };
48
49 wlan2g {
50 label = "tp-link:blue:wlan2g";
51 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
52 default-state = "off";
53 linux,default-trigger = "phy0tpt";
54 };
55
56 qss {
57 label = "tp-link:blue:qss";
58 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
59 default-state = "off";
60 };
61 };
62
63 ath9k-leds {
64 compatible = "gpio-leds";
65
66 wlan5g {
67 label = "tp-link:blue:wlan5g";
68 gpios = <&ath9k 0 GPIO_ACTIVE_LOW>;
69 default-state = "off";
70 linux,default-trigger = "phy1tpt";
71 };
72 };
73
74 keys {
75 compatible = "gpio-keys";
76
77 reset {
78 label = "Reset button";
79 linux,code = <KEY_RESTART>;
80 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
81 debounce-interval = <60>;
82 };
83 };
84
85 gpio-export {
86 compatible = "gpio-export";
87
88 gpio_usb1_power {
89 gpio-export,name = "tp-link:power:usb1";
90 gpio-export,output = <1>;
91 gpios = <&gpio 21 GPIO_ACTIVE_HIGH>;
92 };
93
94 gpio_usb2_power {
95 gpio-export,name = "tp-link:power:usb2";
96 gpio-export,output = <1>;
97 gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
98 };
99 };
100 };
101
102 &pcie1 {
103 status = "okay";
104
105 ath9k: wifi@0,0 {
106 compatible = "pci168c,0033";
107 reg = <0x0000 0 0 0 0>;
108 mtd-mac-address = <&uboot 0x1fc00>;
109 mtd-mac-address-increment = <(-2)>;
110 qca,no-eeprom;
111 #gpio-cells = <2>;
112 gpio-controller;
113 };
114 };
115
116 &uart {
117 status = "okay";
118 };
119
120 &usb_phy0 {
121 status = "okay";
122 };
123
124 &usb0 {
125 #address-cells = <1>;
126 #size-cells = <0>;
127 status = "okay";
128
129 hub_port0: port@1 {
130 reg = <1>;
131 #trigger-source-cells = <0>;
132 };
133 };
134
135 &usb_phy1 {
136 status = "okay";
137 };
138
139 &usb1 {
140 #address-cells = <1>;
141 #size-cells = <0>;
142 status = "okay";
143
144 hub_port1: port@1 {
145 reg = <1>;
146 #trigger-source-cells = <0>;
147 };
148 };
149
150 &spi {
151 status = "okay";
152 num-cs = <1>;
153
154 flash@0 {
155 compatible = "jedec,spi-nor";
156 reg = <0>;
157 spi-max-frequency = <25000000>;
158
159 partitions {
160 compatible = "fixed-partitions";
161 #address-cells = <1>;
162 #size-cells = <1>;
163
164 uboot: partition@0 {
165 label = "u-boot";
166 reg = <0x000000 0x020000>;
167 read-only;
168 };
169
170 partition@20000 {
171 label = "firmware";
172 reg = <0x020000 0x7d0000>;
173 };
174
175 art: partition@7f0000 {
176 label = "art";
177 reg = <0x7f0000 0x010000>;
178 read-only;
179 };
180 };
181 };
182 };
183
184 &mdio0 {
185 status = "okay";
186
187 phy0: ethernet-phy@0 {
188 reg = <0>;
189
190 qca,ar8327-initvals = <
191 0x04 0x00080080 /* PORT0 PAD MODE CTRL */
192 0x0c 0x07600000 /* PORT6 PAD MODE CTRL */
193 0x50 0xc737c737 /* LED_CTRL0 */
194 0x54 0x00000000 /* LED_CTRL1 */
195 0x58 0x00000000 /* LED_CTRL2 */
196 0x5c 0x0030c300 /* LED_CTRL3 */
197 0x7c 0x0000007e /* PORT0_STATUS */
198 0x94 0x0000007e /* PORT6 STATUS */
199 >;
200 };
201 };
202
203 &eth0 {
204 status = "okay";
205
206 mtd-mac-address = <&uboot 0x1fc00>;
207 mtd-mac-address-increment = <1>;
208 phy-handle = <&phy0>;
209 pll-data = <0x56000000 0x00000101 0x00001616>;
210
211 gmac-config {
212 device = <&gmac>;
213 rgmii-enabled = <1>;
214 };
215 };
216
217 &eth1 {
218 status = "okay";
219
220 mtd-mac-address = <&uboot 0x1fc00>;
221 pll-data = <0x03000101 0x00000101 0x00001616>;
222
223 fixed-link {
224 speed = <1000>;
225 full-duplex;
226 };
227 };
228
229 &wmac {
230 status = "okay";
231 mtd-cal-data = <&art 0x1000>;
232 mtd-mac-address = <&uboot 0x1fc00>;
233 mtd-mac-address-increment = <(-1)>;
234 };