ath79: add support for TP-Link TL-WA801ND v3/v4
[openwrt/staging/yousong.git] / target / linux / ath79 / dts / qca9533_tplink_tl-wa801nd.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 #include "qca953x.dtsi"
7
8 / {
9 aliases {
10 led-boot = &led_system;
11 led-failsafe = &led_system;
12 led-running = &led_system;
13 led-upgrade = &led_system;
14 };
15
16 chosen {
17 bootargs = "console=ttyS0,115200n8";
18 };
19
20 leds {
21 compatible = "gpio-leds";
22
23 lan {
24 label = "tp-link:green:lan";
25 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
26 };
27
28 security_red {
29 label = "tp-link:red:security";
30 gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
31 };
32
33 wlan {
34 label = "tp-link:green:wlan";
35 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
36 linux,default-trigger = "phy0tpt";
37 };
38
39 led_system: system {
40 label = "tp-link:green:system";
41 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
42 };
43
44 security_green {
45 label = "tp-link:green:security";
46 gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
47 };
48 };
49
50 keys {
51 compatible = "gpio-keys";
52
53 reset {
54 label = "Reset button";
55 linux,code = <KEY_RESTART>;
56 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
57 debounce-interval = <60>;
58 };
59
60 wps {
61 label = "WPS button";
62 linux,code = <KEY_WPS_BUTTON>;
63 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
64 debounce-interval = <60>;
65 };
66 };
67 };
68
69 &uart {
70 status = "okay";
71 };
72
73 &spi {
74 status = "okay";
75
76 num-cs = <1>;
77
78 flash@0 {
79 compatible = "jedec,spi-nor";
80 reg = <0>;
81 spi-max-frequency = <25000000>;
82
83 partitions {
84 compatible = "fixed-partitions";
85 #address-cells = <1>;
86 #size-cells = <1>;
87
88 uboot: partition@0 {
89 label = "u-boot";
90 reg = <0x000000 0x020000>;
91 read-only;
92 };
93
94 partition@20000 {
95 compatible = "tplink,firmware";
96 label = "firmware";
97 reg = <0x020000 0x3d0000>;
98 };
99
100 art: partition@3f0000 {
101 label = "art";
102 reg = <0x3f0000 0x010000>;
103 read-only;
104 };
105 };
106 };
107 };
108
109 &eth0 {
110 status = "okay";
111
112 phy-handle = <&swphy4>;
113
114 mtd-mac-address = <&uboot 0x1fc00>;
115 };
116
117 &eth1 {
118 compatible = "syscon", "simple-mfd";
119 };
120
121 &wmac {
122 status = "okay";
123
124 mtd-cal-data = <&art 0x1000>;
125 mtd-mac-address = <&uboot 0x1fc00>;
126 };