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