Skip to content

Commit

Permalink
arm64: dts: ti: k3-am642-main: fix ports mac properties
Browse files Browse the repository at this point in the history
[ Upstream commit 50c9bfc ]

The current device tree CPSW3g node adds non-zero "mac-address" property to
the ports, which prevents random MAC address assignment to network devices
if bootloader failed to update DT. This may cause more then one host to
have the same MAC in the network.

 mac-address = [00 00 de ad be ef];
 mac-address = [00 01 de ad be ef];

In addition, there is one MAC address available in eFuse registers which
can be used for default port 1.

Hence, fix ports MAC properties by:
- resetting "mac-address" property to 0
- adding ti,syscon-efuse = <&main_conf 0x200> to Port 1

Fixes: 3753b12 ("arm64: dts: ti: k3-am64-main: Add CPSW DT node")
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Reviewed-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Link: https://lore.kernel.org/r/20210608184940.25934-1-grygorii.strashko@ti.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
grygoriyS authored and gregkh committed Jul 20, 2021
1 parent 5b47aec commit 6f62efd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions arch/arm64/boot/dts/ti/k3-am64-main.dtsi
Expand Up @@ -489,15 +489,16 @@
ti,mac-only;
label = "port1";
phys = <&phy_gmii_sel 1>;
mac-address = [00 00 de ad be ef];
mac-address = [00 00 00 00 00 00];
ti,syscon-efuse = <&main_conf 0x200>;
};

cpsw_port2: port@2 {
reg = <2>;
ti,mac-only;
label = "port2";
phys = <&phy_gmii_sel 2>;
mac-address = [00 01 de ad be ef];
mac-address = [00 00 00 00 00 00];
};
};

Expand Down

0 comments on commit 6f62efd

Please sign in to comment.