linux/drivers/misc/eeprom
Parker Newman 80be263f3f misc: eeprom: eeprom_93cx6: Add quirk for extra read clock cycle
[ Upstream commit 7738a7ab9d ]

Add a quirk similar to eeprom_93xx46 to add an extra clock cycle before
reading data from the EEPROM.

The 93Cx6 family of EEPROMs output a "dummy 0 bit" between the writing
of the op-code/address from the host to the EEPROM and the reading of
the actual data from the EEPROM.

More info can be found on page 6 of the AT93C46 datasheet (linked below).
Similar notes are found in other 93xx6 datasheets.

In summary the read operation for a 93Cx6 EEPROM is:
Write to EEPROM:	110[A5-A0]	(9 bits)
Read from EEPROM:	0[D15-D0]	(17 bits)

Where:
	110 is the start bit and READ OpCode
	[A5-A0] is the address to read from
	0 is a "dummy bit" preceding the actual data
	[D15-D0] is the actual data.

Looking at the READ timing diagrams in the 93Cx6 datasheets the dummy
bit should be clocked out on the last address bit clock cycle meaning it
should be discarded naturally.

However, depending on the hardware configuration sometimes this dummy
bit is not discarded. This is the case with Exar PCI UARTs which require
an extra clock cycle between sending the address and reading the data.

Datasheet: https://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-5193-SEEPROM-AT93C46D-Datasheet.pdf
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Parker Newman <pnewman@connecttech.com>
Link: https://lore.kernel.org/r/0f23973efefccd2544705a0480b4ad4c2353e407.1727880931.git.pnewman@connecttech.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2024-12-14 19:54:49 +01:00
..
at24.c eeprom: at24: fix memory corruption race condition 2024-05-17 11:55:51 +02:00
at25.c eeprom: at25: Rework buggy read splitting 2022-06-27 16:21:05 +02:00
digsy_mtc_eeprom.c eeprom: digsy_mtc: Fix 93xx46 driver probe failure 2024-09-18 19:23:04 +02:00
ee1004.c i2c: Make remove callback return void 2022-08-16 12:46:26 +02:00
eeprom.c Char/Misc and other driver changes for 6.1-rc1 2022-10-08 08:56:37 -07:00
eeprom_93cx6.c misc: eeprom: eeprom_93cx6: Add quirk for extra read clock cycle 2024-12-14 19:54:49 +01:00
eeprom_93xx46.c spi: make remove callback a void function 2022-02-09 13:00:45 +00:00
idt_89hpesx.c eeprom: idt_89hpesx: Fix error handling in idt_init() 2023-03-10 09:33:32 +01:00
Kconfig eeprom: at24: also select REGMAP 2023-06-14 11:15:32 +02:00
Makefile eeprom: New ee1004 driver for DDR4 memory 2018-10-15 20:51:46 +02:00
max6875.c i2c: Make remove callback return void 2022-08-16 12:46:26 +02:00