ath79: fix OCEDO Raccoon
[oweals/openwrt.git] / target / linux / ath79 / dts / ar9331_tl-wr741nd-v4.dtsi
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 "ar9331.dtsi"
8
9 / {
10         compatible = "tplink,tl-wr741n-v4", "qca,ar9331";
11         model = "TP-Link TL-WR741N/ND v4";
12
13         aliases {
14                 serial0 = &uart;
15                 led-status = &led_system;
16         };
17
18         gpio-keys-polled {
19                 compatible = "gpio-keys-polled";
20                 #address-cells = <1>;
21                 #size-cells = <0>;
22                 poll-interval = <20>;
23
24                 reset {
25                         label = "reset";
26                         linux,code = <KEY_RESTART>;
27                         gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
28                         debounce-interval = <60>;
29                 };
30
31                 wps {
32                         label = "wps";
33                         linux,code = <KEY_WPS_BUTTON>;
34                         gpios = <&gpio 26 GPIO_ACTIVE_HIGH>;
35                         debounce-interval = <60>;
36                 };
37         };
38
39         gpio-leds {
40                 compatible = "gpio-leds";
41                 pinctrl-names = "default";
42                 pinctrl-0 = <&switch_led_pins>;
43
44                 lan1 {
45                         label = "tp-link:green:lan1";
46                         gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
47                 };
48
49                 lan2 {
50                         label = "tp-link:green:lan2";
51                         gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
52                 };
53
54                 lan3 {
55                         label = "tp-link:green:lan3";
56                         gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
57                 };
58
59                 lan4 {
60                         label = "tp-link:green:lan4";
61                         gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
62                 };
63
64                 qss {
65                         label = "tp-link:green:qss";
66                         gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
67                 };
68
69                 led_system: system {
70                         label = "tp-link:green:system";
71                         gpios = <&gpio 27 GPIO_ACTIVE_HIGH>;
72                 };
73
74                 wan {
75                         label = "tp-link:green:wan";
76                         gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
77                 };
78
79                 wlan {
80                         label = "tp-link:green:wlan";
81                         gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
82                         default-state = "off";
83                         linux,default-trigger = "phy0tpt";
84                 };
85         };
86 };
87
88 &spi {
89         status = "okay";
90         num-cs = <1>;
91
92         flash@0 {
93                 #address-cells = <1>;
94                 #size-cells = <1>;
95                 compatible = "jedec,spi-nor";
96                 reg = <0>;
97                 spi-max-frequency = <25000000>;
98
99                 partitions {
100                         compatible = "fixed-partitions";
101                         #address-cells = <1>;
102                         #size-cells = <1>;
103
104                         uboot: partition@0 {
105                                 reg = <0x0 0x20000>;
106                                 label = "u-boot";
107                                 read-only;
108                         };
109
110                         firmware: partition@20000 {
111                                 reg = <0x20000 0x3d0000>;
112                                 label = "firmware";
113                         };
114
115                         art: partition@3f0000 {
116                                 reg = <0x3f0000 0x10000>;
117                                 label = "art";
118                                 read-only;
119                         };
120                 };
121         };
122 };
123
124 &mdio0 {
125         status = "okay";
126
127         phy4: ethernet-phy@4 {
128                 reg = <4>;
129                 phy-mode = "mii";
130         };
131 };
132
133 &eth0 {
134         status = "okay";
135
136         phy-handle = <&phy4>;
137
138         mtd-mac-address = <&uboot 0x1fc00>;
139         mtd-mac-address-increment = <1>;
140
141         gmac-config {
142                 device = <&gmac>;
143
144                 switch-phy-addr-swap = <1>;
145                 switch-phy-swap = <1>;
146         };
147 };
148
149 &eth1 {
150         status = "okay";
151
152         mtd-mac-address = <&uboot 0x1fc00>;
153         mtd-mac-address-increment = <(-1)>;
154
155         fixed-link {
156                 speed = <1000>;
157                 full-duplex;
158         };
159 };
160
161 &gpio {
162         status = "okay";
163 };
164
165 &uart {
166         status = "okay";
167 };
168
169 &wmac {
170         status = "okay";
171         mtd-cal-data = <&art 0x1000>;
172         mtd-mac-address = <&uboot 0x1fc00>;
173 };