This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/AM5726: EEPROM device tree settings

Guru 20755 points

Part Number: AM5726

Tool/software: Linux

Hello,

We plan to change eeprom in custom board compared to AM572X EVB.

Checking am57xx-evm-reva3.dts (and its dtsi) , I was surprised to see that it has no eeprom node.

How can it be that there is no eeprom node.

I expect to find eeprom CAT24WC256 (according to BOM), but didn't.

Is there any explanations why it is missing ?

Thank you very much,

Ranx

  • Hello Ranx,

    The eeprom node is in am57xx-beagle-x15-common.dtsi file. The sequence is am57xx-evm-reva3.dts > am57xx-evm-reva3-base.dts > am57xx-beagle-x15-revb1.dts > am57xx-beagle-x15-common.dtsi

    Best regards,
    Kemal

  • Hi Kemal,

    Thank a lot,
    somehow I missed that file in my search. sorry.

    It is interesting to note that device tree use other page size (32 instead of 64 , probably it does not matter ?)
    In BOM of EVB we see that eeprom is actually CAT24WC256 (which has page 64) , while in devicetree:
    eeprom: eeprom@50 {
    compatible = "at,24c32"; <-
    reg = <0x50>;
    };

    Thank again,
    Ran
  • ranchu said:
    It is interesting to note that device tree use other page size (32 instead of 64 , probably it does not matter ?)


    Unless you like data loss puzzles, always be sure that any chip you configure as a 24c32 (32 kbit) or larger is NOT really a 24c16 (16 kbit) or smaller, and vice versa. Marking the chip as read-only won't help recover from this. Also, if your chip has any software write-protect mechanism you may want to review the code to make sure this driver won't turn it on by accident. This is the message which the driver provider documented in kernel's menuconfig.

    The CAT24WC256 is a 256K-bit Serial CMOS EEPROM internally organized as 32,768 words of 8 bits each. It supports 64-byte (512-bit) page write buffer which allows you to send up to 64 bytes of data before it needs to be saved. Its physical page size is 32kbit and 64-byte (512-bit) is the size of the page write buffer.