ramips: convert MT7628 EEPROM to NVMEM format
[openwrt/staging/jow.git] / target / linux / ramips / dts / mt7628an_tplink_re305-v1.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-v1", "mediatek,mt7628an-soc";
7 model = "TP-Link RE305 v1";
8 };
9
10 &spi0 {
11 status = "okay";
12
13 flash@0 {
14 compatible = "jedec,spi-nor";
15 reg = <0>;
16 spi-max-frequency = <50000000>;
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 0x5e0000>;
33 };
34
35 config: partition@600000 {
36 compatible = "nvmem-cells";
37 label = "config";
38 reg = <0x600000 0x50000>;
39 #address-cells = <1>;
40 #size-cells = <1>;
41 read-only;
42
43 macaddr_config_10008: macaddr@10008 {
44 reg = <0x10008 0x6>;
45 };
46 };
47
48 /*
49 The flash space between 0x650000 and 0x7f0000 is blank in the
50 stock firmware so it is left out as well.
51 */
52
53 radio: partition@7f0000 {
54 compatible = "nvmem-cells";
55 label = "radio";
56 reg = <0x7f0000 0x10000>;
57 #address-cells = <1>;
58 #size-cells = <1>;
59 read-only;
60
61 eeprom_radio_0: eeprom@0 {
62 reg = <0x0 0x400>;
63 };
64 };
65 };
66 };
67 };
68
69 &wlan5g {
70 mediatek,mtd-eeprom = <&radio 0x8000>;
71
72 nvmem-cells = <&macaddr_config_10008>;
73 nvmem-cell-names = "mac-address";
74 mac-address-increment = <2>;
75 };
76
77 &wmac {
78 nvmem-cells = <&eeprom_radio_0>, <&macaddr_config_10008>;
79 nvmem-cell-names = "eeprom", "mac-address";
80 mac-address-increment = <1>;
81 };
82
83 &ethernet {
84 nvmem-cells = <&macaddr_config_10008>;
85 nvmem-cell-names = "mac-address";
86 };