u-boot-brain/drivers/misc
Eugen Hristev b24dc83f15 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.

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
2020-05-28 06:51:06 +02:00
..
imx8 common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
ali512x.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
altera_sysid.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
atsha204a-i2c.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
cbmem_console.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
cros_ec_i2c.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
cros_ec_lpc.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
cros_ec_sandbox.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
cros_ec_spi.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
cros_ec.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
ds4510.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
ds4510.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
esm_pmic.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
fs_loader.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
fsl_devdis.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
fsl_ifc.c common: Drop part.h from common header 2020-05-18 17:33:33 -04:00
fsl_iim.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
fsl_portals.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
fsl_sec_mon.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
gdsys_ioep.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
gdsys_ioep.h common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
gdsys_rxaui_ctrl.c gdsys_rxaui_ctrl: Use new regmap interface 2019-05-21 07:52:34 +02:00
gdsys_soc.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
gdsys_soc.h misc: Add gdsys_soc driver 2018-11-14 09:16:27 -08:00
gpio_led.c status_led: Kconfig migration 2017-01-21 15:12:33 -05:00
i2c_eeprom_emul.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
i2c_eeprom.c misc: i2c_eeprom: implement different probe test eeprom offset 2020-05-28 06:51:06 +02:00
ihs_fpga.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
ihs_fpga.h misc: Add IHS FPGA driver 2018-11-14 09:16:27 -08:00
irq_sandbox.c dm: irq: Add support for requesting interrupts 2020-02-07 22:46:32 +08:00
irq-uclass.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
jz4780_efuse.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
k3_avs.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
k3_esm.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
Kconfig rename symbol: CONFIG_STM32 -> CONFIG_ARCH_STM32 2020-05-15 14:47:35 -04:00
Makefile misc: pmic_esm: Add support for PMIC ESM driver 2020-03-03 13:08:14 +05:30
mc9sdz60.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
microchip_flexcom.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
misc_sandbox.c misc: Update read() and write() methods to return bytes xfered 2018-11-20 19:14:22 -07:00
misc-uclass.c misc: Allow child devices 2019-02-09 12:50:22 -07:00
mpc83xx_serdes.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
mpc83xx_serdes.h common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
mxc_ocotp.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
mxs_ocotp.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
nuvoton_nct6102d.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
p2sb_emul.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
p2sb_sandbox.c sandbox: Add PCI driver and test for p2sb 2019-12-15 11:44:11 +08:00
p2sb-uclass.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
pca9551_led.c common: Drop global inclusion of status_led.h 2019-12-02 18:23:06 -05:00
pwrseq-uclass.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
qfw.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
rockchip-efuse.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
rockchip-otp.c misc: add driver for the Rockchip otp controller 2019-11-17 17:23:15 +08:00
sandbox_adder.c sandbox: Add PCI driver and test for p2sb 2019-12-15 11:44:11 +08:00
smsc_lpc47m.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
smsc_sio1007.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
spltest_sandbox.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
status_led.c status_led: Tidy up the code style 2019-12-02 18:23:06 -05:00
stm32_rcc.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
stm32mp_fuse.c pmu: stpmic1: change specific NVM api to MISC 2019-08-27 11:19:23 +02:00
swap_case.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
syscon_sandbox.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
tegra_car.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
tegra186_bpmp.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
twl4030_led.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
vexpress_config.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
winbond_w83627.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00