-
Notifications
You must be signed in to change notification settings - Fork 197
[202505][Mellanox] Integrate HW-MGMT Version 7.0040.4034 #513
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
Open
dprital
wants to merge
1
commit into
sonic-net:202505
Choose a base branch
from
dprital:202505_4dda3d6_integrate_7.0040.4034_2025-10-12
base: 202505
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+108
−0
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
74 changes: 74 additions & 0 deletions
74
patch/8013-hwmon-pmbus-mp2975-Clear-interrupts-at-probe.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| From 8d8f4d52f5655747df20317ceaf628e29070475e Mon Sep 17 00:00:00 2001 | ||
| From: Ciju Rajan K <[email protected]> | ||
| Date: Tue, 9 Sep 2025 08:48:47 +0300 | ||
| Subject: hwmon: pmbus: mp2975: Clear interrupts at probe | ||
|
|
||
| In some switches after power on, ALARM is seen for | ||
| power_1 input. According to MPS, driver should clear | ||
| the faults by writing 0 to CLEAR_CAT_FAULTS (0xFD) | ||
| register and CLEAR_FAULTS (0x03) register, during | ||
| the probe. | ||
|
|
||
| NVBug: #5360318 | ||
|
|
||
| Signed-off-by: Ciju Rajan K <[email protected]> | ||
| --- | ||
| drivers/hwmon/pmbus/mp2975.c | 28 ++++++++++++++++++++++++++++ | ||
| 1 file changed, 28 insertions(+) | ||
|
|
||
| diff --git a/drivers/hwmon/pmbus/mp2975.c b/drivers/hwmon/pmbus/mp2975.c | ||
| index 51986adfb..47f092259 100644 | ||
| --- a/drivers/hwmon/pmbus/mp2975.c | ||
| +++ b/drivers/hwmon/pmbus/mp2975.c | ||
| @@ -33,6 +33,7 @@ | ||
| #define MP2975_MFR_READ_VREF_R2 0xa3 | ||
| #define MP2975_MFR_OVP_TH_SET 0xe5 | ||
| #define MP2975_MFR_UVP_SET 0xe6 | ||
| +#define MP2975_CLEAR_CAT_FAULTS 0xfd | ||
|
|
||
| #define MP2975_VOUT_FORMAT BIT(15) | ||
| #define MP2975_VID_STEP_SEL_R1 BIT(4) | ||
| @@ -659,6 +660,28 @@ mp2975_vout_per_rail_config_get(struct i2c_client *client, | ||
| return 0; | ||
| } | ||
|
|
||
| +static int | ||
| +mp2975_clear_interrupts(struct i2c_client *client, | ||
| + struct mp2975_data *data) | ||
| +{ | ||
| + int i = 0; | ||
| + int ret = 0; | ||
| + | ||
| + for (i = 0; i < data->info.pages; i++) { | ||
| + ret = i2c_smbus_write_byte_data(client, PMBUS_PAGE, i); | ||
| + if (ret < 0) | ||
| + return ret; | ||
| + ret = i2c_smbus_write_byte_data(client, PMBUS_CLEAR_FAULTS, 0); | ||
| + if (ret < 0) | ||
| + return ret; | ||
| + ret = i2c_smbus_write_byte_data(client, MP2975_CLEAR_CAT_FAULTS, 0); | ||
| + if (ret < 0) | ||
| + return ret; | ||
| + } | ||
| + | ||
| + return ret; | ||
| +} | ||
| + | ||
| static struct pmbus_driver_info mp2975_info = { | ||
| .pages = 1, | ||
| .format[PSC_VOLTAGE_IN] = linear, | ||
| @@ -736,6 +759,11 @@ static int mp2975_probe(struct i2c_client *client) | ||
| if (ret) | ||
| return ret; | ||
|
|
||
| + /* Clear interrupts. */ | ||
dprital marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| + ret = mp2975_clear_interrupts(client, data); | ||
| + if (ret) | ||
| + return ret; | ||
| + | ||
| return pmbus_do_probe(client, info); | ||
| } | ||
|
|
||
| -- | ||
| 2.47.2 | ||
|
|
||
32 changes: 32 additions & 0 deletions
32
patch/8014-platform-mellanox-mlxreg-dpu-Debug-trace-for-dpu-pro.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| From e7838edd2acc793f3b43ab04b3693a340273c330 Mon Sep 17 00:00:00 2001 | ||
| From: Ciju Rajan K <[email protected]> | ||
| Date: Fri, 19 Sep 2025 09:51:17 +0300 | ||
| Subject: platform: mellanox: mlxreg-dpu: Debug trace for dpu probing | ||
|
|
||
| Signed-off-by: Ciju Rajan K <[email protected]> | ||
| --- | ||
| drivers/platform/mellanox/mlxreg-dpu.c | 6 +++++- | ||
| 1 file changed, 5 insertions(+), 1 deletion(-) | ||
|
|
||
| diff --git a/drivers/platform/mellanox/mlxreg-dpu.c b/drivers/platform/mellanox/mlxreg-dpu.c | ||
| index c79531481..1074c4853 100644 | ||
| --- a/drivers/platform/mellanox/mlxreg-dpu.c | ||
| +++ b/drivers/platform/mellanox/mlxreg-dpu.c | ||
| @@ -537,9 +537,13 @@ static int mlxreg_dpu_probe(struct platform_device *pdev) | ||
| if (!data || !data->hpdev.brdinfo) | ||
| return -EINVAL; | ||
|
|
||
| + dev_info(&pdev->dev, "Probing for adapter %d\n", data->hpdev.nr); | ||
| data->hpdev.adapter = i2c_get_adapter(data->hpdev.nr); | ||
| - if (!data->hpdev.adapter) | ||
| + if (!data->hpdev.adapter) { | ||
| + dev_info(&pdev->dev, "Will try a deferred probing for %d\n", | ||
| + data->hpdev.nr); | ||
| return -EPROBE_DEFER; | ||
| + } | ||
|
|
||
| mlxreg_dpu = devm_kzalloc(&pdev->dev, sizeof(*mlxreg_dpu), GFP_KERNEL); | ||
| if (!mlxreg_dpu) | ||
| -- | ||
| 2.47.2 | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.