Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <claudiu.beznea@microchip.com>
[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 <andrei.simion@microchip.com>
[claudiu.beznea: adjusted the new commit message]
Signed-off-by: Claudiu Beznea <claudiu.beznea@tuxon.dev>
Link: https://lore.kernel.org/r/20240703084704.197697-3-andrei.simion@microchip.com

authored by

Claudiu Beznea and committed by
Claudiu Beznea
d0d92d27 8400291e

+40
+40
arch/arm/boot/dts/microchip/at91-sama7g5ek.dts
··· 403 403 i2c-digital-filter; 404 404 i2c-digital-filter-width-ns = <35>; 405 405 status = "okay"; 406 + 407 + eeprom0: eeprom@52 { 408 + compatible = "microchip,24aa025e48"; 409 + reg = <0x52>; 410 + size = <256>; 411 + pagesize = <16>; 412 + vcc-supply = <&vdd_3v3>; 413 + 414 + nvmem-layout { 415 + compatible = "fixed-layout"; 416 + #address-cells = <1>; 417 + #size-cells = <1>; 418 + 419 + eeprom0_eui48: eui48@fa { 420 + reg = <0xfa 0x6>; 421 + }; 422 + }; 423 + }; 424 + 425 + eeprom1: eeprom@53 { 426 + compatible = "microchip,24aa025e48"; 427 + reg = <0x53>; 428 + size = <256>; 429 + pagesize = <16>; 430 + vcc-supply = <&vdd_3v3>; 431 + 432 + nvmem-layout { 433 + compatible = "fixed-layout"; 434 + #address-cells = <1>; 435 + #size-cells = <1>; 436 + 437 + eeprom1_eui48: eui48@fa { 438 + reg = <0xfa 0x6>; 439 + }; 440 + }; 441 + }; 406 442 }; 407 443 }; 408 444 ··· 476 440 &pinctrl_gmac0_txck_default 477 441 &pinctrl_gmac0_phy_irq>; 478 442 phy-mode = "rgmii-id"; 443 + nvmem-cells = <&eeprom0_eui48>; 444 + nvmem-cell-names = "mac-address"; 479 445 status = "okay"; 480 446 481 447 ethernet-phy@7 { ··· 495 457 &pinctrl_gmac1_mdio_default 496 458 &pinctrl_gmac1_phy_irq>; 497 459 phy-mode = "rmii"; 460 + nvmem-cells = <&eeprom1_eui48>; 461 + nvmem-cell-names = "mac-address"; 498 462 status = "okay"; /* Conflict with pdmc0. */ 499 463 500 464 ethernet-phy@0 {