1f089affac3f421e571f563f229f4f52d3fa8f85
[openwrt/staging/hauke.git] / target / linux / ath79 / dts / ar9341_tplink_tl-mr3420-v2.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "ar9341_tplink.dtsi"
4
5 / {
6 model = "TP-Link TL-MR3420 v2";
7 compatible = "tplink,tl-mr3420-v2", "qca,ar9341";
8
9 aliases {
10 label-mac-device = &wmac;
11 };
12
13 keys {
14 compatible = "gpio-keys";
15
16 rfkill {
17 label = "WiFi";
18 linux,code = <KEY_RFKILL>;
19 gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
20 debounce-interval = <60>;
21 };
22
23 reset {
24 label = "Reset/WPS";
25 linux,code = <KEY_RESTART>;
26 gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
27 debounce-interval = <60>;
28 };
29 };
30 };
31
32 &leds {
33 usb {
34 label = "green:usb";
35 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
36 trigger-sources = <&hub_port>;
37 linux,default-trigger = "usbport";
38 };
39 };
40
41 &gpio {
42 usb_power {
43 gpio-hog;
44 gpios = <4 GPIO_ACTIVE_HIGH>;
45 output-high;
46 line-name = "tp-link:power:usb";
47 };
48 };
49
50 &spi {
51 status = "okay";
52
53 flash@0 {
54 compatible = "jedec,spi-nor";
55 reg = <0>;
56 spi-max-frequency = <25000000>;
57
58 partitions {
59 compatible = "fixed-partitions";
60 #address-cells = <1>;
61 #size-cells = <1>;
62
63 uboot: partition@0 {
64 label = "u-boot";
65 reg = <0x000000 0x020000>;
66 read-only;
67
68 nvmem-layout {
69 compatible = "fixed-layout";
70 #address-cells = <1>;
71 #size-cells = <1>;
72
73 macaddr_uboot_1fc00: macaddr@1fc00 {
74 reg = <0x1fc00 0x6>;
75 };
76 };
77 };
78
79 partition@20000 {
80 compatible = "tplink,firmware";
81 label = "firmware";
82 reg = <0x020000 0x3d0000>;
83 };
84
85 art: partition@3f0000 {
86 label = "art";
87 reg = <0x3f0000 0x010000>;
88 read-only;
89 };
90 };
91 };
92 };
93
94 &usb {
95 status = "okay";
96 };
97
98 &usb_phy {
99 status = "okay";
100 };
101
102 &eth0 {
103 nvmem-cells = <&macaddr_uboot_1fc00>;
104 nvmem-cell-names = "mac-address";
105 mac-address-increment = <(-1)>;
106 };
107
108 &eth1 {
109 nvmem-cells = <&macaddr_uboot_1fc00>;
110 nvmem-cell-names = "mac-address";
111 };
112
113 &wmac {
114 mtd-cal-data = <&art 0x1000>;
115
116 nvmem-cells = <&macaddr_uboot_1fc00>;
117 nvmem-cell-names = "mac-address";
118 };