ath79: convert Araknis AN-300-AP-I-N WiFis to nvmem-cells
[openwrt/openwrt.git] / target / linux / ath79 / dts / ar9341_tplink_tl-wr941nd-v5.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-WR941ND v5";
7 compatible = "tplink,tl-wr941nd-v5", "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_LOW>;
20 debounce-interval = <60>;
21 };
22
23 reset {
24 label = "Reset/WPS";
25 linux,code = <KEY_RESTART>;
26 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
27 debounce-interval = <60>;
28 };
29 };
30 };
31
32 &leds {
33
34 lan3 {
35 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
36 };
37
38 lan4 {
39 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
40 };
41 };
42
43 &spi {
44 status = "okay";
45
46 flash@0 {
47 compatible = "jedec,spi-nor";
48 reg = <0>;
49 spi-max-frequency = <25000000>;
50
51 partitions {
52 compatible = "fixed-partitions";
53 #address-cells = <1>;
54 #size-cells = <1>;
55
56 uboot: partition@0 {
57 label = "u-boot";
58 reg = <0x000000 0x020000>;
59 read-only;
60 };
61
62 partition@20000 {
63 compatible = "tplink,firmware";
64 label = "firmware";
65 reg = <0x020000 0x3d0000>;
66 };
67
68 art: partition@3f0000 {
69 label = "art";
70 reg = <0x3f0000 0x010000>;
71 read-only;
72 };
73 };
74 };
75 };
76
77 &eth0 { // WAN port, initialized last as eth1
78 nvmem-cells = <&macaddr_uboot_1fc00>;
79 nvmem-cell-names = "mac-address";
80 mac-address-increment = <1>;
81 };
82
83 &eth1 { // LAN ports, initialized first as eth0
84 nvmem-cells = <&macaddr_uboot_1fc00>;
85 nvmem-cell-names = "mac-address";
86 };
87
88 &wmac {
89 mtd-cal-data = <&art 0x1000>;
90
91 nvmem-cells = <&macaddr_uboot_1fc00>;
92 nvmem-cell-names = "mac-address";
93 };
94
95 &uboot {
96 compatible = "nvmem-cells";
97 #address-cells = <1>;
98 #size-cells = <1>;
99
100 macaddr_uboot_1fc00: macaddr@1fc00 {
101 reg = <0x1fc00 0x6>;
102 };
103 };