tools/expat: fix PKG_CPE_ID
[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
3 #include "ar9331.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7 #include <dt-bindings/leds/common.h>
8
9 / {
10 compatible = "tplink,tl-wr741n-v4", "qca,ar9331";
11 model = "TP-Link TL-WR741N/ND v4";
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 = &wmac;
19 };
20
21 keys {
22 compatible = "gpio-keys";
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 leds {
40 compatible = "gpio-leds";
41
42 pinctrl-names = "default";
43 pinctrl-0 = <&switch_led_disable_pins>;
44
45 lan1 {
46 label = "green:lan1";
47 gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
48 };
49
50 lan2 {
51 label = "green:lan2";
52 gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
53 };
54
55 lan3 {
56 label = "green:lan3";
57 gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
58 };
59
60 lan4 {
61 label = "green:lan4";
62 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
63 };
64
65 qss {
66 label = "green:qss";
67 gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
68 };
69
70 led_system: system {
71 label = "green:system";
72 gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
73 };
74
75 wan {
76 function = LED_FUNCTION_WAN;
77 color = <LED_COLOR_ID_GREEN>;
78 gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
79 };
80
81 wlan {
82 function = LED_FUNCTION_WLAN;
83 color = <LED_COLOR_ID_GREEN>;
84 gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
85 linux,default-trigger = "phy0tpt";
86 };
87 };
88 };
89
90 &spi {
91 status = "okay";
92
93 flash@0 {
94 compatible = "jedec,spi-nor";
95 reg = <0>;
96 spi-max-frequency = <25000000>;
97
98 partitions {
99 compatible = "fixed-partitions";
100 #address-cells = <1>;
101 #size-cells = <1>;
102
103 uboot: partition@0 {
104 reg = <0x0 0x20000>;
105 label = "u-boot";
106 read-only;
107
108 nvmem-layout {
109 compatible = "fixed-layout";
110 #address-cells = <1>;
111 #size-cells = <1>;
112
113 macaddr_uboot_1fc00: macaddr@1fc00 {
114 compatible = "mac-base";
115 reg = <0x1fc00 0x6>;
116 #nvmem-cell-cells = <1>;
117 };
118 };
119 };
120
121 firmware: partition@20000 {
122 compatible = "tplink,firmware";
123 reg = <0x20000 0x3d0000>;
124 label = "firmware";
125 };
126
127 art: partition@3f0000 {
128 reg = <0x3f0000 0x10000>;
129 label = "art";
130 read-only;
131 };
132 };
133 };
134 };
135
136 &eth0 { /* WAN interface, initialized last as eth1 */
137 status = "okay";
138
139 nvmem-cells = <&macaddr_uboot_1fc00 1>;
140 nvmem-cell-names = "mac-address";
141
142 gmac-config {
143 device = <&gmac>;
144
145 switch-phy-addr-swap = <1>;
146 switch-phy-swap = <1>;
147 };
148 };
149
150 &eth1 { /* LAN interface, initialized first as eth0 */
151 status = "okay";
152
153 nvmem-cells = <&macaddr_uboot_1fc00 0>;
154 nvmem-cell-names = "mac-address";
155 };
156
157 &wmac {
158 status = "okay";
159
160 mtd-cal-data = <&art 0x1000>;
161 nvmem-cells = <&macaddr_uboot_1fc00 0>;
162 nvmem-cell-names = "mac-address";
163 };