From: Claudiu Beznea Date: Wed, 3 Jul 2024 08:47:03 +0000 (+0300) Subject: ARM: dts: microchip: at91-sama7g5ek: add EEPROMs X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=d0d92d272c29597b4a67f70517656e85aab2ddcb;p=linux.git ARM: dts: microchip: at91-sama7g5ek: add EEPROMs The main boot sequence for Microchip AT91 devices is one of the following: 1/ ROM BOOT -> AT91Bootstrap -> U-Boot -> Linux Kernel 2/ ROM BOOT -> AT91Bootstrap -> Linux Kernel For case 1/ U-Boot is the stage where the Ethernet MAC addresses are set. For case 2/ where U-Boot is skipped the Ethernet MAC addresses need to be configured in Linux. For this add EEPROMs and nvmem-layout to describe EUI48 MAC address regions. Signed-off-by: Claudiu Beznea [andrei.simion@microchip.com: Add nvmem-layout to describe eui48 mac region. Align compatible name with datasheet. Reword commit message.] Signed-off-by: Andrei Simion [claudiu.beznea: adjusted the new commit message] Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20240703084704.197697-3-andrei.simion@microchip.com --- diff --git a/arch/arm/boot/dts/microchip/at91-sama7g5ek.dts b/arch/arm/boot/dts/microchip/at91-sama7g5ek.dts index 20b2497657ae..40f4480e298b 100644 --- a/arch/arm/boot/dts/microchip/at91-sama7g5ek.dts +++ b/arch/arm/boot/dts/microchip/at91-sama7g5ek.dts @@ -403,6 +403,42 @@ i2c-digital-filter; i2c-digital-filter-width-ns = <35>; status = "okay"; + + eeprom0: eeprom@52 { + compatible = "microchip,24aa025e48"; + reg = <0x52>; + size = <256>; + pagesize = <16>; + vcc-supply = <&vdd_3v3>; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom0_eui48: eui48@fa { + reg = <0xfa 0x6>; + }; + }; + }; + + eeprom1: eeprom@53 { + compatible = "microchip,24aa025e48"; + reg = <0x53>; + size = <256>; + pagesize = <16>; + vcc-supply = <&vdd_3v3>; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom1_eui48: eui48@fa { + reg = <0xfa 0x6>; + }; + }; + }; }; }; @@ -440,6 +476,8 @@ &pinctrl_gmac0_txck_default &pinctrl_gmac0_phy_irq>; phy-mode = "rgmii-id"; + nvmem-cells = <&eeprom0_eui48>; + nvmem-cell-names = "mac-address"; status = "okay"; ethernet-phy@7 { @@ -457,6 +495,8 @@ &pinctrl_gmac1_mdio_default &pinctrl_gmac1_phy_irq>; phy-mode = "rmii"; + nvmem-cells = <&eeprom1_eui48>; + nvmem-cell-names = "mac-address"; status = "okay"; /* Conflict with pdmc0. */ ethernet-phy@0 {