generic: 6.1, 6.6: remove patch which breaks WAN on MT7621
[openwrt/openwrt.git] / target / linux / ath79 / dts / ar7241_tplink_tl-wr842n-v1.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "ar7241.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7 #include <dt-bindings/leds/common.h>
8
9 / {
10 compatible = "tplink,tl-wr842n-v1", "qca,ar7241";
11 model = "TP-Link TL-WR842N/ND v1";
12
13 aliases {
14 led-boot = &led_system;
15 led-failsafe = &led_system;
16 led-running = &led_system;
17 led-upgrade = &led_system;
18 label-mac-device = &ath9k;
19 };
20
21 keys {
22 compatible = "gpio-keys";
23
24 rfkill {
25 label = "rfkill";
26 linux,code = <KEY_RFKILL>;
27 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
28 debounce-interval = <60>;
29 };
30
31 reset {
32 label = "reset";
33 linux,code = <KEY_RESTART>;
34 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
35 debounce-interval = <60>;
36 };
37 };
38
39 leds {
40 compatible = "gpio-leds";
41
42 led_system: system {
43 label = "green:system";
44 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
45 };
46
47 qss {
48 label = "green:qss";
49 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
50 };
51
52 led3g {
53 label = "green:3g";
54 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
55 trigger-sources = <&hub_port>;
56 linux,default-trigger = "usbport";
57 };
58 };
59
60 ath9k-leds {
61 compatible = "gpio-leds";
62
63 wlan {
64 function = LED_FUNCTION_WLAN;
65 color = <LED_COLOR_ID_GREEN>;
66 gpios = <&ath9k 0 GPIO_ACTIVE_LOW>;
67 linux,default-trigger = "phy0tpt";
68 };
69 };
70
71 gpio-export {
72 compatible = "gpio-export";
73
74 gpio_usb_power {
75 gpio-export,name = "tp-link:power:usb";
76 gpio-export,output = <1>;
77 gpios = <&gpio 6 GPIO_ACTIVE_HIGH>;
78 };
79 };
80 };
81
82 &usb {
83 status = "okay";
84 };
85
86 &usb_phy {
87 status = "okay";
88 };
89
90 &spi {
91 status = "okay";
92
93 flash@0 {
94 compatible = "jedec,spi-nor";
95 reg = <0>;
96 spi-max-frequency = <25000000>;
97
98 partitions {
99 compatible = "fixed-partitions";
100 #address-cells = <1>;
101 #size-cells = <1>;
102
103 uboot: partition@0 {
104 reg = <0x0 0x20000>;
105 label = "u-boot";
106 read-only;
107
108 nvmem-layout {
109 compatible = "fixed-layout";
110 #address-cells = <1>;
111 #size-cells = <1>;
112
113 macaddr_uboot_1fc00: macaddr@1fc00 {
114 compatible = "mac-base";
115 reg = <0x1fc00 0x6>;
116 #nvmem-cell-cells = <1>;
117 };
118 };
119 };
120
121 partition@20000 {
122 compatible = "tplink,firmware";
123 reg = <0x20000 0x7d0000>;
124 label = "firmware";
125 };
126
127 partition@7f0000 {
128 reg = <0x7f0000 0x10000>;
129 label = "art";
130 read-only;
131 };
132 };
133 };
134 };
135
136 &pcie {
137 status = "okay";
138
139 ath9k: wifi@0,0 {
140 compatible = "pci168c,002e";
141 reg = <0x0000 0 0 0 0>;
142 #gpio-cells = <2>;
143 gpio-controller;
144 qca,no-eeprom;
145 nvmem-cells = <&macaddr_uboot_1fc00 0>;
146 nvmem-cell-names = "mac-address";
147 };
148 };
149
150 &eth0 {
151 status = "okay";
152
153 nvmem-cells = <&macaddr_uboot_1fc00 (-1)>;
154 nvmem-cell-names = "mac-address";
155 };
156
157 &eth1 {
158 nvmem-cells = <&macaddr_uboot_1fc00 1>;
159 nvmem-cell-names = "mac-address";
160 };