ath79: ar: convert to nvmem-layout
[openwrt/staging/hauke.git] / target / linux / ath79 / dts / ar9341_tplink_tl-wr841-v8.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-WR841N/ND v8";
7 compatible = "tplink,tl-wr841-v8", "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 linux,input-type = <EV_SW>;
20 gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
21 debounce-interval = <60>;
22 };
23
24 reset {
25 label = "Reset";
26 linux,code = <KEY_RESTART>;
27 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
28 debounce-interval = <60>;
29 };
30 };
31 };
32
33 &spi {
34 status = "okay";
35
36 flash@0 {
37 compatible = "jedec,spi-nor";
38 reg = <0>;
39 spi-max-frequency = <25000000>;
40
41 partitions {
42 compatible = "fixed-partitions";
43 #address-cells = <1>;
44 #size-cells = <1>;
45
46 uboot: partition@0 {
47 label = "u-boot";
48 reg = <0x000000 0x020000>;
49 read-only;
50
51 nvmem-layout {
52 compatible = "fixed-layout";
53 #address-cells = <1>;
54 #size-cells = <1>;
55
56 macaddr_uboot_1fc00: macaddr@1fc00 {
57 reg = <0x1fc00 0x6>;
58 };
59 };
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 {
78 nvmem-cells = <&macaddr_uboot_1fc00>;
79 nvmem-cell-names = "mac-address";
80 mac-address-increment = <(-1)>;
81 };
82
83 &eth1 {
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 };