misc: i2c_eeprom: Backport commits for proper pagesize and partition support
cover misc: i2c_eeprom: Backport commits for proper pagesize and partition support
This series adds proper support for pagesizes and partitions on EEPROMs connected via an I2C bus. All commits were backported from upstream tag v2021.04.
The original issue arised during debugging a platform that gets its MAC address from an Atmel 24c128 EEPROM instead of the hardware, which always failed [1].
With the patches applied, the EEPROM can be read properly.
Before:
ast# i2c dev 7
ast# i2c md 0x57 0x3f80 6
3f80: ff ff ff ff ff ff ......
After:
ast# i2c bus
Bus 3: i2c-bus@100
Bus 7: i2c-bus@300 (active 7)
57: eeprom@57, offset len 2, flags 0
ast# i2c md 0x57 0x3f80 6
3f80: 78 24 35 bb cd 01 x$5...
[1] https://discord.com/channels/775381525260664832/775694683589574659/1329524655752745044
Baruch Siach (3):
misc: i2c_eeprom: support DT pagesize property
misc: i2c_eeprom: add eeprom write support
misc: i2c_eeprom: verify that the chip is functional at probe()
Eugen Hristev (1):
misc: i2c_eeprom: implement different probe test eeprom offset
Masahiro Yamada (2):
misc: i2c_eeprom: remove pagewidth field from i2c_eeprom
misc: i2c_eeprom: store pagesize instead of pagewidth in
i2c_eeprom_drv_data
Michal Simek (1):
i2c: eeprom: Use reg property instead of offset and size
Robert Beckett (4):
i2c: add support for offset overflow in to address
misc: i2c_eeprom: add fixed partitions support
misc: i2c_eeprom: add size query
misc: i2c_eeprom: set offset len and chip addr offset mask
Simon Glass (1):
common: Move old EEPROM functions into a new header
arch/sandbox/dts/test.dts | 13 + board/atmel/common/mac_eeprom.c | 1 + board/compulab/common/eeprom.c | 1 + board/corscience/tricorder/tricorder-eeprom.c | 1 + board/dhelectronics/dh_imx6/dh_imx6.c | 1 + board/freescale/mpc8323erdb/mpc8323erdb.c | 1 + board/kosagi/novena/novena.c | 1 + board/phytec/phycore_rk3288/phycore-rk3288.c | 1 + board/rockchip/tinker_rk3288/tinker-rk3288.c | 1 + board/samtec/vining_fpga/socfpga.c | 1 + board/ti/am43xx/board.c | 1 + board/ti/ks2_evm/board_k2g.c | 1 + cmd/eeprom.c | 1 + configs/sandbox_defconfig | 1 + drivers/i2c/i2c-uclass.c | 34 +- drivers/misc/i2c_eeprom.c | 316 ++++++++++++++++-- drivers/mtd/mw_eeprom.c | 1 + drivers/rtc/rv3029.c | 1 + env/eeprom.c | 1 + include/common.h | 15 - include/eeprom.h | 24 ++ include/i2c.h | 33 ++ include/i2c_eeprom.h | 14 +- test/dm/bootcount.c | 8 + 24 files changed, 430 insertions(+), 43 deletions(-) create mode 100644 include/eeprom.h
Signature · 1 line
2.47.0