ath79: add support for Netgear WNR1000 v2
[openwrt/openwrt.git] / target / linux / ath79 / dts / qca9533_tplink_tl-wr842n-v3.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 "qca953x.dtsi"
8
9 / {
10 compatible = "tplink,tl-wr842n-v3", "qca,qca9533";
11 model = "TP-Link TL-WR842N v3";
12
13 aliases {
14 led-boot = &power_led;
15 led-failsafe = &power_led;
16 led-running = &power_led;
17 led-upgrade = &power_led;
18 label-mac-device = &eth1;
19 };
20
21 gpio_leds: leds {
22 compatible = "gpio-leds";
23
24 power_led: power {
25 label = "tp-link:green:power";
26 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
27 default-state = "on";
28 };
29
30 wifi {
31 label = "tp-link:green:wlan";
32 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
33 linux,default-trigger = "phy0tpt";
34 };
35
36 qss {
37 label = "tp-link:green:qss";
38 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
39 };
40
41 wan_green {
42 label = "tp-link:green:wan";
43 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
44 };
45
46 wan_red {
47 label = "tp-link:red:wan";
48 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
49 };
50
51 lan1 {
52 label = "tp-link:green:lan1";
53 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
54 };
55
56 lan2 {
57 label = "tp-link:green:lan2";
58 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
59 };
60
61 lan3 {
62 label = "tp-link:green:lan3";
63 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
64 };
65
66 lan4 {
67 label = "tp-link:green:lan4";
68 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
69 };
70
71 usb {
72 label = "tp-link:green:usb";
73 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
74 linux,default-trigger = "usbport";
75 trigger-sources = <&hub_port>;
76 };
77 };
78
79 keys {
80 compatible = "gpio-keys";
81
82 reset {
83 label = "Reset button";
84 linux,code = <KEY_RESTART>;
85 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
86 debounce-interval = <60>;
87 };
88
89 rfkill {
90 label = "RFKILL button";
91 linux,code = <KEY_RFKILL>;
92 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
93 debounce-interval = <60>;
94 };
95 };
96 };
97
98 &uart {
99 status = "okay";
100 };
101
102 &usb0 {
103 #address-cells = <1>;
104 #size-cells = <0>;
105 status = "okay";
106
107 hub_port: port@1 {
108 reg = <1>;
109 #trigger-source-cells = <0>;
110 };
111 };
112
113 &usb_phy {
114 status = "okay";
115 };
116
117 &spi {
118 status = "okay";
119 num-cs = <1>;
120
121 flash@0 {
122 compatible = "jedec,spi-nor";
123 reg = <0>;
124 spi-max-frequency = <25000000>;
125
126 partitions {
127 compatible = "fixed-partitions";
128 #address-cells = <1>;
129 #size-cells = <1>;
130
131 uboot: partition@0 {
132 label = "u-boot";
133 reg = <0x000000 0x020000>;
134 read-only;
135 };
136
137 partition@20000 {
138 compatible = "tplink,firmware";
139 label = "firmware";
140 reg = <0x020000 0xfd0000>;
141 };
142
143 art: partition@ff0000 {
144 label = "art";
145 reg = <0xff0000 0x010000>;
146 read-only;
147 };
148 };
149 };
150 };
151
152 &eth1 {
153 mtd-mac-address = <&uboot 0x1fc00>;
154 };
155
156 &eth0 {
157 status = "okay";
158 phy-handle = <&swphy4>;
159
160 mtd-mac-address = <&uboot 0x1fc00>;
161 mtd-mac-address-increment = <1>;
162 };
163
164 &wmac {
165 status = "okay";
166 mtd-cal-data = <&art 0x1000>;
167 mtd-mac-address = <&uboot 0x1fc00>;
168 };