ath79: add support for TP-Link TL-WA901ND v2
[openwrt/staging/mkresin.git] / target / linux / ath79 / dts / ar9132_tplink_tl-wa901nd-v2.dts
1 // SPDX-License-Identifier: GPL-2.0
2 /dts-v1/;
3
4 #include <dt-bindings/gpio/gpio.h>
5 #include <dt-bindings/input/input.h>
6
7 #include "ar9132.dtsi"
8
9 / {
10 compatible = "tplink,tl-wa901nd-v2", "qca,ar9132";
11 model = "TP-Link TL-WA901ND v2";
12
13 aliases {
14 led-boot = &system;
15 led-failsafe = &system;
16 led-running = &system;
17 led-upgrade = &system;
18 };
19
20 extosc: ref {
21 compatible = "fixed-clock";
22 #clock-cells = <0>;
23 clock-frequency = <40000000>;
24 };
25
26 keys {
27 compatible = "gpio-keys";
28
29 reset {
30 label = "reset";
31 linux,code = <KEY_RESTART>;
32 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
33 debounce-interval = <60>;
34 };
35
36 qss {
37 label = "qss";
38 linux,code = <KEY_WPS_BUTTON>;
39 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
40 debounce-interval = <60>;
41 };
42 };
43
44 leds {
45 compatible = "gpio-leds";
46
47 system: system {
48 label = "tp-link:green:system";
49 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
50 };
51
52 qss {
53 label = "tp-link:green:qss";
54 gpios = <&gpio 4 GPIO_ACTIVE_HIGH>;
55 default-state = "off";
56 };
57
58 wlan {
59 label = "tp-link:green:wlan";
60 gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
61 default-state = "off";
62 linux,default-trigger = "phy0tpt";
63 };
64 };
65 };
66
67 &uart {
68 status = "okay";
69 };
70
71 &pll {
72 clocks = <&extosc>;
73 };
74
75 &spi {
76 status = "okay";
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@1 {
96 label = "firmware";
97 reg = <0x020000 0x3D0000>;
98 };
99
100 art: partition@2 {
101 label = "art";
102 reg = <0x3F0000 0x010000>;
103 read-only;
104 };
105 };
106 };
107 };
108
109 &mdio0 {
110 status = "okay";
111
112 phy0: ethernet-phy@c {
113 reg = <0xc>;
114 phy-mode = "mii";
115 };
116 };
117
118 &eth0 {
119 status = "okay";
120
121 phy-mode = "mii";
122 mtd-mac-address = <&uboot 0x1fc00>;
123
124 phy-handle = <&phy0>;
125 };
126
127 &wmac {
128 status = "okay";
129 mtd-cal-data = <&art 0x1000>;
130 mtd-mac-address = <&uboot 0x1fc00>;
131 };