52369120473b5b1cb56b09504a62ece678d68853
[oweals/openwrt.git] / target / linux / ath79 / dts / qca9533_tplink_tl-wa850re-v2.dts
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 "qca953x.dtsi"
8
9 / {
10         compatible = "tplink,tl-wa850re-v2", "qca,qca9533";
11         model = "TP-Link TL-WA850RE v2";
12
13         aliases {
14                 led-boot = &led_re;
15                 led-failsafe = &led_re;
16                 led-running = &led_re;
17                 led-upgrade = &led_re;
18                 label-mac-device = &wmac;
19         };
20
21         chosen {
22                 bootargs = "console=ttyS0,115200n8";
23         };
24
25         leds {
26                 compatible = "gpio-leds";
27
28                 pinctrl-names = "default";
29                 pinctrl-0 = <&jtag_disable_pins>;
30
31                 lan {
32                         label = "tp-link:blue:lan";
33                         gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
34                 };
35
36                 led_re: re {
37                         label = "tp-link:blue:re";
38                         gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
39                 };
40
41                 signal1 {
42                         label = "tp-link:blue:signal1";
43                         gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
44                 };
45
46                 signal2 {
47                         label = "tp-link:blue:signal2";
48                         gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
49                 };
50
51                 signal3 {
52                         label = "tp-link:blue:signal3";
53                         gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
54                 };
55
56                 signal4 {
57                         label = "tp-link:blue:signal4";
58                         gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
59                 };
60
61                 led_signal5: signal5 {
62                         label = "tp-link:blue:signal5";
63                         gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
64                 };
65
66                 wlan {
67                         label = "tp-link:blue:wlan";
68                         gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
69                         linux,default-trigger = "phy0tpt";
70                 };
71         };
72
73         keys {
74                 compatible = "gpio-keys";
75
76                 reset {
77                         label = "Reset button";
78                         linux,code = <KEY_RESTART>;
79                         gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
80                 };
81
82                 wps {
83                         label = "WPS button";
84                         linux,code = <KEY_RFKILL>;
85                         gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
86                 };
87         };
88 };
89
90 &gpio {
91         led_enable {
92                 gpio-hog;
93                 gpios = <15 GPIO_ACTIVE_HIGH>;
94                 line-name = "tp-link:power:led";
95                 output-high;
96         };
97 };
98
99 &uart {
100         status = "okay";
101 };
102
103 &spi {
104         status = "okay";
105
106         num-cs = <1>;
107
108         flash@0 {
109                 #address-cells = <1>;
110                 #size-cells = <1>;
111                 compatible = "jedec,spi-nor";
112                 reg = <0>;
113                 spi-max-frequency = <25000000>;
114
115                 partitions {
116                         compatible = "fixed-partitions";
117                         #address-cells = <1>;
118                         #size-cells = <1>;
119
120                         partition@0 {
121                                 label = "u-boot";
122                                 reg = <0x000000 0x020000>;
123                                 read-only;
124                         };
125
126                         partition@20000 {
127                                 label = "firmware";
128                                 reg = <0x020000 0x390000>;
129                                 compatible = "tplink,firmware";
130                         };
131
132                         config: partition@3b0000 {
133                                 label = "config";
134                                 reg = <0x3b0000 0x040000>;
135                                 read-only;
136                         };
137
138                         art: partition@3f0000 {
139                                 label = "art";
140                                 reg = <0x3f0000 0x010000>;
141                                 read-only;
142                         };
143                 };
144         };
145 };
146
147 &wmac {
148         status = "okay";
149
150         mtd-cal-data = <&art 0x1000>;
151         mtd-mac-address = <&config 0x10008>;
152 };
153
154 &eth0 {
155         status = "okay";
156
157         phy-handle = <&swphy4>;
158
159         mtd-mac-address = <&config 0x10008>;
160 };
161
162 &eth1 {
163         compatible = "syscon", "simple-mfd";
164 };