ath79: update WA/XC devices UBNT_VERSION to 8.7.4
[openwrt/staging/wigyori.git] / target / linux / ath79 / dts / ar9344_tplink_tl-wr841hp-v2.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "ar9344.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 model = "TP-Link TL-WR841HP v2";
11 compatible = "tplink,tl-wr841hp-v2", "qca,ar9344";
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 = &wmac;
19 };
20
21 keys {
22 compatible = "gpio-keys";
23
24 reset {
25 linux,code = <KEY_RESTART>;
26 gpios = <&gpio 4 GPIO_ACTIVE_HIGH>;
27 debounce-interval = <60>;
28 };
29 };
30
31 leds {
32 compatible = "gpio-leds";
33
34 wan {
35 function = LED_FUNCTION_WAN;
36 color = <LED_COLOR_ID_GREEN>;
37 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
38 };
39
40 lan1 {
41 label = "green:lan1";
42 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
43 };
44
45 lan2 {
46 label = "green:lan2";
47 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
48 };
49
50 lan3 {
51 label = "green:lan3";
52 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
53 };
54
55 lan4 {
56 label = "green:lan4";
57 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
58 };
59
60 wps {
61 function = LED_FUNCTION_WPS;
62 color = <LED_COLOR_ID_GREEN>;
63 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
64 };
65
66 wlan {
67 function = LED_FUNCTION_WLAN;
68 color = <LED_COLOR_ID_GREEN>;
69 gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
70 linux,default-trigger = "phy0tpt";
71 };
72
73 led_system: system {
74 label = "green:system";
75 gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
76 default-state = "on";
77 };
78 };
79 };
80
81 &ref {
82 clock-frequency = <40000000>;
83 };
84
85 &spi {
86 status = "okay";
87
88 flash@0 {
89 compatible = "jedec,spi-nor";
90 reg = <0>;
91 spi-max-frequency = <25000000>;
92
93 partitions {
94 compatible = "fixed-partitions";
95 #address-cells = <1>;
96 #size-cells = <1>;
97
98 uboot: partition@0 {
99 label = "u-boot";
100 reg = <0x000000 0x020000>;
101 read-only;
102
103 nvmem-layout {
104 compatible = "fixed-layout";
105 #address-cells = <1>;
106 #size-cells = <1>;
107
108 macaddr_uboot_1fc00: macaddr@1fc00 {
109 compatible = "mac-base";
110 reg = <0x1fc00 0x6>;
111 #nvmem-cell-cells = <1>;
112 };
113 };
114 };
115
116 partition@20000 {
117 compatible = "tplink,firmware";
118 label = "firmware";
119 reg = <0x020000 0x7d0000>;
120 };
121
122 art: partition@7f0000 {
123 label = "art";
124 reg = <0x7f0000 0x010000>;
125 read-only;
126 };
127 };
128 };
129 };
130
131 &gpio {
132 gpio_ext_lna0 {
133 gpio-hog;
134 gpios = <18 GPIO_ACTIVE_HIGH>;
135 output-high;
136 line-name = "tp-link:ext:lna0";
137 };
138
139 gpio_ext_lna1 {
140 gpio-hog;
141 gpios = <19 GPIO_ACTIVE_HIGH>;
142 output-high;
143 line-name = "tp-link:ext:lna1";
144 };
145 };
146
147 &wmac {
148 status = "okay";
149
150 mtd-cal-data = <&art 0x1000>;
151
152 nvmem-cells = <&macaddr_uboot_1fc00 0>;
153 nvmem-cell-names = "mac-address";
154 };
155
156 &eth0 {
157 status = "okay";
158
159 phy-handle = <&swphy0>;
160
161 nvmem-cells = <&macaddr_uboot_1fc00 1>;
162 nvmem-cell-names = "mac-address";
163 };
164
165 &eth1 {
166 status = "okay";
167
168 nvmem-cells = <&macaddr_uboot_1fc00 0>;
169 nvmem-cell-names = "mac-address";
170
171 gmac-config {
172 device = <&gmac>;
173 switch-phy-swap = <1>;
174 };
175 };