at24: SMBus fallback read/write for 16-bit addressed EEPROMs on PIIX4#550
at24: SMBus fallback read/write for 16-bit addressed EEPROMs on PIIX4#550nissampa wants to merge 2 commits intosonic-net:masterfrom
Conversation
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
paulmenzel
left a comment
There was a problem hiding this comment.
Please sent the commit upstream for review.
patches-sonic/driver-at24-smbus-fallback-for-addr16-on-piix4.patch
Outdated
Show resolved
Hide resolved
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
can you let me know how to do it ? |
|
@paulmenzel Can you help me in approving and merging it ? |
AMD PIIX4 SMBus adapters (found on AMD SP5/EPYC platforms including
Cisco 8000 series) support BYTE_DATA and WORD_DATA but lack I2C_FUNC_I2C
and I2C_FUNC_SMBUS_I2C_BLOCK. For AT24_FLAG_ADDR16 EEPROMs this causes
regmap_get_i2c_bus() to return -ENOTSUPP, making the EEPROM inaccessible.
Add a smbus_addr16_fallback detection and two new helpers:
- at24_smbus_read(): write_byte_data sets 16-bit pointer, repeated
read_byte() fetches bytes (EEPROM auto-increments)
- at24_smbus_write(): write_word_data encodes address+data in one WORD
Force regmap_config.reg_bits=8 when fallback is active so regmap init
succeeds; all actual I/O is handled by the SMBus helpers.
Fixes EEPROM access on Cisco 8000-series with AMD SP5 on-die PIIX4 SMBus.
Signed-off-by: Nishanth Sampath Kumar <nissampa@cisco.com>
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
@nissampa See https://docs.kernel.org/process/submitting-patches.html for sending patches to the appropriate mailing list. Please make sure that the email you send is in plain text (not HTML) and is formatted properly. |
checkpatch.pl fixes: - correct indentation of smbus retry block to 1/2/3 tab nesting - add blank line after struct regmap_config smbus_config declaration Signed-off-by: Nishanth Sampath Kumar <nissampa@cisco.com>
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Thank you for the instructions. I did as stated in that link |
|
Thank you for sending it upstream. For the record:
Let’s see, what the comments on v2 are. |
AMD PIIX4 SMBus adapters (found on AMD SP5/EPYC platforms including Cisco 8000 series) support BYTE_DATA and WORD_DATA but lack I2C_FUNC_I2C and I2C_FUNC_SMBUS_I2C_BLOCK. For AT24_FLAG_ADDR16 EEPROMs this causes regmap_get_i2c_bus() to return -ENOTSUPP, making the EEPROM inaccessible.
Add a smbus_addr16_fallback detection and two new helpers:
Force regmap_config.reg_bits=8 when fallback is active so regmap init succeeds; all actual I/O is handled by the SMBus helpers.
Fixes EEPROM access on Cisco 8000-series with AMD SP5 on-die PIIX4 SMBus.