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