-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Intgerate HW-MGMT 7.0030.3008 Changes (#391)
## Patch List * 0042-hwmon-mlxreg-fan-Add-support-for-new-flavour-of-capa.patch : * 0044-leds-mlxreg-Add-support-for-new-flavour-of-capabilit.patch : * 0045-leds-mlxreg-Remove-code-for-amber-LED-colour.patch : * 0046-Extend-driver-to-support-Infineon-Digital-Multi-phas.patch : * 0047-dt-bindings-trivial-devices-Add-infineon-xdpe1a2g7.patch : * 0048-hwmon-pmbus-Add-support-for-MPS-Multi-phase-mp2891-c.patch : * 0049-dt-bindings-trivial-devices-Add-mps-mp2891.patch : * 0050-leds-mlxreg-Skip-setting-LED-color-during-initializa.patch : * 0053-platform-mellanox-Add-support-for-dynamic-I2C-channe.patch : * 0054-platform-mellanox-Introduce-support-for-switches-equ.patch : * 0055-mellanox-Relocate-mlx-platform-driver.patch : * 0087-platform-mellanox-indicate-deferred-I2C-bus-creation.patch : * 8000-mlxsw-Use-weak-reverse-dependencies-for-firmware-fla.patch : * 8004-mlxsw-minimal-Downstream-Ignore-error-reading-SPAD-r.patch : * 8010-mlxsw-i2c-Downstream-Add-retry-mechanism-for-failed-.patch : * 8011-mlxsw-minimal-Downstream-Disable-ethtool-interface.patch :
- Loading branch information
1 parent
38bb387
commit b0dec2c
Showing
23 changed files
with
1,739 additions
and
883 deletions.
There are no files selected for viewing
65 changes: 65 additions & 0 deletions
65
patch/0042-hwmon-mlxreg-fan-Add-support-for-new-flavour-of-capa.patch
This file contains 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,65 @@ | ||
From bb46d45ce13c8faf9c2ab57b945c3a3adc587918 Mon Sep 17 00:00:00 2001 | ||
From: Vadim Pasternak <[email protected]> | ||
Date: Sun, 23 Jul 2023 06:26:09 +0000 | ||
Subject: [PATCH backport 6.1.42 42/85] hwmon: (mlxreg-fan) Add support for new | ||
flavour of capability register | ||
|
||
FAN platform data is common across the various systems, while fan | ||
driver should be able to apply only the fan instances relevant | ||
to specific system. | ||
|
||
For example, platform data might contain descriptions for fan1, | ||
fan2, ..., fan{n}, while some systems equipped with all 'n' fans, | ||
others with less. | ||
Also, on some systems fan drawer can be equipped with several | ||
tachometers and on others only with one. | ||
|
||
For detection of the real number of equipped drawers and tachometers | ||
special capability registers are used. | ||
These registers used to indicate presence of drawers and tachometers | ||
through the bitmap. | ||
|
||
For some new big modular systems this register will provide presence | ||
data by counter. | ||
|
||
Use slot parameter to distinct whether capability register contains | ||
bitmask or counter. | ||
|
||
Signed-off-by: Vadim Pasternak <[email protected]> | ||
--- | ||
drivers/hwmon/mlxreg-fan.c | 12 ++++++++++-- | ||
1 file changed, 10 insertions(+), 2 deletions(-) | ||
|
||
diff --git a/drivers/hwmon/mlxreg-fan.c b/drivers/hwmon/mlxreg-fan.c | ||
index 96017cc8da7e..dad94d2892b2 100644 | ||
--- a/drivers/hwmon/mlxreg-fan.c | ||
+++ b/drivers/hwmon/mlxreg-fan.c | ||
@@ -390,7 +390,7 @@ static int mlxreg_fan_connect_verify(struct mlxreg_fan *fan, | ||
return err; | ||
} | ||
|
||
- return !!(regval & data->bit); | ||
+ return data->slot ? (data->slot <= regval ? 1 : 0) : !!(regval & data->bit); | ||
} | ||
|
||
static int mlxreg_pwm_connect_verify(struct mlxreg_fan *fan, | ||
@@ -527,7 +527,15 @@ static int mlxreg_fan_config(struct mlxreg_fan *fan, | ||
return err; | ||
} | ||
|
||
- drwr_avail = hweight32(regval); | ||
+ /* | ||
+ * The number of drawers could be specified in registers by counters for newer | ||
+ * systems, or by bitmasks for older systems. In case the data is provided by | ||
+ * counter, it is indicated through 'version' field. | ||
+ */ | ||
+ if (pdata->version) | ||
+ drwr_avail = regval; | ||
+ else | ||
+ drwr_avail = hweight32(regval); | ||
if (!tacho_avail || !drwr_avail || tacho_avail < drwr_avail) { | ||
dev_err(fan->dev, "Configuration is invalid: drawers num %d tachos num %d\n", | ||
drwr_avail, tacho_avail); | ||
-- | ||
2.20.1 | ||
|
62 changes: 62 additions & 0 deletions
62
patch/0044-leds-mlxreg-Add-support-for-new-flavour-of-capabilit.patch
This file contains 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,62 @@ | ||
From 46c4b0cdf2a3abe321e137bcb87e5639c39fd655 Mon Sep 17 00:00:00 2001 | ||
From: Vadim Pasternak <[email protected]> | ||
Date: Thu, 20 Jul 2023 11:01:56 +0000 | ||
Subject: [PATCH backport 6.1.42 44/85] leds: mlxreg: Add support for new | ||
flavour of capability register | ||
|
||
LED platform data is common across the various systems, while LED | ||
driver should be able to apply only the LED instances relevant | ||
to specific system. | ||
|
||
For example, platform data might contain descriptions for fan1, | ||
fan2, ..., fan{n} LEDs, while some systems equipped with all 'n' fan | ||
LEDs, others with less. | ||
|
||
For detection of the real number of equipped LEDs special capability | ||
register is used. | ||
This register used to indicate presence of LED through the bitmap. | ||
|
||
For some new big modular systems this register will provide presence | ||
data by counter. | ||
|
||
Use slot parameter to distinct whether capability register contains | ||
bitmask or counter. | ||
|
||
Signed-off-by: Vadim Pasternak <[email protected]> | ||
--- | ||
drivers/leds/leds-mlxreg.c | 12 +++++++++--- | ||
1 file changed, 9 insertions(+), 3 deletions(-) | ||
|
||
diff --git a/drivers/leds/leds-mlxreg.c b/drivers/leds/leds-mlxreg.c | ||
index b7855c93bd72..063a9cb50a2b 100644 | ||
--- a/drivers/leds/leds-mlxreg.c | ||
+++ b/drivers/leds/leds-mlxreg.c | ||
@@ -206,16 +206,22 @@ static int mlxreg_led_config(struct mlxreg_led_priv_data *priv) | ||
dev_err(&priv->pdev->dev, "Failed to query capability register\n"); | ||
return err; | ||
} | ||
- if (!(regval & data->bit)) | ||
+ /* | ||
+ * If slot is specified - validate if slot is equipped on system. | ||
+ * In case slot is specified in platform data, capability register | ||
+ * comtains the counter of untits. | ||
+ */ | ||
+ if (data->slot && data->slot > regval) | ||
+ continue; | ||
+ else if (!(regval & data->bit)) | ||
continue; | ||
/* | ||
* Field "bit" can contain one capability bit in 0 byte | ||
* and offset bit in 1-3 bytes. Clear capability bit and | ||
- * keep only offset bit. | ||
+ * contains the counter of units. | ||
*/ | ||
data->bit &= MLXREG_LED_CAPABILITY_CLEAR; | ||
} | ||
- | ||
led_cdev = &led_data->led_cdev; | ||
led_data->data_parent = priv; | ||
if (strstr(data->label, "red") || | ||
-- | ||
2.20.1 | ||
|
47 changes: 47 additions & 0 deletions
47
patch/0045-leds-mlxreg-Remove-code-for-amber-LED-colour.patch
This file contains 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,47 @@ | ||
From af93d2527b5af3f2e53507c7e35bcd9c9bd521cb Mon Sep 17 00:00:00 2001 | ||
From: Vadim Pasternak <[email protected]> | ||
Date: Thu, 20 Jul 2023 11:17:31 +0000 | ||
Subject: [PATCH backport 6.1.42 45/85] leds: mlxreg: Remove code for amber LED | ||
colour | ||
|
||
Remove unused code for amber LED colour. | ||
|
||
In case system LED color is "green", "orange" or "amber" same code is | ||
to be used for colour setting. | ||
|
||
Signed-off-by: Vadim Pasternak <[email protected]> | ||
--- | ||
drivers/leds/leds-mlxreg.c | 8 ++------ | ||
1 file changed, 2 insertions(+), 6 deletions(-) | ||
|
||
diff --git a/drivers/leds/leds-mlxreg.c b/drivers/leds/leds-mlxreg.c | ||
index 063a9cb50a2b..215132f67c07 100644 | ||
--- a/drivers/leds/leds-mlxreg.c | ||
+++ b/drivers/leds/leds-mlxreg.c | ||
@@ -19,7 +19,6 @@ | ||
#define MLXREG_LED_IS_OFF 0x00 /* Off */ | ||
#define MLXREG_LED_RED_SOLID 0x05 /* Solid red */ | ||
#define MLXREG_LED_GREEN_SOLID 0x0D /* Solid green */ | ||
-#define MLXREG_LED_AMBER_SOLID 0x09 /* Solid amber */ | ||
#define MLXREG_LED_BLINK_3HZ 167 /* ~167 msec off/on - HW support */ | ||
#define MLXREG_LED_BLINK_6HZ 83 /* ~83 msec off/on - HW support */ | ||
#define MLXREG_LED_CAPABILITY_CLEAR GENMASK(31, 8) /* Clear mask */ | ||
@@ -224,13 +223,10 @@ static int mlxreg_led_config(struct mlxreg_led_priv_data *priv) | ||
} | ||
led_cdev = &led_data->led_cdev; | ||
led_data->data_parent = priv; | ||
- if (strstr(data->label, "red") || | ||
- strstr(data->label, "orange")) { | ||
+ if (strstr(data->label, "red") || strstr(data->label, "orange") || | ||
+ strstr(data->label, "amber")) { | ||
brightness = LED_OFF; | ||
led_data->base_color = MLXREG_LED_RED_SOLID; | ||
- } else if (strstr(data->label, "amber")) { | ||
- brightness = LED_OFF; | ||
- led_data->base_color = MLXREG_LED_AMBER_SOLID; | ||
} else { | ||
brightness = LED_OFF; | ||
led_data->base_color = MLXREG_LED_GREEN_SOLID; | ||
-- | ||
2.20.1 | ||
|
37 changes: 37 additions & 0 deletions
37
patch/0046-Extend-driver-to-support-Infineon-Digital-Multi-phas.patch
This file contains 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,37 @@ | ||
From 276c9eae3cf83bb65c575b423c785d0ff37b6da0 Mon Sep 17 00:00:00 2001 | ||
From: Vadim Pasternak <[email protected]> | ||
Date: Mon, 17 Jul 2023 15:40:08 +0000 | ||
Subject: [PATCH backport 6.1.42 46/85] Extend driver to support Infineon | ||
Digital Multi-phase XDPE1A2G7 device. | ||
|
||
From telemetry perspective device is almost the same as XDPE15284, but | ||
does not support READ_EIN (86h) and READ_EOUT (87h) commands. | ||
|
||
Signed-off-by: Vadim Pasternak <[email protected]> | ||
--- | ||
drivers/hwmon/pmbus/xdpe152c4.c | 2 ++ | ||
1 file changed, 2 insertions(+) | ||
|
||
diff --git a/drivers/hwmon/pmbus/xdpe152c4.c b/drivers/hwmon/pmbus/xdpe152c4.c | ||
index b8a36ef73e45..1ef1141ba537 100644 | ||
--- a/drivers/hwmon/pmbus/xdpe152c4.c | ||
+++ b/drivers/hwmon/pmbus/xdpe152c4.c | ||
@@ -44,6 +44,7 @@ static int xdpe152_probe(struct i2c_client *client) | ||
} | ||
|
||
static const struct i2c_device_id xdpe152_id[] = { | ||
+ {"xdpe1a2g7", 0}, | ||
{"xdpe152c4", 0}, | ||
{"xdpe15284", 0}, | ||
{} | ||
@@ -52,6 +53,7 @@ static const struct i2c_device_id xdpe152_id[] = { | ||
MODULE_DEVICE_TABLE(i2c, xdpe152_id); | ||
|
||
static const struct of_device_id __maybe_unused xdpe152_of_match[] = { | ||
+ {.compatible = "infineon,xdpe1a2g7"}, | ||
{.compatible = "infineon,xdpe152c4"}, | ||
{.compatible = "infineon,xdpe15284"}, | ||
{} | ||
-- | ||
2.20.1 | ||
|
29 changes: 29 additions & 0 deletions
29
patch/0047-dt-bindings-trivial-devices-Add-infineon-xdpe1a2g7.patch
This file contains 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,29 @@ | ||
From 62520e9d0ab641b36fb770477792073e6aad4d54 Mon Sep 17 00:00:00 2001 | ||
From: Vadim Pasternak <[email protected]> | ||
Date: Mon, 17 Jul 2023 16:24:58 +0000 | ||
Subject: [PATCH backport 6.1.42 47/85] dt-bindings: trivial-devices: Add | ||
infineon,xdpe1a2g7 | ||
|
||
Add new Infineon Multi-phase Digital VR Controller xdpe1a2g7 | ||
|
||
Signed-off-by: Vadim Pasternak <[email protected]> | ||
--- | ||
Documentation/devicetree/bindings/trivial-devices.yaml | 2 ++ | ||
1 file changed, 2 insertions(+) | ||
|
||
diff --git a/Documentation/devicetree/bindings/trivial-devices.yaml b/Documentation/devicetree/bindings/trivial-devices.yaml | ||
index 61746755c107..7637390dfe09 100644 | ||
--- a/Documentation/devicetree/bindings/trivial-devices.yaml | ||
+++ b/Documentation/devicetree/bindings/trivial-devices.yaml | ||
@@ -145,6 +145,8 @@ properties: | ||
- infineon,tlv493d-a1b6 | ||
# Infineon Multi-phase Digital VR Controller xdpe11280 | ||
- infineon,xdpe11280 | ||
+ # Infineon Multi-phase Digital VR Controller xdpe1a2g7 | ||
+ - infineon,xdpe1a2g7 | ||
# Infineon Multi-phase Digital VR Controller xdpe12254 | ||
- infineon,xdpe12254 | ||
# Infineon Multi-phase Digital VR Controller xdpe12284 | ||
-- | ||
2.20.1 | ||
|
Oops, something went wrong.