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