History log of /openbmc/u-boot/drivers/misc/i2c_eeprom.c (Results 1 – 25 of 25)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 8b21180f 17-Jan-2025 Michal Simek <michal.simek@xilinx.com>

i2c: eeprom: Use reg property instead of offset and size

Remove adhoc dt binding for fixed-partition definition for i2c eeprom.
fixed-partition are using reg property instead of offset/size pair.

(

i2c: eeprom: Use reg property instead of offset and size

Remove adhoc dt binding for fixed-partition definition for i2c eeprom.
fixed-partition are using reg property instead of offset/size pair.

(cherry picked from commit f692b479f02d9b2689b0686f1f6ff2f06c6ecc59)

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tan Siewert <tan.siewert@hetzner.com>
Link: https://patch.msgid.link/20250117094434.16641-13-tan.siewert@hetzner.com
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>

show more ...


# b2e75b2a 17-Jan-2025 Eugen Hristev <eugen.hristev@microchip.com>

misc: i2c_eeprom: implement different probe test eeprom offset

Because of this commit :
5ae84860b0 ("misc: i2c_eeprom: verify that the chip is functional at probe()")
at probe time, each eeprom is t

misc: i2c_eeprom: implement different probe test eeprom offset

Because of this commit :
5ae84860b0 ("misc: i2c_eeprom: verify that the chip is functional at probe()")
at probe time, each eeprom is tested for read at offset 0.

The Atmel AT24MAC402 eeprom has different mapping. One i2c slave address is
used for the lower 0x80 bytes and another i2c slave address is used for the
upper 0x80 bytes. Because of this basically the i2c master sees 2 different
slaves. We need the upper bytes because we read the unique MAC address from
this EEPROM area.

However this implies that our slave address will return error on reads
from address 0x0 to 0x80.

To solve this, implemented an offset field inside platform data that is by
default 0 (as it is used now), but can be changed in the compatible table.

The probe function will now read at this offset and use it, instead of blindly
checking offset 0.

This will fix the regression noticed on these EEPROMs since the commit
abovementioned that introduces the probe failed issue.

(cherry picked from commit b24dc83f156604f253ef6521776444188c5bff9b)

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Tan Siewert <tan.siewert@hetzner.com>
Link: https://patch.msgid.link/20250117094434.16641-12-tan.siewert@hetzner.com
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>

show more ...


# fa909a9a 17-Jan-2025 Masahiro Yamada <yamada.masahiro@socionext.com>

misc: i2c_eeprom: store pagesize instead of pagewidth in i2c_eeprom_drv_data

Associate the pagesize with compatible strings, and copy it to
priv->pagesize. This is more straight-forward.

(cherry pi

misc: i2c_eeprom: store pagesize instead of pagewidth in i2c_eeprom_drv_data

Associate the pagesize with compatible strings, and copy it to
priv->pagesize. This is more straight-forward.

(cherry picked from commit 0c17bb1cbe87c5b00880d3445b46c437f3f22e02)

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Tan Siewert <tan.siewert@hetzner.com>
Link: https://patch.msgid.link/20250117094434.16641-11-tan.siewert@hetzner.com
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>

show more ...


# c6dc0466 17-Jan-2025 Masahiro Yamada <yamada.masahiro@socionext.com>

misc: i2c_eeprom: remove pagewidth field from i2c_eeprom

This struct member is not used in any effective way. Remove it.

(cherry picked from commit ed6dd4e460bd94150dc09fce547a27e2fcca66eb)

Signed

misc: i2c_eeprom: remove pagewidth field from i2c_eeprom

This struct member is not used in any effective way. Remove it.

(cherry picked from commit ed6dd4e460bd94150dc09fce547a27e2fcca66eb)

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Tan Siewert <tan.siewert@hetzner.com>
Link: https://patch.msgid.link/20250117094434.16641-10-tan.siewert@hetzner.com
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>

show more ...


# 868b63cb 17-Jan-2025 Robert Beckett <bob.beckett@collabora.com>

misc: i2c_eeprom: set offset len and chip addr offset mask

Set the correct offset length and chip address offset mask for each
device to allow correct access to total capacity of the devices.

(cher

misc: i2c_eeprom: set offset len and chip addr offset mask

Set the correct offset length and chip address offset mask for each
device to allow correct access to total capacity of the devices.

(cherry picked from commit 821c982e359a383c8b95106e135da9fd98f16d2b)

Signed-off-by: Robert Beckett <bob.beckett@collabora.com>
Signed-off-by: Tan Siewert <tan.siewert@hetzner.com>
Link: https://patch.msgid.link/20250117094434.16641-9-tan.siewert@hetzner.com
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>

show more ...


# edd76254 17-Jan-2025 Robert Beckett <bob.beckett@collabora.com>

misc: i2c_eeprom: add size query

Add ability to query size of eeprom device and partitions

(cherry picked from commit 033e18b47bd020610f84ca88c5ce3b88215d563a)

Signed-off-by: Robert Beckett <bob.b

misc: i2c_eeprom: add size query

Add ability to query size of eeprom device and partitions

(cherry picked from commit 033e18b47bd020610f84ca88c5ce3b88215d563a)

Signed-off-by: Robert Beckett <bob.beckett@collabora.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Tan Siewert <tan.siewert@hetzner.com>
Link: https://patch.msgid.link/20250117094434.16641-8-tan.siewert@hetzner.com
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>

show more ...


# 1021ebcd 17-Jan-2025 Robert Beckett <bob.beckett@collabora.com>

misc: i2c_eeprom: add fixed partitions support

Add ability to partition eeprom via devicetree bindings

(cherry picked from commit 1a59cb426d50082821df941146a9ec20decd118f)

Signed-off-by: Robert Be

misc: i2c_eeprom: add fixed partitions support

Add ability to partition eeprom via devicetree bindings

(cherry picked from commit 1a59cb426d50082821df941146a9ec20decd118f)

Signed-off-by: Robert Beckett <bob.beckett@collabora.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Tan Siewert <tan.siewert@hetzner.com>
Link: https://patch.msgid.link/20250117094434.16641-7-tan.siewert@hetzner.com
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>

show more ...


# 62465631 17-Jan-2025 Simon Glass <sjg@chromium.org>

common: Move old EEPROM functions into a new header

These functions do not use driver model but are still used. Move them to a
new eeprom.h header file.

(cherry picked from commit cb3ef6810a27c8ddf

common: Move old EEPROM functions into a new header

These functions do not use driver model but are still used. Move them to a
new eeprom.h header file.

(cherry picked from commit cb3ef6810a27c8ddf5db8694bcef9337f27d12ce)

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Tan Siewert <tan.siewert@hetzner.com>
Link: https://patch.msgid.link/20250117094434.16641-6-tan.siewert@hetzner.com
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>

show more ...


# fdcc3af3 17-Jan-2025 Baruch Siach <baruch@tkos.co.il>

misc: i2c_eeprom: verify that the chip is functional at probe()

Read a single byte from EEPROM to verify that it is actually there.

This is equivalent to Linux kernel commit 00f0ea70d2b8 ("eeprom:

misc: i2c_eeprom: verify that the chip is functional at probe()

Read a single byte from EEPROM to verify that it is actually there.

This is equivalent to Linux kernel commit 00f0ea70d2b8 ("eeprom: at24:
check if the chip is functional in probe()").

Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>

(cherry picked from commit 5ae84860b0428b37063a6d7b03cae26a4e772da7)

hs: fixed style check prefer kernel type 'u8' over 'uint8_t'
Signed-off-by: Tan Siewert <tan.siewert@hetzner.com>
Link: https://patch.msgid.link/20250117094434.16641-5-tan.siewert@hetzner.com
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>

show more ...


# a775a92e 17-Jan-2025 Baruch Siach <baruch@tkos.co.il>

misc: i2c_eeprom: add eeprom write support

Write up to page size in each i2c transfer.

(cherry picked from commit 84c80c63d53bc8a7779b1e7e7084ee3b2d20e768)

Signed-off-by: Baruch Siach <baruch@tkos

misc: i2c_eeprom: add eeprom write support

Write up to page size in each i2c transfer.

(cherry picked from commit 84c80c63d53bc8a7779b1e7e7084ee3b2d20e768)

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Reviewed-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Tan Siewert <tan.siewert@hetzner.com>
Link: https://patch.msgid.link/20250117094434.16641-4-tan.siewert@hetzner.com
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>

show more ...


# 7ce14386 17-Jan-2025 Baruch Siach <baruch@tkos.co.il>

misc: i2c_eeprom: support DT pagesize property

Read the page size from DT when available.

(cherry picked from commit a29034d1e6d1c1535055f455b5af5906a7edbc04)

Signed-off-by: Baruch Siach <baruch@t

misc: i2c_eeprom: support DT pagesize property

Read the page size from DT when available.

(cherry picked from commit a29034d1e6d1c1535055f455b5af5906a7edbc04)

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Reviewed-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Tan Siewert <tan.siewert@hetzner.com>
Link: https://patch.msgid.link/20250117094434.16641-3-tan.siewert@hetzner.com
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>

show more ...


Revision tags: v00.04.15, v00.04.14, v00.04.13, v00.04.12, v00.04.11, v00.04.10, v00.04.09, v00.04.08, v00.04.07, v00.04.06, v00.04.05, v00.04.04, v00.04.03, v00.04.02, v00.04.01, v00.04.00, v2021.04, v00.03.03, v2021.01, v2020.10, v2020.07, v00.02.13, v2020.04, v2020.01, v2019.10, v00.02.05, v00.02.04, v00.02.03, v00.02.02, v00.02.01, v2019.07, v00.02.00, v2019.04
# 0da90255 26-Jan-2019 Tom Rini <trini@konsulko.com>

Merge branch '2019-01-25-master-imports'

- snapdragon 820c improvements
- poplar updates
- DFU + SPL cleanups
- Improve the mediatek mmc driver
- Other minor cleanups / improvements


# e38cef9f 21-Jan-2019 Michal Simek <michal.simek@xilinx.com>

misc: i2c_eeprom: Add atmel,24c08 to the list

Linux kernel binding is using atmel,24c08 compatible string. On the
other hand there is atmel,24c08a which is not listed in the kernel.
Add compatible s

misc: i2c_eeprom: Add atmel,24c08 to the list

Linux kernel binding is using atmel,24c08 compatible string. On the
other hand there is atmel,24c08a which is not listed in the kernel.
Add compatible string without "a" suffix to be compatible with Linux
kernel binding.

These eeproms are available on several ZynqMP development boards.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>

show more ...


Revision tags: v2018.07
# 83d290c5 06-May-2018 Tom Rini <trini@konsulko.com>

SPDX: Convert all of our single license tags to Linux Kernel style

When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from. So

SPDX: Convert all of our single license tags to Linux Kernel style

When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from. So we picked the
area of the file that usually had a full license text and replaced it
with an appropriate SPDX-License-Identifier: entry. Since then, the
Linux Kernel has adopted SPDX tags and they place it as the very first
line in a file (except where shebangs are used, then it's second line)
and with slightly different comment styles than us.

In part due to community overlap, in part due to better tag visibility
and in part for other minor reasons, switch over to that style.

This commit changes all instances where we have a single declared
license in the tag as both the before and after are identical in tag
contents. There's also a few places where I found we did not have a tag
and have introduced one.

Signed-off-by: Tom Rini <trini@konsulko.com>

show more ...


Revision tags: v2018.03, v2018.01, v2017.11
# de656752 30-Jul-2017 Wenyou Yang <wenyou.yang@microchip.com>

misc: i2c_eeprom: Add compatible for AT24MAC402

Add the new compatible "atmel,24mac402" to accommodate AT24MAC402.
The AT24MAC402 is a 2K Serial EEPROM and the 2-Kbit memory array
is internally orga

misc: i2c_eeprom: Add compatible for AT24MAC402

Add the new compatible "atmel,24mac402" to accommodate AT24MAC402.
The AT24MAC402 is a 2K Serial EEPROM and the 2-Kbit memory array
is internally organized as 16 pages of 16 bytes of EEPROM each.
The 48-bit EUI address in the AT24MAC402 are located in the extended
memory block.

Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com>

show more ...


# 72640667 30-Jul-2017 Wenyou Yang <wenyou.yang@microchip.com>

misc: i2c_eeprom: Add compatible for 24AA02E48

Add the new compatible "microchip,24aa02e48" to accommodate 24AA02E48,
the 24AA02E48 is a 2K I2C Serial EEPROM with pre-programmed globally
unique, 48-

misc: i2c_eeprom: Add compatible for 24AA02E48

Add the new compatible "microchip,24aa02e48" to accommodate 24AA02E48,
the 24AA02E48 is a 2K I2C Serial EEPROM with pre-programmed globally
unique, 48-bit node address, and 8-byte page size.

Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com>

show more ...


# b8a238f1 26-Jun-2017 Tom Rini <trini@konsulko.com>

Merge branch 'master' of git://git.denx.de/u-boot-i2c


# 5e75ea15 22-Jun-2017 Masahiro Yamada <yamada.masahiro@socionext.com>

i2c_eeprom: add static to i2c_eeprom_std_ops/probe

These are only used in drivers/mis/i2c_eeprom.c

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Bin Meng <bmeng.cn@gma

i2c_eeprom: add static to i2c_eeprom_std_ops/probe

These are only used in drivers/mis/i2c_eeprom.c

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>

show more ...


# 1f5541c8 10-May-2017 Tom Rini <trini@konsulko.com>

Merge git://git.denx.de/u-boot-rockchip

This adds a new firefly-rk3399 board, MIPI support for rk3399 and
rk3288, rk818 pmic support, mkimage improvements for rockchip and a few
other things.


# 8880efbd 22-Apr-2017 Jonas Karlman <jonas@kwiboo.se>

i2c_eeprom: add read and write functions

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Simon Glass <sjg@chromium.org>


Revision tags: v2016.07, openbmc-20160624-1
# d7e28918 22-Jun-2016 mario.six@gdsys.cc <mario.six@gdsys.cc>

i2c_eeprom: Add reading support

This patch implements the reading functionality for the generic I2C
EEPROM driver, which was just a non-functional stub until now.

Since the page size will be of imp

i2c_eeprom: Add reading support

This patch implements the reading functionality for the generic I2C
EEPROM driver, which was just a non-functional stub until now.

Since the page size will be of importance for the writing support, we
add suitable members to the private data structure to keep track of it.

Compatibility strings for a range of at24c* chips are added.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heiko Schocher <hs@denx.de>

show more ...


Revision tags: v2016.01-rc1, v2015.10, v2015.10-rc5, v2015.10-rc4, v2015.10-rc3, v2015.10-rc2, v2015.10-rc1, v2015.07, v2015.07-rc3, v2015.07-rc2, v2015.07-rc1, v2015.04, v2015.04-rc5, v2015.04-rc4, v2015.04-rc3, v2015.04-rc2, v2015.04-rc1, v2015.01
# fc078895 05-Jan-2015 Tom Rini <trini@ti.com>

Merge branch 'misc' of git://git.denx.de/u-boot-x86


Revision tags: v2015.01-rc4
# ee5ee876 18-Dec-2014 Masahiro Yamada <yamada.m@jp.panasonic.com>

i2c_eeprom: include <linux/err.h> to fix build error

drivers/misc/i2c_eeprom.c fails to build unless CONFIG_FIT_SIGNATURE
is defined.

CC drivers/misc/i2c_eeprom.o
drivers/misc/i2c_eeprom.c:

i2c_eeprom: include <linux/err.h> to fix build error

drivers/misc/i2c_eeprom.c fails to build unless CONFIG_FIT_SIGNATURE
is defined.

CC drivers/misc/i2c_eeprom.o
drivers/misc/i2c_eeprom.c: In function 'i2c_eeprom_read':
drivers/misc/i2c_eeprom.c:15:10: error: 'ENODEV' undeclared
(first use in this function)
drivers/misc/i2c_eeprom.c:15:10: note: each undeclared identifier
is reported only once for each function it appears in
drivers/misc/i2c_eeprom.c: In function 'i2c_eeprom_write':
drivers/misc/i2c_eeprom.c:21:10: error: 'ENODEV' undeclared
(first use in this function)
drivers/misc/i2c_eeprom.c:22:1: warning: control reaches end of
non-void function [-Wreturn-type]
drivers/misc/i2c_eeprom.c: In function 'i2c_eeprom_read':
drivers/misc/i2c_eeprom.c:16:1: warning: control reaches end of
non-void function [-Wreturn-type]
make[2]: *** [drivers/misc/i2c_eeprom.o] Error 1
make[1]: *** [drivers/misc] Error 2
make: *** [drivers] Error 2

By the way, Sandbox (enabling CONFIG_FIT_SIGNATURE) is luckily
working depending on it.
Sandbox includes include/asm-generic/errno.h
from include/errno.h
from include/u-boot/rsa-checksum.h
from include/image.h
from include/common.h
from drivers/misc/i2c_eeprom.c

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>

show more ...


# a5a58826 11-Dec-2014 Tom Rini <trini@ti.com>

Merge git://git.denx.de/u-boot-dm


# 20142019 10-Dec-2014 Simon Glass <sjg@chromium.org>

dm: Add a simple EEPROM driver

There seem to be a few EEPROM drivers around - perhaps we should have a
single standard one? This simple driver is used for sandbox testing, but
could be pressed into

dm: Add a simple EEPROM driver

There seem to be a few EEPROM drivers around - perhaps we should have a
single standard one? This simple driver is used for sandbox testing, but
could be pressed into more active service.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Masahiro Yamada <yamada.m@jp.panasonic.com>

show more ...