gemini: In-flight ethernet patches
[openwrt/openwrt.git] / target / linux / ath79 / dts / qca9533_tplink_tl-wr842n-v3.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "qca953x.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-wr842n-v3", "qca,qca9533";
11 model = "TP-Link TL-WR842N v3";
12
13 aliases {
14 led-boot = &led_power;
15 led-failsafe = &led_power;
16 led-running = &led_power;
17 led-upgrade = &led_power;
18 label-mac-device = &eth1;
19 };
20
21 leds {
22 compatible = "gpio-leds";
23
24 led_power: power {
25 function = LED_FUNCTION_POWER;
26 color = <LED_COLOR_ID_GREEN>;
27 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
28 default-state = "on";
29 };
30
31 wifi {
32 function = LED_FUNCTION_WLAN;
33 color = <LED_COLOR_ID_GREEN>;
34 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
35 linux,default-trigger = "phy0tpt";
36 };
37
38 qss {
39 label = "green:qss";
40 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
41 };
42
43 wan_green {
44 function = LED_FUNCTION_WAN;
45 color = <LED_COLOR_ID_GREEN>;
46 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
47 };
48
49 wan_red {
50 function = LED_FUNCTION_WAN;
51 color = <LED_COLOR_ID_RED>;
52 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
53 };
54
55 lan1 {
56 label = "green:lan1";
57 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
58 };
59
60 lan2 {
61 label = "green:lan2";
62 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
63 };
64
65 lan3 {
66 label = "green:lan3";
67 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
68 };
69
70 lan4 {
71 label = "green:lan4";
72 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
73 };
74
75 usb {
76 function = LED_FUNCTION_USB;
77 color = <LED_COLOR_ID_GREEN>;
78 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
79 linux,default-trigger = "usbport";
80 trigger-sources = <&hub_port0>;
81 };
82 };
83
84 keys {
85 compatible = "gpio-keys";
86
87 reset {
88 label = "Reset button";
89 linux,code = <KEY_RESTART>;
90 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
91 debounce-interval = <60>;
92 };
93
94 rfkill {
95 label = "RFKILL button";
96 linux,code = <KEY_RFKILL>;
97 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
98 debounce-interval = <60>;
99 };
100 };
101 };
102
103 &usb0 {
104 status = "okay";
105 };
106
107 &usb_phy {
108 status = "okay";
109 };
110
111 &spi {
112 status = "okay";
113
114 flash@0 {
115 compatible = "jedec,spi-nor";
116 reg = <0>;
117 spi-max-frequency = <25000000>;
118
119 partitions {
120 compatible = "fixed-partitions";
121 #address-cells = <1>;
122 #size-cells = <1>;
123
124 uboot: partition@0 {
125 label = "u-boot";
126 reg = <0x000000 0x020000>;
127 read-only;
128
129 nvmem-layout {
130 compatible = "fixed-layout";
131 #address-cells = <1>;
132 #size-cells = <1>;
133
134 macaddr_uboot_1fc00: macaddr@1fc00 {
135 compatible = "mac-base";
136 reg = <0x1fc00 0x6>;
137 #nvmem-cell-cells = <1>;
138 };
139 };
140 };
141
142 partition@20000 {
143 compatible = "tplink,firmware";
144 label = "firmware";
145 reg = <0x020000 0xfd0000>;
146 };
147
148 art: partition@ff0000 {
149 label = "art";
150 reg = <0xff0000 0x010000>;
151 read-only;
152 };
153 };
154 };
155 };
156
157 &eth0 {
158 status = "okay";
159
160 phy-handle = <&swphy4>;
161
162 nvmem-cells = <&macaddr_uboot_1fc00 1>;
163 nvmem-cell-names = "mac-address";
164 };
165
166 &eth1 {
167 nvmem-cells = <&macaddr_uboot_1fc00 0>;
168 nvmem-cell-names = "mac-address";
169 };
170
171 &wmac {
172 status = "okay";
173
174 mtd-cal-data = <&art 0x1000>;
175 nvmem-cells = <&macaddr_uboot_1fc00 0>;
176 nvmem-cell-names = "mac-address";
177 };