Skip to content

Commit

Permalink
ipq806x: Fix default MAC addresses on MR52 by moving to nvmem-layout
Browse files Browse the repository at this point in the history
Partial, single-target update extracted from openwrt@d264d3a6

The previous `mac-address-increment` is deprecated, and in particular on
this target means that the kernel is unable to read the MAC address,
causing the system to boot with a new random MAC address each time.

Fixes: openwrt#15238

Signed-off-by: Rosen Penev <[email protected]>
[[email protected]: single-target-specific backport from larger change]
Signed-off-by: Rafal Boni <[email protected]>
Link: openwrt#16774
Signed-off-by: Robert Marko <[email protected]>
  • Loading branch information
rkboni authored and robimarko committed Oct 31, 2024
1 parent 92c2a4c commit 607091d
Showing 1 changed file with 15 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
phy-mode = "sgmii";
phy-handle = <&phy0>;

nvmem-cells = <&mac_address>;
nvmem-cells = <&mac_address 0>;
nvmem-cell-names = "mac-address";
};

Expand All @@ -93,9 +93,8 @@
phy-mode = "sgmii";
phy-handle = <&phy4>;

nvmem-cells = <&mac_address>;
nvmem-cells = <&mac_address 1>;
nvmem-cell-names = "mac-address";
mac-address-increment = <1>;
};

&gsbi7 {
Expand Down Expand Up @@ -142,11 +141,17 @@
pagesize = <32>;
reg = <0x52>;
read-only;
#address-cells = <1>;
#size-cells = <1>;

mac_address: mac-address@66 {
reg = <0x66 0x6>;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;

mac_address: mac-address@66 {
compatible = "mac-base";
reg = <0x66 0x6>;
#nvmem-cell-cells = <1>;
};
};
};
};
Expand Down Expand Up @@ -212,21 +217,18 @@
};

&wifi0 {
nvmem-cells = <&mac_address>;
nvmem-cells = <&mac_address 4>;
nvmem-cell-names = "mac-address";
mac-address-increment = <4>;
};

&wifi1 {
nvmem-cells = <&mac_address>;
nvmem-cells = <&mac_address 3>;
nvmem-cell-names = "mac-address";
mac-address-increment = <3>;
};

&wifi2 {
nvmem-cells = <&mac_address>;
nvmem-cells = <&mac_address 2>;
nvmem-cell-names = "mac-address";
mac-address-increment = <2>;
};

&hs_phy_0 {
Expand Down

0 comments on commit 607091d

Please sign in to comment.