5a05869a1c03671343bf662c2f2c346985926592
[openwrt/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 "qca953x.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
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 leds {
18 compatible = "gpio-leds";
19
20 lan {
21 label = "green:lan";
22 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
23 };
24
25 security_red {
26 label = "red:security";
27 gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
28 };
29
30 wlan {
31 label = "green:wlan";
32 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
33 linux,default-trigger = "phy0tpt";
34 };
35
36 led_system: system {
37 label = "green:system";
38 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
39 };
40
41 security_green {
42 label = "green:security";
43 gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
44 };
45 };
46
47 keys {
48 compatible = "gpio-keys";
49
50 reset {
51 label = "Reset button";
52 linux,code = <KEY_RESTART>;
53 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
54 debounce-interval = <60>;
55 };
56
57 wps {
58 label = "WPS button";
59 linux,code = <KEY_WPS_BUTTON>;
60 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
61 debounce-interval = <60>;
62 };
63 };
64 };
65
66 &spi {
67 status = "okay";
68
69 flash@0 {
70 compatible = "jedec,spi-nor";
71 reg = <0>;
72 spi-max-frequency = <25000000>;
73
74 partitions {
75 compatible = "fixed-partitions";
76 #address-cells = <1>;
77 #size-cells = <1>;
78
79 uboot: partition@0 {
80 label = "u-boot";
81 reg = <0x000000 0x020000>;
82 read-only;
83
84 nvmem-layout {
85 compatible = "fixed-layout";
86 #address-cells = <1>;
87 #size-cells = <1>;
88
89 macaddr_uboot_1fc00: macaddr@1fc00 {
90 reg = <0x1fc00 0x6>;
91 };
92 };
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 nvmem-cells = <&macaddr_uboot_1fc00>;
116 nvmem-cell-names = "mac-address";
117 };
118
119 &eth1 {
120 compatible = "syscon", "simple-mfd";
121 };
122
123 &wmac {
124 status = "okay";
125
126 mtd-cal-data = <&art 0x1000>;
127 nvmem-cells = <&macaddr_uboot_1fc00>;
128 nvmem-cell-names = "mac-address";
129 };