ath79: ar: convert to nvmem-layout
[openwrt/staging/hauke.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 nvmem-layout {
62 compatible = "fixed-layout";
63 #address-cells = <1>;
64 #size-cells = <1>;
65
66 macaddr_uboot_1fc00: macaddr@1fc00 {
67 reg = <0x1fc00 0x6>;
68 };
69 };
70 };
71
72 partition@20000 {
73 compatible = "tplink,firmware";
74 label = "firmware";
75 reg = <0x020000 0x3d0000>;
76 };
77
78 art: partition@3f0000 {
79 label = "art";
80 reg = <0x3f0000 0x010000>;
81 read-only;
82 };
83 };
84 };
85 };
86
87 &eth0 { // WAN port, initialized last as eth1
88 nvmem-cells = <&macaddr_uboot_1fc00>;
89 nvmem-cell-names = "mac-address";
90 mac-address-increment = <1>;
91 };
92
93 &eth1 { // LAN ports, initialized first as eth0
94 nvmem-cells = <&macaddr_uboot_1fc00>;
95 nvmem-cell-names = "mac-address";
96 };
97
98 &wmac {
99 mtd-cal-data = <&art 0x1000>;
100
101 nvmem-cells = <&macaddr_uboot_1fc00>;
102 nvmem-cell-names = "mac-address";
103 };