ath79: add support for Netgear WNR1000 v2
[openwrt/openwrt.git] / target / linux / ath79 / dts / ar9132_tplink_tl-wr941-v2.dts
1 // SPDX-License-Identifier: GPL-2.0
2 /dts-v1/;
3
4 #include <dt-bindings/gpio/gpio.h>
5 #include <dt-bindings/input/input.h>
6
7 #include "ar9132.dtsi"
8
9 / {
10 compatible = "tplink,tl-wr941-v2", "qca,ar9132";
11 model = "TP-Link TL-WR941N/ND v2/v3";
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 = &eth0;
19 };
20
21 keys {
22 compatible = "gpio-keys";
23
24 button0 {
25 label = "reset";
26 linux,code = <KEY_RESTART>;
27 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
28 debounce-interval = <60>;
29 };
30
31 button1 {
32 label = "qss";
33 linux,code = <KEY_WPS_BUTTON>;
34 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
35 debounce-interval = <60>;
36 };
37 };
38
39 leds {
40 compatible = "gpio-leds";
41
42 led_system: system {
43 label = "tp-link:green:system";
44 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
45 };
46
47 qss_r {
48 label = "tp-link:red:qss";
49 gpios = <&gpio 4 GPIO_ACTIVE_HIGH>;
50 };
51
52 qss_g {
53 label = "tp-link:green:qss";
54 gpios = <&gpio 5 GPIO_ACTIVE_HIGH>;
55 };
56
57 wlan {
58 label = "tp-link:green:wlan";
59 gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
60 linux,default-trigger = "phy0tpt";
61 };
62 };
63
64 dsa {
65 compatible = "marvell,dsa";
66 #address-cells = <1>;
67 #size-cells = <0>;
68
69 dsa,mii-bus = <&mdio0>;
70 dsa,ethernet = <&eth0>;
71
72 switch@0 {
73 #address-cells = <1>;
74 #size-cells = <0>;
75 reg = <0>;
76
77 port@0 {
78 reg = <0>;
79 label = "wan";
80 };
81
82 port@1 {
83 reg = <1>;
84 label = "lan1";
85 };
86
87 port@2 {
88 reg = <2>;
89 label = "lan2";
90 };
91
92 port@3 {
93 reg = <3>;
94 label = "lan3";
95 };
96
97 port@4 {
98 reg = <4>;
99 label = "lan4";
100 };
101
102 port@5 {
103 reg = <5>;
104 label = "cpu";
105 };
106 };
107 };
108 };
109
110 &uart {
111 status = "okay";
112 };
113
114 &spi {
115 status = "okay";
116
117 flash@0 {
118 compatible = "jedec,spi-nor";
119 reg = <0>;
120 spi-max-frequency = <25000000>;
121
122 partitions {
123 compatible = "fixed-partitions";
124 #address-cells = <1>;
125 #size-cells = <1>;
126
127 uboot: partition@0 {
128 label = "u-boot";
129 reg = <0x000000 0x20000>;
130 read-only;
131 };
132
133 partition@20000 {
134 compatible = "tplink,firmware";
135 label = "firmware";
136 reg = <0x020000 0x3d0000>;
137 };
138
139 art: partition@3f0000 {
140 label = "art";
141 reg = <0x3f0000 0x10000>;
142 read-only;
143 };
144 };
145 };
146 };
147
148 &mdio0 {
149 status = "okay";
150 };
151
152 &eth0 {
153 status = "okay";
154
155 phy-mode = "rmii";
156 mtd-mac-address = <&uboot 0x1fc00>;
157
158 fixed-link {
159 speed = <100>;
160 full-duplex;
161 };
162 };
163
164 &wmac {
165 status = "okay";
166 mtd-cal-data = <&art 0x1000>;
167 mtd-mac-address = <&uboot 0x1fc00>;
168 };