regmap-i2c: add SMBus byte/word reg16 bus for adapters lacking I2C_FUNC_I2C#550
regmap-i2c: add SMBus byte/word reg16 bus for adapters lacking I2C_FUNC_I2C#550nissampa wants to merge 3 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.
|
/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. |
v2 has been accepted to 7.1 Kindly let me know what to do with this PR here. |
Remove the at24-specific SMBus fallback patch and replace it with a regmap-i2c core patch that adds a new regmap_smbus_byte_word_reg16 bus type for adapters with SMBUS_BYTE_DATA and SMBUS_WORD_DATA but lacking I2C_FUNC_I2C and I2C_FUNC_SMBUS_I2C_BLOCK (e.g. AMD PIIX4). This moves the fix to the regmap abstraction layer per upstream review feedback from Bartosz Golaszewski and Mark Brown, so all drivers (not just at24) benefit from the fallback. Signed-off-by: Nishanth Sampath Kumar <nissampa@cisco.com>
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
I can’t find the commit in https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap.git/. The URL from the notification message is incorrect. |
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.