ramips: convert mtd-mac-address to nvmem implementation
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_xiaomi_router-ac2100.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "mt7621_xiaomi_nand_128m.dtsi"
4
5 &pcie {
6 status = "okay";
7 };
8
9 &pcie0 {
10 wifi@0,0 {
11 compatible = "mediatek,mt76";
12 reg = <0x0000 0 0 0 0>;
13 mediatek,mtd-eeprom = <&factory 0x8000>;
14 ieee80211-freq-limit = <5000000 6000000>;
15 };
16 };
17
18 &pcie1 {
19 wifi@0,0 {
20 compatible = "mediatek,mt76";
21 reg = <0x0000 0 0 0 0>;
22 mediatek,mtd-eeprom = <&factory 0x0000>;
23 ieee80211-freq-limit = <2400000 2500000>;
24 };
25 };
26
27 &gmac0 {
28 nvmem-cells = <&macaddr_factory_e000>;
29 nvmem-cell-names = "mac-address";
30 };
31
32 &switch0 {
33 ports {
34 port@0 {
35 status = "okay";
36 label = "wan";
37 nvmem-cells = <&macaddr_factory_e006>;
38 nvmem-cell-names = "mac-address";
39 };
40
41 port@2 {
42 status = "okay";
43 label = "lan1";
44 };
45
46 port@3 {
47 status = "okay";
48 label = "lan2";
49 };
50
51 port@4 {
52 status = "okay";
53 label = "lan3";
54 };
55 };
56 };
57
58 &state_default {
59 gpio {
60 groups = "uart2", "uart3", "wdt";
61 function = "gpio";
62 };
63 };
64
65 &factory {
66 compatible = "nvmem-cells";
67 #address-cells = <1>;
68 #size-cells = <1>;
69
70 macaddr_factory_e000: macaddr@e000 {
71 reg = <0xe000 0x6>;
72 };
73
74 macaddr_factory_e006: macaddr@e006 {
75 reg = <0xe006 0x6>;
76 };
77 };