Skip to content

misc: i2c_eeprom: Backport commits for proper pagesize and partition support

Tan Siewert openbmc 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest12 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/12i2c: add support for offset overflow in to addressdrivers/i2c/i2c-uclass.c include/i2c.h+60 -70 replies
2/12misc: i2c_eeprom: support DT pagesize propertydrivers/misc/i2c_eeprom.c+6 -00 replies
3/12misc: i2c_eeprom: add eeprom write supportdrivers/misc/i2c_eeprom.c+19 -10 replies
4/12misc: i2c_eeprom: verify that the chip is functional at probe()drivers/misc/i2c_eeprom.c+8 -00 replies
5/12common: Move old EEPROM functions into a new headerboard/atmel/common/mac_eeprom.c board/compulab/common/eeprom.c board/corscience/tricorder/tricorder-eeprom.c +15 more+40 -150 replies
6/12misc: i2c_eeprom: add fixed partitions supportdrivers/misc/i2c_eeprom.c+98 -00 replies
7/12misc: i2c_eeprom: add size querydrivers/misc/i2c_eeprom.c include/i2c_eeprom.h+138 -190 replies
8/12misc: i2c_eeprom: set offset len and chip addr offset maskdrivers/misc/i2c_eeprom.c+35 -00 replies
9/12misc: i2c_eeprom: remove pagewidth field from i2c_eepromdrivers/misc/i2c_eeprom.c include/i2c_eeprom.h+3 -70 replies
10/12misc: i2c_eeprom: store pagesize instead of pagewidth in i2c_eeprom_drv_datadrivers/misc/i2c_eeprom.c+16 -160 replies
11/12misc: i2c_eeprom: implement different probe test eeprom offsetdrivers/misc/i2c_eeprom.c+7 -10 replies
12/12i2c: eeprom: Use reg property instead of offset and sizearch/sandbox/dts/test.dts configs/sandbox_defconfig drivers/misc/i2c_eeprom.c +1 more+30 -70 replies

Reviews trailers per patch

8 of 12 patches have a Reviewed-by or Acked-by.

PatchHeiko SchocherTom RiniSimon Glass
1/12R-b
2/12R-b
3/12R-b
4/12
5/12R-b
6/12R-b
7/12R-b
8/12
9/12
10/12
11/12R-b
12/12R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v1 thread

Cover letter [PATCH u-boot, v2019.04-aspeed-openbmc 00/12] 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