From: Trapti Damodar Balgi <[email protected]>

Enable nvmem support for MAC address retrieval from EEPROM for
ethernet@ff0b0000.
Add nvmem-cells and nvmem-cell-names to the GEM0 node, and define a
mac-address@20 cell under the EEPROM node on I2C0.

This allows U-Boot to read the MAC address from EEPROM at offset 0x20.

Signed-off-by: Trapti Damodar Balgi <[email protected]>
Signed-off-by: Michal Simek <[email protected]>
---

 arch/arm/dts/zynqmp-dlc21-revA.dts | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/arm/dts/zynqmp-dlc21-revA.dts 
b/arch/arm/dts/zynqmp-dlc21-revA.dts
index 25cd0a09c944..83c39ce1a265 100644
--- a/arch/arm/dts/zynqmp-dlc21-revA.dts
+++ b/arch/arm/dts/zynqmp-dlc21-revA.dts
@@ -90,6 +90,9 @@
        status = "okay";
        phy-handle = <&phy0>;
        phy-mode = "sgmii"; /* DTG generates this properly  1512 */
+       nvmem-cells = <&eth_mac>;
+       nvmem-cell-names = "mac-address";
+
        mdio: mdio {
                #address-cells = <1>;
                #size-cells = <0>;
@@ -153,6 +156,12 @@
        eeprom: eeprom@50 { /* u46 */
                compatible = "atmel,24c32";
                reg = <0x50>;
+               #address-cells = <1>;
+               #size-cells = <1>;
+
+               eth_mac: mac-address@20 {
+                       reg = <0x20 0x6>;
+               };
        };
        /* u138 - TUSB320IRWBR - for USB-C */
 };
-- 
2.43.0

Reply via email to