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