ath79: fix dsa binding for TP-Link TL-WR941ND 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 reset {
25 label = "reset";
26 linux,code = <KEY_RESTART>;
27 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
28 debounce-interval = <60>;
29 };
30
31 qss {
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
65 &mdio0 {
66 status = "okay";
67
68 switch@0 {
69 compatible = "marvell,mv88e6060";
70 reg = <0>;
71
72 ports {
73 #address-cells = <1>;
74 #size-cells = <0>;
75
76 port@0 {
77 reg = <0>;
78 label = "wan";
79 };
80
81 port@1 {
82 reg = <1>;
83 label = "lan1";
84 };
85
86 port@2 {
87 reg = <2>;
88 label = "lan2";
89 };
90
91 port@3 {
92 reg = <3>;
93 label = "lan3";
94 };
95
96 port@4 {
97 reg = <4>;
98 label = "lan4";
99 };
100
101 port@5 {
102 reg = <5>;
103 label = "cpu";
104 ethernet = <&eth0>;
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 &eth0 {
149 status = "okay";
150
151 phy-mode = "rmii";
152 mtd-mac-address = <&uboot 0x1fc00>;
153
154 fixed-link {
155 speed = <100>;
156 full-duplex;
157 };
158 };
159
160 &wmac {
161 status = "okay";
162 mtd-cal-data = <&art 0x1000>;
163 mtd-mac-address = <&uboot 0x1fc00>;
164 };