ccc0c195ca44233da44290636e3b3ef625f313dc
[openwrt/openwrt.git] / target / linux / ath79 / dts / ar9341_tplink_tl-wr841-v8.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /dts-v1/;
3
4 #include <dt-bindings/gpio/gpio.h>
5 #include <dt-bindings/input/input.h>
6
7 #include "ar9341.dtsi"
8
9 / {
10 model = "TP-Link TL-WR841N/ND v8";
11 compatible = "tplink,tl-wr841-v8", "qca,ar9341";
12
13 aliases {
14 serial0 = &uart;
15 led-boot = &system;
16 led-failsafe = &system;
17 led-running = &system;
18 led-upgrade = &system;
19 };
20
21 keys {
22 compatible = "gpio-keys-polled";
23 poll-interval = <20>;
24
25 reset {
26 label = "Reset";
27 linux,code = <KEY_RESTART>;
28 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
29 debounce-interval = <60>;
30 };
31
32 rfkill {
33 label = "WiFi";
34 linux,code = <KEY_RFKILL>;
35 gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
36 debounce-interval = <60>;
37 };
38 };
39
40 leds {
41 compatible = "gpio-leds";
42
43 system: power {
44 label = "tp-link:green:power";
45 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
46 default-state = "on";
47 };
48
49 wlan {
50 label = "tp-link:green:wlan";
51 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
52 linux,default-trigger = "phy0tpt";
53 };
54
55 qss {
56 label = "tp-link:green:qss";
57 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
58 };
59
60 wan {
61 label = "tp-link:green:wan";
62 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
63 };
64
65 lan1 {
66 label = "tp-link:green:lan1";
67 gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
68 };
69
70 lan2 {
71 label = "tp-link:green:lan2";
72 gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
73 };
74
75 lan3 {
76 label = "tp-link:green:lan3";
77 gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
78 };
79
80 lan4 {
81 label = "tp-link:green:lan4";
82 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
83 };
84 };
85 };
86
87 &ref {
88 clock-frequency = <25000000>;
89 };
90
91 &uart {
92 status = "okay";
93 };
94
95 &gpio {
96 pinctrl-names = "default";
97 pinctrl-0 = <&jtag_disable_pins &pmx_usb_power>;
98 };
99
100 &pinmux {
101 pmx_usb_power: usb_power {
102 pinctrl-single,bits = <0x4 0x0 0xff>;
103 };
104 };
105
106 &spi {
107 num-cs = <1>;
108
109 status = "okay";
110
111 flash@0 {
112 compatible = "jedec,spi-nor";
113 reg = <0>;
114 spi-max-frequency = <25000000>;
115
116 partitions {
117 compatible = "fixed-partitions";
118 #address-cells = <1>;
119 #size-cells = <1>;
120
121 uboot: partition@0 {
122 label = "u-boot";
123 reg = <0x000000 0x020000>;
124 read-only;
125 };
126
127 partition@20000 {
128 compatible = "tplink,firmware";
129 label = "firmware";
130 reg = <0x020000 0x3d0000>;
131 };
132
133 art: partition@3f0000 {
134 label = "art";
135 reg = <0x3f0000 0x010000>;
136 read-only;
137 };
138 };
139 };
140 };
141
142 &eth0 {
143 status = "okay";
144
145 phy-handle = <&swphy0>;
146 mtd-mac-address = <&uboot 0x1fc00>;
147 mtd-mac-address-increment = <(-1)>;
148 };
149
150 &eth1 {
151 status = "okay";
152
153 mtd-mac-address = <&uboot 0x1fc00>;
154
155 pll-data = <0x06000000 0x00000101 0x00001616>;
156
157 gmac-config {
158 device = <&gmac>;
159 switch-phy-swap = <1>;
160 };
161 };
162
163 &wmac {
164 status = "okay";
165
166 mtd-cal-data = <&art 0x1000>;
167 mtd-mac-address = <&uboot 0x1fc00>;
168 };