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