ramips: convert rt2x00 EEPROM to NVMEM format
[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 &gmac1 {
33 status = "okay";
34 label = "wan";
35 phy-handle = <&ethphy0>;
36
37 nvmem-cells = <&macaddr_factory_e006>;
38 nvmem-cell-names = "mac-address";
39 };
40
41 &mdio {
42 ethphy0: ethernet-phy@0 {
43 reg = <0>;
44 };
45 };
46
47 &switch0 {
48 ports {
49 port@2 {
50 status = "okay";
51 label = "lan1";
52 };
53
54 port@3 {
55 status = "okay";
56 label = "lan2";
57 };
58
59 port@4 {
60 status = "okay";
61 label = "lan3";
62 };
63 };
64 };
65
66 &state_default {
67 gpio {
68 groups = "uart2", "uart3", "wdt";
69 function = "gpio";
70 };
71 };
72
73 &factory {
74 compatible = "nvmem-cells";
75 #address-cells = <1>;
76 #size-cells = <1>;
77
78 macaddr_factory_e000: macaddr@e000 {
79 reg = <0xe000 0x6>;
80 };
81
82 macaddr_factory_e006: macaddr@e006 {
83 reg = <0xe006 0x6>;
84 };
85 };