ramips: mt7628: use mac-base
[openwrt/staging/hauke.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 label = "config";
37 reg = <0x600000 0x50000>;
38 read-only;
39
40 nvmem-layout {
41 compatible = "fixed-layout";
42 #address-cells = <1>;
43 #size-cells = <1>;
44
45 macaddr_config_10008: macaddr@10008 {
46 compatible = "mac-base";
47 reg = <0x10008 0x6>;
48 #nvmem-cell-cells = <1>;
49 };
50 };
51 };
52
53 /*
54 The flash space between 0x650000 and 0x7f0000 is blank in the
55 stock firmware so it is left out as well.
56 */
57
58 radio: partition@7f0000 {
59 label = "radio";
60 reg = <0x7f0000 0x10000>;
61 read-only;
62
63 nvmem-layout {
64 compatible = "fixed-layout";
65 #address-cells = <1>;
66 #size-cells = <1>;
67
68 eeprom_radio_0: eeprom@0 {
69 reg = <0x0 0x400>;
70 };
71
72 eeprom_radio_8000: eeprom@8000 {
73 reg = <0x8000 0x200>;
74 };
75 };
76 };
77 };
78 };
79 };
80
81 &wlan5g {
82 nvmem-cells = <&eeprom_radio_8000>, <&macaddr_config_10008 2>;
83 nvmem-cell-names = "eeprom", "mac-address";
84 };
85
86 &wmac {
87 nvmem-cells = <&eeprom_radio_0>, <&macaddr_config_10008 1>;
88 nvmem-cell-names = "eeprom", "mac-address";
89 };
90
91 &ethernet {
92 nvmem-cells = <&macaddr_config_10008 0>;
93 nvmem-cell-names = "mac-address";
94 };