a3910d512bc9006df677902c803e6570f530f1c0
[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 reg = <0x1fc00 0x6>;
106 };
107 };
108 };
109
110 partition@20000 {
111 compatible = "tplink,firmware";
112 label = "firmware";
113 reg = <0x020000 0x7d0000>;
114 };
115
116 art: partition@7f0000 {
117 label = "art";
118 reg = <0x7f0000 0x010000>;
119 read-only;
120 };
121 };
122 };
123 };
124
125 &gpio {
126 gpio_ext_lna0 {
127 gpio-hog;
128 gpios = <18 GPIO_ACTIVE_HIGH>;
129 output-high;
130 line-name = "tp-link:ext:lna0";
131 };
132
133 gpio_ext_lna1 {
134 gpio-hog;
135 gpios = <19 GPIO_ACTIVE_HIGH>;
136 output-high;
137 line-name = "tp-link:ext:lna1";
138 };
139 };
140
141 &wmac {
142 status = "okay";
143
144 mtd-cal-data = <&art 0x1000>;
145
146 nvmem-cells = <&macaddr_uboot_1fc00>;
147 nvmem-cell-names = "mac-address";
148 };
149
150 &eth0 {
151 status = "okay";
152
153 phy-handle = <&swphy0>;
154
155 nvmem-cells = <&macaddr_uboot_1fc00>;
156 nvmem-cell-names = "mac-address";
157 mac-address-increment = <1>;
158 };
159
160 &eth1 {
161 status = "okay";
162
163 nvmem-cells = <&macaddr_uboot_1fc00>;
164 nvmem-cell-names = "mac-address";
165
166 gmac-config {
167 device = <&gmac>;
168 switch-phy-swap = <1>;
169 };
170 };