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