ath79: add support for TP-Link WDR3500 v1
[openwrt/openwrt.git] / target / linux / ath79 / dts / ar9344_tplink_tl-wdrxxxx.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 "ar9344.dtsi"
7
8 / {
9 aliases {
10 led-boot = &system;
11 led-failsafe = &system;
12 led-running = &system;
13 led-upgrade = &system;
14 };
15
16 leds: leds {
17 compatible = "gpio-leds";
18
19 wlan2g {
20 label = "tp-link:green:wlan2g";
21 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
22 linux,default-trigger = "phy0tpt";
23 };
24
25 system: system {
26 label = "tp-link:green:system";
27 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
28 default-state = "on";
29 };
30
31 qss {
32 label = "tp-link:green:qss";
33 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
34 };
35 };
36
37 ath9k-leds {
38 compatible = "gpio-leds";
39
40 wlan5g {
41 label = "tp-link:green:wlan5g";
42 gpios = <&ath9k 0 GPIO_ACTIVE_LOW>;
43 linux,default-trigger = "phy1tpt";
44 };
45 };
46
47 keys {
48 compatible = "gpio-keys-polled";
49 poll-interval = <20>;
50
51 reset {
52 linux,code = <KEY_RESTART>;
53 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
54 debounce-interval = <60>;
55 };
56
57 wifi {
58 linux,code = <KEY_RFKILL>;
59 linux,input-type = <EV_SW>;
60 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
61 debounce-interval = <60>;
62 };
63 };
64 };
65
66 &ref {
67 clock-frequency = <40000000>;
68 };
69
70 &uart {
71 status = "okay";
72 };
73
74 &spi {
75 num-cs = <1>;
76
77 status = "okay";
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 0x7d0000>;
99 };
100
101 art: partition@7f0000 {
102 label = "art";
103 reg = <0x7f0000 0x010000>;
104 read-only;
105 };
106 };
107 };
108 };
109
110 &pcie {
111 status = "okay";
112
113 ath9k: wifi@0,0 {
114 compatible = "pci168c,0033";
115 reg = <0x0000 0 0 0 0>;
116 qca,no-eeprom;
117 #gpio-cells = <2>;
118 gpio-controller;
119 };
120 };
121
122 &wmac {
123 status = "okay";
124
125 mtd-cal-data = <&art 0x1000>;
126 };