ath79: add support for TP-Link TL-WA1201 v2
[openwrt/staging/mkresin.git] / target / linux / ath79 / dts / qca9563_tplink_tl-wa1201-v2.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "qca956x.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "tplink,tl-wa1201-v2", "qca,qca9563";
10 model = "TP-Link TL-WA1201 v2";
11
12 aliases {
13 label-mac-device = &eth0;
14 led-boot = &led_power;
15 led-failsafe = &led_power;
16 led-running = &led_power;
17 led-upgrade = &led_power;
18 mdio-gpio0 = &mdio2;
19 };
20
21 leds {
22 compatible = "gpio-leds";
23
24 led_power: power {
25 label = "green:power";
26 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
27 default-state = "on";
28 };
29
30 wlan2g {
31 label = "green:wlan2g";
32 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
33 linux,default-trigger = "phy1tpt";
34 };
35
36 wlan5g {
37 label = "green:wlan5g";
38 gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
39 linux,default-trigger = "phy0tpt";
40 };
41
42 lan {
43 label = "green:lan";
44 gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
45 };
46 };
47
48 keys {
49 compatible = "gpio-keys";
50
51 reset {
52 label = "Reset button";
53 linux,code = <KEY_RESTART>;
54 gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
55 debounce-interval = <60>;
56 };
57
58 wps {
59 label = "WPS button";
60 linux,code = <KEY_WPS_BUTTON>;
61 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
62 debounce-interval = <60>;
63 };
64 };
65
66 mdio2: mdio {
67 compatible = "virtual,mdio-gpio";
68
69 #address-cells = <1>;
70 #size-cells = <0>;
71
72 gpios = <&gpio 3 GPIO_ACTIVE_HIGH>, /* MDC */
73 <&gpio 4 GPIO_ACTIVE_HIGH>; /* MDIO */
74
75 phy4: ethernet-phy@4 {
76 reg = <4>;
77
78 eee-broken-100tx;
79 eee-broken-1000t;
80 };
81 };
82 };
83
84 &pcie {
85 status = "okay";
86 };
87
88 &eth0 {
89 status = "okay";
90
91 phy-mode = "sgmii";
92 phy-handle = <&phy4>;
93
94 nvmem-cells = <&macaddr_info_8>;
95 nvmem-cell-names = "mac-address";
96 };
97
98 &wmac {
99 status = "okay";
100
101 mtd-cal-data = <&art 0x1000>;
102
103 nvmem-cells = <&macaddr_info_8>;
104 nvmem-cell-names = "mac-address";
105 };
106
107 &spi {
108 status = "okay";
109
110 flash@0 {
111 compatible = "jedec,spi-nor";
112 reg = <0>;
113 spi-max-frequency = <25000000>;
114
115 partitions {
116 compatible = "fixed-partitions";
117 #address-cells = <1>;
118 #size-cells = <1>;
119
120 partition@0 {
121 label = "u-boot";
122 reg = <0x000000 0x020000>;
123 read-only;
124 };
125
126 info: partition@20000 {
127 label = "info";
128 reg = <0x020000 0x010000>;
129 read-only;
130 };
131
132 partition@30000 {
133 compatible = "denx,uimage";
134 label = "firmware";
135 reg = <0x030000 0xce0000>;
136 };
137
138 partition@d10000 {
139 label = "tplink";
140 reg = <0xd10000 0x2e0000>;
141 read-only;
142 };
143
144 art: partition@ff0000 {
145 label = "art";
146 reg = <0xff0000 0x010000>;
147 read-only;
148 };
149 };
150 };
151 };
152
153 &info {
154 compatible = "nvmem-cells";
155 #address-cells = <1>;
156 #size-cells = <1>;
157
158 macaddr_info_8: macaddr@8 {
159 reg = <0x8 0x6>;
160 };
161 };