]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
imx8mn-var-som: read eth MAC address from EEPROM
authorHugo Villeneuve <hvilleneuve@dimonoff.com>
Thu, 25 May 2023 21:02:28 +0000 (17:02 -0400)
committerStefano Babic <sbabic@denx.de>
Tue, 11 Jul 2023 12:40:04 +0000 (14:40 +0200)
Read ethernet MAC address from EEPROM located on the SOM.

Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
arch/arm/dts/imx8mn-var-som-symphony-u-boot.dtsi
arch/arm/mach-imx/imx8m/Kconfig

index 7272fc2b4ca6e66a2003a96314b4464bd8c8a034..e0caf3179eabe647b7c6bbb7509f07c8e77c1a55 100644 (file)
        bootph-pre-ram;
 };
 
+&eeprom_som {
+       #address-cells = <1>;
+       #size-cells = <1>;
+       eth_mac_address: eth-mac-address@19 {
+               reg = <0x19 0x06>;
+       };
+};
+
+&fec1 {
+       nvmem-cells = <&eth_mac_address>;
+       nvmem-cell-names = "mac-address";
+};
+
 &gpio1 {
        bootph-pre-ram;
 };
index a940d8a95098ac3a7e28306c2e39f9e206ad5211..67db3e46ecd2b8e1c1e52e71981d675809c5dc7f 100644 (file)
@@ -248,6 +248,7 @@ config TARGET_IMX8MN_VAR_SOM
        select MISC
        select I2C_EEPROM
        select DM_ETH_PHY
+       select NVMEM
 
 config TARGET_KONTRON_PITX_IMX8M
        bool "Support Kontron pITX-imx8m"