AT24/Linux driver caps page writes at 128 B (M24M02DR needs 256 B)
Hardware / DT:
I’m using ST M24M02DR (2 Mbit I²C EEPROM, page size 256 bytes, write cycle ~10 ms per byte/page) at 400 kHz. Device tree:
eeprom@50 {
compatible = "st,m24m02-dr", "atmel,24c2048";
reg = <0x50>;
pagesize = <256>;
num-addresses = <4>;
}Observation in Linux driver (at24):
In drivers/misc/eeprom/at24.c, the driver uses an I/O transfer limit (at24_io_limit) to avoid holding the I²C bus for too long. That limit is 128 bytes, enforced as a power-of-two so writes align with pages:
Problem:
On M24M02DR, if the kernel keeps sending 128‑byte chunks, I end up with two write cycles per page instead of one, and EEPROM might consider it as byte write effectively halving write throughput. The device itself supports 256‑byte page writes at 400 kHz and 1 MHz.
Questions:
- Is there a recommended way (from ST’s side) to ensure the Linux at24 driver performs 256‑byte page writes on M24M02DR?
- Are there any caveats with longer transfers (e.g., ACK polling behavior, bus stretch) specific to M24M02DR when using a full 256‑byte page write?
