ath79: improve common DTSI name for TP-Link Archer C5, C7 v1/v2
[openwrt/openwrt.git] / target / linux / ath79 / dts / ar9331_tplink_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-boot = &led_system;
16 led-failsafe = &led_system;
17 led-running = &led_system;
18 led-upgrade = &led_system;
19 label-mac-device = &wmac;
20 };
21
22 keys {
23 compatible = "gpio-keys";
24
25 reset {
26 label = "reset";
27 linux,code = <KEY_RESTART>;
28 gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
29 debounce-interval = <60>;
30 };
31
32 wps {
33 label = "wps";
34 linux,code = <KEY_WPS_BUTTON>;
35 gpios = <&gpio 26 GPIO_ACTIVE_HIGH>;
36 debounce-interval = <60>;
37 };
38 };
39
40 leds {
41 compatible = "gpio-leds";
42
43 pinctrl-names = "default";
44 pinctrl-0 = <&switch_led_disable_pins>;
45
46 lan1 {
47 label = "tp-link:green:lan1";
48 gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
49 };
50
51 lan2 {
52 label = "tp-link:green:lan2";
53 gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
54 };
55
56 lan3 {
57 label = "tp-link:green:lan3";
58 gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
59 };
60
61 lan4 {
62 label = "tp-link:green:lan4";
63 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
64 };
65
66 qss {
67 label = "tp-link:green:qss";
68 gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
69 };
70
71 led_system: system {
72 label = "tp-link:green:system";
73 gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
74 };
75
76 wan {
77 label = "tp-link:green:wan";
78 gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
79 };
80
81 wlan {
82 label = "tp-link:green:wlan";
83 gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
84 linux,default-trigger = "phy0tpt";
85 };
86 };
87 };
88
89 &spi {
90 status = "okay";
91
92 num-cs = <1>;
93
94 flash@0 {
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 compatible = "tplink,firmware";
112 reg = <0x20000 0x3d0000>;
113 label = "firmware";
114 };
115
116 art: partition@3f0000 {
117 reg = <0x3f0000 0x10000>;
118 label = "art";
119 read-only;
120 };
121 };
122 };
123 };
124
125 &eth0 {
126 status = "okay";
127
128 mtd-mac-address = <&uboot 0x1fc00>;
129 mtd-mac-address-increment = <1>;
130
131 gmac-config {
132 device = <&gmac>;
133
134 switch-phy-addr-swap = <1>;
135 switch-phy-swap = <1>;
136 };
137 };
138
139 &eth1 {
140 status = "okay";
141
142 mtd-mac-address = <&uboot 0x1fc00>;
143 mtd-mac-address-increment = <(-1)>;
144 };
145
146 &gpio {
147 status = "okay";
148 };
149
150 &uart {
151 status = "okay";
152 };
153
154 &wmac {
155 status = "okay";
156
157 mtd-cal-data = <&art 0x1000>;
158 mtd-mac-address = <&uboot 0x1fc00>;
159 };