Skip to content

Add pinctrl driver for imx8-based platforms#426

Draft
dreamliner787-9 wants to merge 7 commits into
mainfrom
imx_pinctrl
Draft

Add pinctrl driver for imx8-based platforms#426
dreamliner787-9 wants to merge 7 commits into
mainfrom
imx_pinctrl

Conversation

@dreamliner787-9

@dreamliner787-9 dreamliner787-9 commented May 13, 2025

Copy link
Copy Markdown
Contributor

This PR adds implmentation and documentations of the pinctrl subsystem and driver for imx8-based platforms.

Limitations:

Checklist before we can merge this:

@dreamliner787-9 dreamliner787-9 marked this pull request as ready for review May 14, 2025 04:11
Comment thread examples/pinctrl/meta.py
from sdfgen import SystemDescription, Sddf, DeviceTree
from importlib.metadata import version

# @billn fix

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dreamliner787-9 dreamliner787-9 added the hardware-test Run the hardware tests on this PR. label May 27, 2025
@Courtney3141 Courtney3141 self-requested a review September 9, 2025 02:08
Comment thread drivers/pinctrl/README.md Outdated
Comment thread drivers/pinctrl/README.md Outdated
Comment thread drivers/pinctrl/README.md Outdated
Comment thread drivers/pinctrl/README.md Outdated
Comment thread drivers/pinctrl/README.md Outdated
Comment thread drivers/pinctrl/README.md Outdated
Comment thread drivers/pinctrl/README.md Outdated
…f pinctrl

Signed-off-by: Bill Nguyen <bill.nguyen@student.unsw.edu.au>
Comment thread drivers/pinctrl/README.md Outdated
Comment thread drivers/pinctrl/README.md Outdated
Comment thread drivers/pinctrl/README.md Outdated
Comment thread ci/examples/pinctrl.py Outdated
Comment thread drivers/pinctrl/imx/README.md Outdated
Comment thread drivers/pinctrl/imx/create_pinctrl_config.py
Signed-off-by: Bill Nguyen <bill.nguyen@student.unsw.edu.au>
Comment thread drivers/pinctrl/imx/create_pinctrl_config.py
Comment thread include/sddf/pinctrl/config.h Outdated
Comment thread include/sddf/pinctrl/config.h Outdated
Comment thread examples/pinctrl/serial_client.c
Comment thread examples/pinctrl/meta.py
Comment thread examples/pinctrl/README.md Outdated
Comment thread examples/pinctrl/README.md Outdated
Comment thread drivers/pinctrl/imx/pinctrl.c Outdated
Comment thread drivers/pinctrl/imx/pinctrl.c Outdated
Comment thread drivers/pinctrl/imx/pinctrl.c Outdated
Comment thread drivers/pinctrl/imx/pinctrl.c Outdated

@Courtney3141 Courtney3141 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a good first implementation. Needs to be rebased and ensure all docs files have line length < 100 chars.

@dreamliner787-9 dreamliner787-9 force-pushed the imx_pinctrl branch 2 times, most recently from f25b16b to ebc332d Compare September 9, 2025 05:33
Signed-off-by: Bill Nguyen <bill.nguyen@student.unsw.edu.au>

@Courtney3141 Courtney3141 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only remaining change not mentioned (that I think we should do something about) is the Python devicetree module.

Comment thread docs/pinctrl/imx/imx.md Outdated
Comment thread examples/pinctrl/README.md Outdated
Signed-off-by: Bill Nguyen <bill.nguyen@student.unsw.edu.au>
Signed-off-by: Bill Nguyen <bill.nguyen@student.unsw.edu.au>
Signed-off-by: Bill Nguyen <bill.nguyen@student.unsw.edu.au>
Signed-off-by: Bill Nguyen <bill.nguyen@student.unsw.edu.au>
* Copyright 2025, UNSW
* SPDX-License-Identifier: BSD-2-Clause
*/

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see this is approved already, but is this example meant to have been replaced with something new? This doesn't appear to do anything with pinctrl just yet.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just copied the serial example to demonstrate how you can compile the pinctrl driver as we don't have any drivers for the IMX platform that requires pinctrl configuration yet (afaik).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's fair enough, although it would definitely be good to somehow have an example that specifically shows that the pinctrl driver works so we can use it for CI. Is it possible to write an example that does something like assign a constant value to an output pin? E.g. connect a voltage line -> GPIO pin. (contrived, ik).

It would be strongly preferable if something like that can happen so that we can always narrow the failing example back to pinctrl instead of also needing to wonder if the associated driver class is the issue.

@dreamliner787-9 dreamliner787-9 Nov 11, 2025

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did thought of that when I cloned the serial example. But since this driver doesn't support dynamic pinctrl configuration (yet). We would have to bundle an edited device tree with the example then explain where things differ. Which I thought was more complicated than necessary when serial is the most basic of devices that should work. Plus if the pinctrl driver is broken, it would break the "pinctrl" example rather than the "serial" example so we can always narrow down any failures.

We can revisit implementing your idea once the driver supports dynamic pinctrl reconfiguration?

@omeh-a omeh-a mentioned this pull request Mar 13, 2026
10 tasks
@omeh-a

omeh-a commented Jun 4, 2026

Copy link
Copy Markdown
Member

@dreamliner787-9 So it seems like this PR died due to the revlock on sdfgen (argh!) ... This is a fairly important driver for work such as the LionsOS robot however, so we should consider freshening this up soonish. Once we have merged in the new sdfgen version for the current sDDF examples I will ping you and we can look at picking this up maybe?

@midnightveil midnightveil removed the hardware-test Run the hardware tests on this PR. label Jun 4, 2026
@dreamliner787-9

Copy link
Copy Markdown
Contributor Author

@dreamliner787-9 So it seems like this PR died due to the revlock on sdfgen (argh!) ... This is a fairly important driver for work such as the LionsOS robot however, so we should consider freshening this up soonish. Once we have merged in the new sdfgen version for the current sDDF examples I will ping you and we can look at picking this up maybe?

Sounds good.

@Courtney3141 Courtney3141 marked this pull request as draft June 5, 2026 03:32
@Courtney3141

Copy link
Copy Markdown
Contributor

Converted to a draft for now - to return to after the new sdfgen is more developed.

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