Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add i2c imc bus driver for support Broadwell memory sensors #387

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

jostar-yang
Copy link
Contributor

Add i2c imc bus driver for support Broadwell memory sensors

@jostar-yang jostar-yang requested a review from a team as a code owner March 21, 2024 10:23
@jostar-yang
Copy link
Contributor Author

/azpw run

@mssonicbld
Copy link

/AzurePipelines run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@saiarcot895
Copy link
Contributor

Can you add more details about what platforms need this?

This looks like it is from https://lore.kernel.org/all/[email protected]/. If so, could you add that into the description or the PR file?

@jostar-yang
Copy link
Contributor Author

The driver ,i2c-imc.c, support ddr sensors for Broadwell CPU machine. It is i2c bus driver. When probe i2c-imc.c, jc42 will be probed ,too. Then, we will see 0x18 and 0x1a i2c device address are created. Below Accton platform CPU is Broadwell ,
AS9716
AS9726
AS7726
AS7326
Test log as beow,
root@sonic:/sys/bus/i2c/drivers/jc42/57-0018/hwmon/hwmon46# cat temp1_input
27000
root@sonic:/sys/bus/i2c/drivers/jc42# cd 57-001a/hwmon/hwmon47/
root@sonic:/sys/bus/i2c/drivers/jc42/57-001a/hwmon/hwmon47# cat temp1_input
26125

  1. The code is copied from ONL. But compile fail on kernel 6.x. So I change from "i2c_new_device()" to"i2c_new_client_device".
  2. Add I2C_FUNC_SMBUS_WORD_DATA to pass regmap check i2c_func. Otherwise, jc42 will probe fail.

@lguohan
Copy link
Contributor

lguohan commented Jun 14, 2024

if this is the original upgrade patch, @jostar-yang , can you use the original patch?

@lguohan
Copy link
Contributor

lguohan commented Jun 14, 2024

please follow guideline here.

Existing kernel modules need to be patched and those patches are available in upstream.
Please include the original upstream commit id and message in the patch. This allows the maintainer to remove upstream patches during the kernel upgrade.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants