Skip to content

Commit

Permalink
hw-mgmt: kernel: patches: Update BF3 patches for kernel version 6.1
Browse files Browse the repository at this point in the history
Required to add support for kernel versions 6.1.90 and 6.1.94

Signed-off-by: Felix Radensky <[email protected]>
  • Loading branch information
felixradensky committed Jul 17, 2024
1 parent 55e55d4 commit 6f67298
Show file tree
Hide file tree
Showing 36 changed files with 946 additions and 2,701 deletions.
47 changes: 23 additions & 24 deletions recipes-kernel/linux/Patch_Status_Table.txt
Original file line number Diff line number Diff line change
Expand Up @@ -478,31 +478,30 @@ Kernel-6.1
|0055-mellanox-Relocate-mlx-platform-driver.patch | | Downstream accepted | | |
|0056-Documentation-ABI-Add-new-attribute-for-mlxreg-io-sy.patch | e7210563432a | Feature upstream | | |
|0057-Documentation-ABI-Add-new-attribute-for-mlxreg-io-sy.patch | e7210563432a | Feature pending | | |
|0061-pinctrl-Introduce-struct-pinfunction-and-PINCTRL_PIN.patch | 443a0a0f0cf | Feature upstream;skip[sonic] | | BF3 |
|0062-pinctrl-mlxbf3-Add-pinctrl-driver-support.patch | d11f932808dc | Feature upstream;skip[sonic] | | BF3 |
|0063-gpio-mlxbf3-Add-gpio-driver-support.patch | cd33f216d241 | Feature upstream;skip[sonic] | | BF3 |
|0064-pinctrl-mlxbf3-set-varaiable-mlxbf3_pmx_funcs-storag.patch | 743d3336029f | Feature upstream;skip[sonic] | | BF3 |
|0066-UBUNTU-SAUCE-sdhci-of-dwcmshc-Enable-host-V4-support.patch | 95921151e043 | Downstream;skip[sonic] | | BF3 |
|0067-UBUNTU-SAUCE-mmc-sdhci-of-dwcmshc-add-the-missing-de.patch | cfd4ea4815d1 | Downstream;skip[sonic] | | BF3 |
|0068-UBUNTU-SAUCE-mmc-sdhci-of-dwcmshc-Add-runtime-PM-ope.patch | | Downstream;skip[sonic] | | BF3 |
|0069-UBUNTU-SAUCE-mlxbf_gige-add-ethtool-mlxbf_gige_set_r.patch | | Downstream;skip[sonic] | | BF3 |
|0070-UBUNTU-SAUCE-Fix-OOB-handling-RX-packets-in-heavy-tr.patch | | Downstream;skip[sonic,cumulus] | | BF3 |
|0071-UBUNTU-SAUCE-mlxbf-gige-Fix-intermittent-no-ip-issue.patch | 7ad5e7a35c3f | Downstream;skip[sonic,cumulus] | v6.1.75 | BF3 v6.1.75 |
|0072-mlxbf_gige-add-MDIO-support-for-BlueField-3.patch | 2321d69f92aa | Downstream;skip[sonic] | | BF3 |
|0073-mlxbf_gige-support-10M-100M-1G-speeds-on-BlueField-3.patch | 20d03d4d9437 | Downstream;skip[sonic] | | BF3 |
|0074-mlxbf_gige-add-set_link_ksettings-ethtool-callback.patch | | Downstream;skip[sonic] | | BF3 |
|0075-UBUNTU-SAUCE-mlxbf-gige-Fix-kernel-panic-at-shutdown.patch | | Downstream;skip[sonic,cumulus] | | BF3 |
|0076-UBUNTU-SAUCE-platform-mellanox-Updates-to-mlxbf-boot.patch | | Downstream;skip[sonic,cumulus] | | BF3 |
|0077-UBUNTU-SAUCE-mlx-bootctl-support-icm-carveout-eeprom.patch | | Downstream;skip[sonic,cumulus] | | BF3 |
|0078-UBUNTU-SAUCE-mlxbf-bootctl-support-SMC-call-for-sett.patch | | Downstream;skip[sonic,cumulus] | | BF3 |
|0079-UBUNTU-SAUCE-mlxbf-ptm-power-and-thermal-management-.patch | | Downstream;skip[sonic,cumulus] | | BF3 |
|0080-UBUNTU-SAUCE-mlxbf-ptm-update-license.patch | | Downstream;skip[sonic,cumulus] | | BF3 |
|0081-UBUNTU-SAUCE-mlxbf-ptm-use-0444-instead-of-S_IRUGO.patch | | Downstream;skip[sonic,cumulus] | | BF3 |
|0082-UBUNTU-SAUCE-mlxbf-ptm-add-atx-debugfs-nodes.patch | | Downstream;skip[sonic,cumulus] | | BF3 |
|0083-UBUNTU-SAUCE-mlxbf-ptm-update-module-version.patch | | Downstream;skip[sonic,cumulus] | | BF3 |
|0084-UBUNTU-SAUCE-mlxbf-bootctl-Fix-kernel-panic-due-to-b.patch | | Downstream;skip[sonic,cumulus] | | BF3 |
|0061-pinctrl-Introduce-struct-pinfunction-and-PINCTRL_PIN.patch | 443a0a0f0cf4 | Feature upstream;skip[sonic,cumulus] | v6.1.92 | BF3 |
|0062-pinctrl-mlxbf3-Add-pinctrl-driver-support.patch | d11f932808dc | Feature upstream;skip[sonic,cumulus] | | BF3 |
|0063-pinctrl-mlxbf3-set-varaiable-mlxbf3_pmx_funcs-storag.patch | 743d3336029f | Feature upstream;skip[sonic,cumulus] | | BF3 |
|0064-pinctrl-mlxbf3-Remove-gpio_disable_free.patch | 69657e60b8a7 | Feature upstream;skip[sonic,cumulus] | | BF3 |
|0065-gpio-mlxbf3-Add-gpio-driver-support.patch | cd33f216d241 | Feature upstream;skip[sonic,cumulus] | | BF3 |
|0066-gpio-mlxbf3-Support-add_pin_ranges.patch | 38a700efc510 | Feature upstream;skip[sonic,cumulus] | | BF3 |
|0067-gpio-mlxbf3-Fix-error-message.patch | | Downstream;skip[sonic,cumulus] | | BF3 |
|0068-mmc-sdhci-of-dwcmshc-enable-host-V4-support-for-Blue.patch | 95921151e043 | Feature upstream;skip[sonic,cumulus] | | BF3 |
|0069-mmc-sdhci-of-dwcmshc-add-the-missing-device-table-ID.patch | cfd4ea4815d1 | Feature upstream;skip[sonic,cumulus] | | BF3 |
|0070-mlxbf_gige-fix-receive-packet-race-condition.patch | ac5cbe931c43 | Feature upstream;skip[sonic,cumulus] | v6.1.75 | BF3 |
|0071-mlxbf_gige-Fix-intermittent-no-ip-issue.patch | 7ad5e7a35c3f | Feature upstream;skip[sonic,cumulus] | v6.1.75 | BF3 |
|0072-mlxbf_gige-Enable-the-GigE-port-in-mlxbf_gige_open.patch | 1b481cb53601 | Feature upstream;skip[sonic,cumulus] | v6.1.75 | BF3 |
|0073-mlxbf_gige-stop-PHY-during-open-error-paths.patch | 57beec623ac5 | Feature upstream;skip[sonic,cumulus] | v6.1.85 | BF3 |
|0074-mlxbf_gige-call-request_irq-after-NAPI-initialized.patch | 24444af5ddf7 | Feature upstream;skip[sonic,cumulus] | v6.1.85 | BF3 |
|0075-mlxbf_gige-stop-interface-during-shutdown.patch | 80247e0eca14 | Feature upstream;skip[sonic,cumulus] | v6.1.85 | BF3 |
|0076-mlxbf_gige-add-MDIO-support-for-BlueField-3.patch | 2321d69f92aa | Feature upstream;skip[sonic,cumulus] | | BF3 |
|0077-mlxbf_gige-support-10M-100M-1G-speeds-on-BlueField-3.patch | 20d03d4d9437 | Feature upstream;skip[sonic,cumulus] | | BF3 |
|0078-mlxbf_gige-add-set_link_ksettings-ethtool-callback.patch | cedd97737a1f | Feature upstream;skip[sonic,cumulus] | | BF3 |
|0079-UBUNTU-SAUCE-mlxbf_gige-add-RX_DMA-disable-to-NAPI-p.patch | | Downstream;skip[sonic,cumulus] | | BF3 |
|0080-mlxbf-bootctl-correctly-identify-secure-boot-with-de.patch | 646f1e9c1978 | Feature upstream;skip[sonic,cumulus] | v6.1.68 | BF3 |
|0081-UBUNTU-SAUCE-mlxbf-ptm-power-and-thermal-management-.patch | | Downstream;skip[sonic,cumulus] | | BF3 |
|0082-UBUNTU-SAUCE-mlxbf-ptm-update-license.patch | | Downstream;skip[sonic,cumulus] | | BF3 |
|0083-UBUNTU-SAUCE-mlxbf-ptm-use-0444-instead-of-S_IRUGO.patch | | Downstream;skip[sonic,cumulus] | | BF3 |
|0085-hwmon-mlxreg-fan-Separate-methods-of-fan-setting-com.patch | | Bugfix pending | | |
|0086-gpio-mlxbf3-Fix-error-message.patch | | Downstream;skip[sonic] | | BF3 |
|0087-platform-mellanox-indicate-deferred-I2C-bus-creation.patch | | Bugfix pending | | SN2201 |
|0087-platform_data-mlxreg-Add-capability-bit-and-mask-fie.patch | | Downstream accepted | | |
|0088-platform-mellanox-mlxreg-hotplug-Add-support-for-new.patch | | Downstream accepted | | |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
From aa410417368e3141e96e5331c1353b0e9dcf60fa Mon Sep 17 00:00:00 2001
From 443a0a0f0cf4f432c7af6654b7f2f920d411d379 Mon Sep 17 00:00:00 2001
From: Andy Shevchenko <[email protected]>
Date: Mon, 19 Dec 2022 14:42:33 +0200
Subject: [PATCH backport 6.1.42 61/85] pinctrl: Introduce struct pinfunction
and PINCTRL_PINFUNCTION() macro

BugLink: https://bugs.launchpad.net/bugs/2012743
Subject: [PATCH] pinctrl: Introduce struct pinfunction and
PINCTRL_PINFUNCTION() macro

There are many pin control drivers define their own data type for
pin function representation which is the same or embed the same data
Expand All @@ -14,17 +12,12 @@ for all pin control drivers.
Signed-off-by: Andy Shevchenko <[email protected]>
Reviewed-by: Linus Walleij <[email protected]>
Acked-by: Mika Westerberg <[email protected]>
(cherry picked from commit 443a0a0f0cf4f432c7af6654b7f2f920d411d379)
Signed-off-by: Asmaa Mnebhi <[email protected]>
Acked-by: Tim Gardner <[email protected]>
Acked-by: Bartlomiej Zolnierkiewicz <[email protected]>
Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]>
---
include/linux/pinctrl/pinctrl.h | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)

diff --git a/include/linux/pinctrl/pinctrl.h b/include/linux/pinctrl/pinctrl.h
index 487117ccb1bc..fb25085d0922 100644
index a0d39b303431..4d252ea00ed1 100644
--- a/include/linux/pinctrl/pinctrl.h
+++ b/include/linux/pinctrl/pinctrl.h
@@ -206,6 +206,26 @@ extern int pinctrl_get_group_pins(struct pinctrl_dev *pctldev,
Expand Down Expand Up @@ -55,5 +48,5 @@ index 487117ccb1bc..fb25085d0922 100644
extern struct pinctrl_dev *of_pinctrl_get(struct device_node *np);
#else
--
2.20.1
2.44.0

Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
From 1f79825ac209a5aac6e13c87903a6506a5b78565 Mon Sep 17 00:00:00 2001
From d11f932808dc689717e409bbc81b5093e7902fc9 Mon Sep 17 00:00:00 2001
From: Asmaa Mnebhi <[email protected]>
Date: Wed, 15 Mar 2023 17:50:27 -0400
Subject: [PATCH backport 6.1.42 62/85] pinctrl: mlxbf3: Add pinctrl driver
support

BugLink: https://bugs.launchpad.net/bugs/2012743
Subject: [PATCH] pinctrl: mlxbf3: Add pinctrl driver support

NVIDIA BlueField-3 SoC has a few pins that can be used as GPIOs
or take the default hardware functionality. Add a driver for
Expand All @@ -14,11 +11,6 @@ Signed-off-by: Asmaa Mnebhi <[email protected]>
Reviewed-by: Andy Shevchenko <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Linus Walleij <[email protected]>
(cherry picked from commit d11f932808dc689717e409bbc81b5093e7902fc9 linux-next)
Signed-off-by: Asmaa Mnebhi <[email protected]>
Acked-by: Tim Gardner <[email protected]>
Acked-by: Bartlomiej Zolnierkiewicz <[email protected]>
Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]>
---
drivers/pinctrl/Kconfig | 13 ++
drivers/pinctrl/Makefile | 1 +
Expand All @@ -27,10 +19,10 @@ Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]
create mode 100644 drivers/pinctrl/pinctrl-mlxbf3.c

diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig
index f71fefff400f..92e97d5bf91f 100644
index e2a24d668e41..fc6e2858c90c 100644
--- a/drivers/pinctrl/Kconfig
+++ b/drivers/pinctrl/Kconfig
@@ -512,6 +512,19 @@ config PINCTRL_ZYNQMP
@@ -523,6 +523,19 @@ config PINCTRL_ZYNQMP
This driver can also be built as a module. If so, the module
will be called pinctrl-zynqmp.

Expand All @@ -51,17 +43,17 @@ index f71fefff400f..92e97d5bf91f 100644
source "drivers/pinctrl/aspeed/Kconfig"
source "drivers/pinctrl/bcm/Kconfig"
diff --git a/drivers/pinctrl/Makefile b/drivers/pinctrl/Makefile
index 89bfa01b5231..89fda1b780b7 100644
index 413b1e6b6933..930307e248c5 100644
--- a/drivers/pinctrl/Makefile
+++ b/drivers/pinctrl/Makefile
@@ -36,6 +36,7 @@ obj-$(CONFIG_PINCTRL_MCP23S08_SPI) += pinctrl-mcp23s08_spi.o
@@ -36,6 +36,7 @@ obj-$(CONFIG_PINCTRL_MCP23S08_I2C) += pinctrl-mcp23s08_i2c.o
obj-$(CONFIG_PINCTRL_MCP23S08_SPI) += pinctrl-mcp23s08_spi.o
obj-$(CONFIG_PINCTRL_MCP23S08) += pinctrl-mcp23s08.o
obj-$(CONFIG_PINCTRL_MICROCHIP_SGPIO) += pinctrl-microchip-sgpio.o
obj-$(CONFIG_PINCTRL_OCELOT) += pinctrl-ocelot.o
+obj-$(CONFIG_PINCTRL_MLXBF3) += pinctrl-mlxbf3.o
obj-$(CONFIG_PINCTRL_OCELOT) += pinctrl-ocelot.o
obj-$(CONFIG_PINCTRL_OXNAS) += pinctrl-oxnas.o
obj-$(CONFIG_PINCTRL_PALMAS) += pinctrl-palmas.o
obj-$(CONFIG_PINCTRL_PIC32) += pinctrl-pic32.o
diff --git a/drivers/pinctrl/pinctrl-mlxbf3.c b/drivers/pinctrl/pinctrl-mlxbf3.c
new file mode 100644
index 000000000000..3698f7bbd88d
Expand Down Expand Up @@ -389,5 +381,5 @@ index 000000000000..3698f7bbd88d
+MODULE_AUTHOR("Asmaa Mnebhi <[email protected]>");
+MODULE_LICENSE("Dual BSD/GPL");
--
2.20.1
2.44.0

Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
From 00cba650c86f494b4a5905d89d304fef2380b0b7 Mon Sep 17 00:00:00 2001
From 743d3336029ffe2bb38e982a3b572ced243c6d43 Mon Sep 17 00:00:00 2001
From: Tom Rix <[email protected]>
Date: Mon, 3 Apr 2023 20:45:01 -0400
Subject: [PATCH backport 6.1.42 2/2] pinctrl: mlxbf3: set varaiable
mlxbf3_pmx_funcs storage-class-specifier to static
Subject: [PATCH] pinctrl: mlxbf3: set varaiable mlxbf3_pmx_funcs
storage-class-specifier to static

smatch reports
drivers/pinctrl/pinctrl-mlxbf3.c:162:20: warning: symbol
Expand Down Expand Up @@ -31,5 +31,5 @@ index 3698f7bbd88d..d9944e6a0af9 100644
PINCTRL_PINFUNCTION("gpiofunc", mlxbf3_gpiofunc_group_names, 1),
};
--
2.25.1
2.44.0

Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
From 69657e60b8a7faf83b583c658ec7ce1f5ece9eb3 Mon Sep 17 00:00:00 2001
From: Asmaa Mnebhi <[email protected]>
Date: Fri, 18 Aug 2023 12:43:13 -0400
Subject: [PATCH] pinctrl: mlxbf3: Remove gpio_disable_free()

Remove support for gpio_disable_free() because it is called when the libgpiod
command "gpioset" is invoked. This gives the GPIO control back to hardware which
cancels out the effort to set the GPIO value.

Reminder of the code flow to change a GPIO value from software:
1) All GPIOs are controlled by hardware by default
2) To change the GPIO value, enable software control via a mux.
3) Once software has control over the GPIO pin, the gpio-mlxbf3 driver
will be able to change the direction and value of the GPIO.

When the user runs "gpioset gpiochip0 0=0" for example, the gpio
pin value should change from 1 to 0. In this case, mlxbf3_gpio_request_enable()
is called via gpiochip_generic_request(). The latter switches GPIO control from
hardware to software. Then the GPIO value is changed from 1 to 0. However,
gpio_disable_free() is also called which changes control back to hardware
which changes the GPIO value back to 1.

Fixes: d11f932808dc ("pinctrl: mlxbf3: Add pinctrl driver support")
Signed-off-by: Asmaa Mnebhi <[email protected]>
Reviewed-by: Linus Walleij <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Linus Walleij <[email protected]>
---
drivers/pinctrl/pinctrl-mlxbf3.c | 14 --------------
1 file changed, 14 deletions(-)

diff --git a/drivers/pinctrl/pinctrl-mlxbf3.c b/drivers/pinctrl/pinctrl-mlxbf3.c
index 903606b64d2f..7d1713824a89 100644
--- a/drivers/pinctrl/pinctrl-mlxbf3.c
+++ b/drivers/pinctrl/pinctrl-mlxbf3.c
@@ -223,26 +223,12 @@ static int mlxbf3_gpio_request_enable(struct pinctrl_dev *pctldev,
return 0;
}

-static void mlxbf3_gpio_disable_free(struct pinctrl_dev *pctldev,
- struct pinctrl_gpio_range *range,
- unsigned int offset)
-{
- struct mlxbf3_pinctrl *priv = pinctrl_dev_get_drvdata(pctldev);
-
- /* disable GPIO functionality by giving control back to hardware */
- if (offset < MLXBF3_NGPIOS_GPIO0)
- writel(BIT(offset), priv->fw_ctrl_clr0);
- else
- writel(BIT(offset % MLXBF3_NGPIOS_GPIO0), priv->fw_ctrl_clr1);
-}
-
static const struct pinmux_ops mlxbf3_pmx_ops = {
.get_functions_count = mlxbf3_pmx_get_funcs_count,
.get_function_name = mlxbf3_pmx_get_func_name,
.get_function_groups = mlxbf3_pmx_get_groups,
.set_mux = mlxbf3_pmx_set,
.gpio_request_enable = mlxbf3_gpio_request_enable,
- .gpio_disable_free = mlxbf3_gpio_disable_free,
};

static struct pinctrl_desc mlxbf3_pin_desc = {
--
2.44.0

Loading

0 comments on commit 6f67298

Please sign in to comment.