ath79: move dts-v1 statement to ath79.dtsi
[openwrt/openwrt.git] / target / linux / ath79 / dts / ar9341_tplink_tl-wr842n-v2.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "ar9341_tplink.dtsi"
4
5 / {
6 model = "TP-Link TL-WR842N/ND v2";
7 compatible = "tplink,tl-wr842n-v2", "qca,ar9341";
8
9 keys {
10 compatible = "gpio-keys";
11
12 rfkill {
13 label = "WiFi";
14 linux,code = <KEY_RFKILL>;
15 gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
16 debounce-interval = <60>;
17 };
18
19 reset {
20 label = "Reset";
21 linux,code = <KEY_RESTART>;
22 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
23 debounce-interval = <60>;
24 };
25 };
26
27 gpio-export {
28 compatible = "gpio-export";
29
30 gpio_usb_power {
31 gpio-export,name = "tp-link:power:usb";
32 gpio-export,output = <1>;
33 gpios = <&gpio 4 GPIO_ACTIVE_HIGH>;
34 };
35 };
36 };
37
38 &leds {
39 usb {
40 label = "tp-link:green:usb";
41 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
42 trigger-sources = <&hub_port>;
43 linux,default-trigger = "usbport";
44 };
45 };
46
47 &spi {
48 status = "okay";
49
50 num-cs = <1>;
51
52 flash@0 {
53 compatible = "jedec,spi-nor";
54 reg = <0>;
55 spi-max-frequency = <25000000>;
56
57 partitions {
58 compatible = "fixed-partitions";
59 #address-cells = <1>;
60 #size-cells = <1>;
61
62 uboot: partition@0 {
63 label = "u-boot";
64 reg = <0x000000 0x020000>;
65 read-only;
66 };
67
68 partition@20000 {
69 compatible = "tplink,firmware";
70 label = "firmware";
71 reg = <0x020000 0x7d0000>;
72 };
73
74 art: partition@7f0000 {
75 label = "art";
76 reg = <0x7f0000 0x010000>;
77 read-only;
78 };
79 };
80 };
81 };
82
83 &usb {
84 #address-cells = <1>;
85 #size-cells = <0>;
86 status = "okay";
87
88 hub_port: port@1 {
89 reg = <1>;
90 #trigger-source-cells = <0>;
91 };
92 };
93
94 &usb_phy {
95 status = "okay";
96 };
97
98 &eth1 {
99 phy-handle = <&swphy4>;
100 };