};
gpio-keys {
-@@ -69,6 +70,7 @@
- gmac0: mac@0 {
+@@ -70,6 +71,10 @@
compatible = "mediatek,eth-mac";
reg = <0>;
-+ mtd-mac-address = <&factory 0x2a>;
phy-mode = "2500base-x";
++
++ nvmem-cells = <&macaddr_factory_2a>;
++ nvmem-cell-names = "mac-address";
++
fixed-link {
speed = <2500>;
-@@ -80,6 +82,7 @@
- gmac1: mac@1 {
- compatible = "mediatek,eth-mac";
+ full-duplex;
+@@ -82,6 +87,9 @@
reg = <1>;
-+ mtd-mac-address = <&factory 0x24>;
phy-mode = "gmii";
phy-handle = <&phy0>;
++
++ nvmem-cells = <&macaddr_factory_24>;
++ nvmem-cell-names = "mac-address";
};
-@@ -133,8 +136,9 @@
+
+ mdio: mdio-bus {
+@@ -133,8 +141,9 @@
};
partition@b0000 {
};
};
};
+@@ -272,3 +281,17 @@
+ pinctrl-0 = <&watchdog_pins>;
+ status = "okay";
+ };
++
++&factory {
++ compatible = "nvmem-cells";
++ #address-cells = <1>;
++ #size-cells = <1>;
++
++ macaddr_factory_24: macaddr@24 {
++ reg = <0x24 0x6>;
++ };
++
++ macaddr_factory_2a: macaddr@2a {
++ reg = <0x2a 0x6>;
++ };
++};
memory@40000000 {
device_type = "memory";
reg = <0x40000000 0x10000000>;
-@@ -69,6 +77,7 @@
- gmac0: mac@0 {
+@@ -70,6 +78,10 @@
compatible = "mediatek,eth-mac";
reg = <0>;
-+ mtd-mac-address = <&factory 0x2a>;
phy-mode = "2500base-x";
++
++ nvmem-cells = <&macaddr_factory_2a>;
++ nvmem-cell-names = "mac-address";
++
fixed-link {
speed = <2500>;
-@@ -80,6 +89,7 @@
- gmac1: mac@1 {
- compatible = "mediatek,eth-mac";
+ full-duplex;
+@@ -82,6 +94,9 @@
reg = <1>;
-+ mtd-mac-address = <&factory 0x24>;
phy-mode = "gmii";
phy-handle = <&phy0>;
++
++ nvmem-cells = <&macaddr_factory_24>;
++ nvmem-cell-names = "mac-address";
};
-@@ -93,6 +103,26 @@
- };
+
+ mdio: mdio-bus {
+@@ -94,6 +109,26 @@
};
};
-+
+
+&gsw {
+ mediatek,mdio = <&mdio>;
+ mediatek,portmap = "llllw";
+ };
+ };
+};
-
++
&i2c {
pinctrl-names = "default";
+ pinctrl-0 = <&i2c_pins>;
+@@ -272,3 +307,17 @@
+ pinctrl-0 = <&watchdog_pins>;
+ status = "okay";
+ };
++
++&factory {
++ compatible = "nvmem-cells";
++ #address-cells = <1>;
++ #size-cells = <1>;
++
++ macaddr_factory_24: macaddr@24 {
++ reg = <0x24 0x6>;
++ };
++
++ macaddr_factory_2a: macaddr@2a {
++ reg = <0x2a 0x6>;
++ };
++};