Support Nvidia BlueField-3 GPIO driver and pin controller

Bug #2012743 reported by Asmaa Mnebhi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux-bluefield (Ubuntu)
Invalid
Undecided
Unassigned
Jammy
Fix Committed
Medium
Asmaa Mnebhi

Bug Description

SRU Justification:

[Impact]

Support the BlueField-3 SoC GPIO driver for handling interrupts and providing the option to change the direction and value of a GPIO.
Support the BlueField-3 SoC pin controller driver for allowing a select number of GPIO pins to be manipulated from userspace or the kernel.

All these changes have been accepted for upstream but most of them are not yet in the tree/branches.

PLEASE NOTE: This change is dependent on changes done in the ACPI tables. So the UEFI image needs to be updated accordingly.

[Fix]

* Add support for the BlueField-3 SoC GPIO driver.
This driver configures and handles GPIO interrupts. It also enables a user to manipulate certain GPIO pins via libgpiod tools or other kernel drivers.
The usable pins are defined via the "gpio-reserved-ranges" property.

* NVIDIA BlueField-3 SoC has a few pins that can be used as GPIOs or take the default hardware functionality. Add a driver for the pin muxing.

* The following gpiolib commits are bug fixes and are required for the gpio driver to work:
443a0a0f0cf4f432c7af6654b7f2f920d411d379

Although the following have been accepted by maintainers, they are not present in any tree/branch yet so
these will be pushed as SAUCE for now:
[PATCH v4] gpio: mmio: handle "ngpios" properly in bgpio_init()
[PATCH v1] gpio: mmio: fix calculation of bgpio_bits

[Test Case]

* Check if the gpio-mlxbf3 driver is loaded
* Check if the pinctrl-mlxbf3 driver is loaded
* check if the mlxbf-gige driver is loaded
* check if the pwr-mlxbf driver is loaded
* Check that the oob_net0 interface is up and operational
* Do reset and powercycle and check the oob_net0 interface again
* Test power GPIO interrupt on BF3.

[Regression Potential]

* The Mellanox drivers could fail to be loaded.
* The mlxbf-gige PHY interrupt or pwr-mlxbf interrupt could fail.

Revision history for this message
Asmaa Mnebhi (asmaam) wrote :

Since these patches have been acked for upstreaming but are not yet added to any upstreaming branch, we will wait for another week before sending canonical the patches.
Patches needed:

- pinctrl: Introduce struct pinfunction and PINCTRL_PINFUNCTION() macro
- [PATCH v4] gpio: mmio: handle "ngpios" properly in bgpio_init()
- [PATCH v1] gpio: mmio: fix calculation of bgpio_bits
- [PATCH v6 1/2] gpio: mlxbf3: Add gpio driver support
- [PATCH v6 2/2] pinctrl: mlxbf3: Add pinctrl driver support

on top of the above, we need to revert the changes related to the gpio-mlxbf3.c driver, add the Kconfigs for both the GPIO and PIN ctrl drivers and add the pinctrl driver to the deb.

description: updated
Stefan Bader (smb)
Changed in linux-bluefield (Ubuntu Jammy):
assignee: nobody → Asmaa Mnebhi (asmaam)
importance: Undecided → Medium
status: New → In Progress
Changed in linux-bluefield (Ubuntu):
status: New → Invalid
Changed in linux-bluefield (Ubuntu Jammy):
status: In Progress → Fix Committed
Revision history for this message
Bartlomiej Zolnierkiewicz (bzolnier) wrote :

This bug is awaiting verification that the linux-bluefield/5.15.0-1015.17 kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-jammy' to 'verification-done-jammy'. If the problem still exists, change the tag 'verification-needed-jammy' to 'verification-failed-jammy'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-jammy
Meriton Tuli (meritont)
tags: added: verification-done-jammy
removed: verification-needed-jammy
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.