ath79: move usb led trigger node to SoC 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 aliases {
10 label-mac-device = &wmac;
11 };
12
13 keys {
14 compatible = "gpio-keys";
15
16 rfkill {
17 label = "WiFi";
18 linux,code = <KEY_RFKILL>;
19 gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
20 debounce-interval = <60>;
21 };
22
23 reset {
24 label = "Reset";
25 linux,code = <KEY_RESTART>;
26 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
27 debounce-interval = <60>;
28 };
29 };
30
31 gpio-export {
32 compatible = "gpio-export";
33
34 gpio_usb_power {
35 gpio-export,name = "tp-link:power:usb";
36 gpio-export,output = <1>;
37 gpios = <&gpio 4 GPIO_ACTIVE_HIGH>;
38 };
39 };
40 };
41
42 &leds {
43 usb {
44 label = "green:usb";
45 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
46 trigger-sources = <&hub_port>;
47 linux,default-trigger = "usbport";
48 };
49 };
50
51 &spi {
52 status = "okay";
53
54 flash@0 {
55 compatible = "jedec,spi-nor";
56 reg = <0>;
57 spi-max-frequency = <25000000>;
58
59 partitions {
60 compatible = "fixed-partitions";
61 #address-cells = <1>;
62 #size-cells = <1>;
63
64 uboot: partition@0 {
65 label = "u-boot";
66 reg = <0x000000 0x020000>;
67 read-only;
68 };
69
70 partition@20000 {
71 compatible = "tplink,firmware";
72 label = "firmware";
73 reg = <0x020000 0x7d0000>;
74 };
75
76 art: partition@7f0000 {
77 label = "art";
78 reg = <0x7f0000 0x010000>;
79 read-only;
80 };
81 };
82 };
83 };
84
85 &usb {
86 status = "okay";
87 };
88
89 &usb_phy {
90 status = "okay";
91 };
92
93 &eth0 {
94 nvmem-cells = <&macaddr_uboot_1fc00>;
95 nvmem-cell-names = "mac-address";
96 mac-address-increment = <(-1)>;
97 };
98
99 &eth1 {
100 phy-handle = <&swphy4>;
101
102 nvmem-cells = <&macaddr_uboot_1fc00>;
103 nvmem-cell-names = "mac-address";
104 };
105
106 &wmac {
107 mtd-cal-data = <&art 0x1000>;
108
109 nvmem-cells = <&macaddr_uboot_1fc00>;
110 nvmem-cell-names = "mac-address";
111 };
112
113 &uboot {
114 compatible = "nvmem-cells";
115 #address-cells = <1>;
116 #size-cells = <1>;
117
118 macaddr_uboot_1fc00: macaddr@1fc00 {
119 reg = <0x1fc00 0x6>;
120 };
121 };