ath79: ag71xx: replace ag71xx_get_phy_if_mode_name() with phy_modes()
[oweals/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         };
19
20         keys {
21                 compatible = "gpio-keys";
22
23                 button0 {
24                         label = "reset";
25                         linux,code = <KEY_RESTART>;
26                         gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
27                         debounce-interval = <60>;
28                 };
29
30                 button1 {
31                         label = "qss";
32                         linux,code = <KEY_WPS_BUTTON>;
33                         gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
34                         debounce-interval = <60>;
35                 };
36         };
37
38         leds {
39                 compatible = "gpio-leds";
40
41                 led_system: system {
42                         label = "tp-link:green:system";
43                         gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
44                 };
45
46                 qss_r {
47                         label = "tp-link:red:qss";
48                         gpios = <&gpio 4 GPIO_ACTIVE_HIGH>;
49                 };
50
51                 qss_g {
52                         label = "tp-link:green:qss";
53                         gpios = <&gpio 5 GPIO_ACTIVE_HIGH>;
54                 };
55
56                 wlan {
57                         label = "tp-link:green:wlan";
58                         gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
59                         linux,default-trigger = "phy0tpt";
60                 };
61         };
62
63         dsa {
64                 compatible = "marvell,dsa";
65                 #address-cells = <1>;
66                 #size-cells = <0>;
67
68                 dsa,mii-bus = <&mdio0>;
69                 dsa,ethernet = <&eth0>;
70
71                 switch@0 {
72                         #address-cells = <1>;
73                         #size-cells = <0>;
74                         reg = <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                         };
105                 };
106         };
107 };
108
109 &uart {
110         status = "okay";
111 };
112
113 &spi {
114         status = "okay";
115
116         flash@0 {
117                 compatible = "jedec,spi-nor";
118                 reg = <0>;
119                 spi-max-frequency = <25000000>;
120
121                 partitions {
122                         compatible = "fixed-partitions";
123                         #address-cells = <1>;
124                         #size-cells = <1>;
125
126                         uboot: partition@0 {
127                                 label = "u-boot";
128                                 reg = <0x000000 0x20000>;
129                                 read-only;
130                         };
131
132                         partition@20000 {
133                                 compatible = "tplink,firmware";
134                                 label = "firmware";
135                                 reg = <0x020000 0x3d0000>;
136                         };
137
138                         art: partition@3f0000 {
139                                 label = "art";
140                                 reg = <0x3f0000 0x10000>;
141                                 read-only;
142                         };
143                 };
144         };
145 };
146
147 &mdio0 {
148         status = "okay";
149 };
150
151 &eth0 {
152         status = "okay";
153
154         phy-mode = "rmii";
155         mtd-mac-address = <&uboot 0x1fc00>;
156
157         fixed-link {
158                 speed = <100>;
159                 full-duplex;
160         };
161 };
162
163 &wmac {
164         status = "okay";
165         mtd-cal-data = <&art 0x1000>;
166         mtd-mac-address = <&uboot 0x1fc00>;
167 };