ath79: ar: convert to nvmem-layout
[openwrt/openwrt.git] / target / linux / ath79 / dts / ar9341_tplink_tl-wr842n-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-WR842N/ND v2";
7 compatible = "tplink,tl-wr842n-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";
25 linux,code = <KEY_RESTART>;
26 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
27 debounce-interval = <60>;
28 };
29 };
30
31 gpio-export {
32 compatible = "gpio-export";
33
34 gpio_usb_power {
35 gpio-export,name = "tp-link:power:usb";
36 gpio-export,output = <1>;
37 gpios = <&gpio 4 GPIO_ACTIVE_HIGH>;
38 };
39 };
40 };
41
42 &leds {
43 usb {
44 label = "green:usb";
45 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
46 trigger-sources = <&hub_port>;
47 linux,default-trigger = "usbport";
48 };
49 };
50
51 &spi {
52 status = "okay";
53
54 flash@0 {
55 compatible = "jedec,spi-nor";
56 reg = <0>;
57 spi-max-frequency = <25000000>;
58
59 partitions {
60 compatible = "fixed-partitions";
61 #address-cells = <1>;
62 #size-cells = <1>;
63
64 uboot: partition@0 {
65 label = "u-boot";
66 reg = <0x000000 0x020000>;
67 read-only;
68
69 nvmem-layout {
70 compatible = "fixed-layout";
71 #address-cells = <1>;
72 #size-cells = <1>;
73
74 macaddr_uboot_1fc00: macaddr@1fc00 {
75 reg = <0x1fc00 0x6>;
76 };
77 };
78 };
79
80 partition@20000 {
81 compatible = "tplink,firmware";
82 label = "firmware";
83 reg = <0x020000 0x7d0000>;
84 };
85
86 art: partition@7f0000 {
87 label = "art";
88 reg = <0x7f0000 0x010000>;
89 read-only;
90 };
91 };
92 };
93 };
94
95 &usb {
96 status = "okay";
97 };
98
99 &usb_phy {
100 status = "okay";
101 };
102
103 &eth0 {
104 nvmem-cells = <&macaddr_uboot_1fc00>;
105 nvmem-cell-names = "mac-address";
106 mac-address-increment = <(-1)>;
107 };
108
109 &eth1 {
110 phy-handle = <&swphy4>;
111
112 nvmem-cells = <&macaddr_uboot_1fc00>;
113 nvmem-cell-names = "mac-address";
114 };
115
116 &wmac {
117 mtd-cal-data = <&art 0x1000>;
118
119 nvmem-cells = <&macaddr_uboot_1fc00>;
120 nvmem-cell-names = "mac-address";
121 };