ramips: convert MT7628 EEPROM to NVMEM format
[openwrt/staging/jow.git] / target / linux / ramips / dts / mt7628an_tplink_re305-v3.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "mt7628an_tplink_re305.dtsi"
4
5 / {
6 compatible = "tplink,re305-v3", "mediatek,mt7628an-soc";
7 model = "TP-Link RE305 v3";
8 };
9
10 &spi0 {
11 status = "okay";
12
13 flash@0 {
14 compatible = "jedec,spi-nor";
15 reg = <0>;
16 spi-max-frequency = <10000000>;
17
18 partitions {
19 compatible = "fixed-partitions";
20 #address-cells = <1>;
21 #size-cells = <1>;
22
23 partition@0 {
24 label = "u-boot";
25 reg = <0x0 0x20000>;
26 read-only;
27 };
28
29 partition@20000 {
30 compatible = "tplink,firmware";
31 label = "firmware";
32 reg = <0x20000 0x7a0000>;
33 };
34
35 config: partition@7c0000 {
36 compatible = "nvmem-cells";
37 label = "config";
38 reg = <0x7c0000 0x30000>;
39 #address-cells = <1>;
40 #size-cells = <1>;
41 read-only;
42
43 macaddr_config_2008: macaddr@2008 {
44 reg = <0x2008 0x6>;
45 };
46 };
47
48 radio: partition@7f0000 {
49 compatible = "nvmem-cells";
50 label = "radio";
51 reg = <0x7f0000 0x10000>;
52 #address-cells = <1>;
53 #size-cells = <1>;
54 read-only;
55
56 eeprom_radio_0: eeprom@0 {
57 reg = <0x0 0x400>;
58 };
59 };
60 };
61 };
62 };
63
64 &wlan5g {
65 mediatek,mtd-eeprom = <&radio 0x8000>;
66
67 nvmem-cells = <&macaddr_config_2008>;
68 nvmem-cell-names = "mac-address";
69 mac-address-increment = <(-2)>;
70 };
71
72 &wmac {
73 nvmem-cells = <&eeprom_radio_0>, <&macaddr_config_2008>;
74 nvmem-cell-names = "eeprom", "mac-address";
75 mac-address-increment = <(-1)>;
76 };
77
78 &ethernet {
79 nvmem-cells = <&macaddr_config_2008>;
80 nvmem-cell-names = "mac-address";
81 };