Skip to content
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

drivers: pinctrl: add pinctrl support for arm mps2 and mps3 boards #86155

Merged
merged 8 commits into from
Apr 7, 2025

Conversation

spchee
Copy link
Contributor

@spchee spchee commented Feb 21, 2025

The existing pinmux drivers is soon to be deprecated. Hence this pr implements new pinctrl support for Arm's mps2, mps3 and v2m_beetle board targets. Hence this pr does the following:

  • Updates necessary existing device drivers to support pinctrl
  • Migrate mps2 from the existing pinmux model to the better supported pinctrl pin model
  • Migrate v2m_beetle from the existing pinmux model to the better supported pinctrl pin model
  • Add pinctrl support to all mps3 board targets

wearyzen
wearyzen previously approved these changes Feb 21, 2025
@spchee
Copy link
Contributor Author

spchee commented Feb 28, 2025

Have pushed a new patch which should deal with all the comments and have also added another board (beetle) since we very recently managed to get it supported with pinctrl as well.

wearyzen
wearyzen previously approved these changes Mar 6, 2025
@wearyzen
Copy link
Collaborator

wearyzen commented Mar 7, 2025

@gmarull could you please have another look at the PR?

@57300 57300 removed their request for review April 1, 2025 19:01
@wearyzen
Copy link
Collaborator

wearyzen commented Apr 2, 2025

Hi @gmarull could you please have another look at the PR?

@wearyzen
Copy link
Collaborator

wearyzen commented Apr 3, 2025

Hi @gmarull, if the last 2 are the only review comments left then I would like to do them as a follow up PR. I will be migrating the rest of arm reference boards based on this PR soon and can address these as part of that.
Would that be ok to approve the PR with this or do you think this need further review?

@gmarull
Copy link
Member

gmarull commented Apr 3, 2025

Hi @gmarull, if the last 2 are the only review comments left then I would like to do them as a follow up PR. I will be migrating the rest of arm reference boards based on this PR soon and can address these as part of that. Would that be ok to approve the PR with this or do you think this need further review?

The select at soc level is just wrong, soc code does not use pinctrl APIs.

@wearyzen
Copy link
Collaborator

wearyzen commented Apr 3, 2025

Hi @gmarull, if the last 2 are the only review comments left then I would like to do them as a follow up PR. I will be migrating the rest of arm reference boards based on this PR soon and can address these as part of that. Would that be ok to approve the PR with this or do you think this need further review?

The select at soc level is just wrong, soc code does not use pinctrl APIs.

ok in that case I'll address both today, but do you see any other issue with the PR?

@gmarull
Copy link
Member

gmarull commented Apr 3, 2025

Hi @gmarull, if the last 2 are the only review comments left then I would like to do them as a follow up PR. I will be migrating the rest of arm reference boards based on this PR soon and can address these as part of that. Would that be ok to approve the PR with this or do you think this need further review?

The select at soc level is just wrong, soc code does not use pinctrl APIs.

ok in that case I'll address both today, but do you see any other issue with the PR?

nope

@wearyzen wearyzen force-pushed the pinctrl branch 2 times, most recently from 60bf6fc to 153ec10 Compare April 3, 2025 10:40
@wearyzen wearyzen requested a review from gmarull April 3, 2025 12:57
@gmarull
Copy link
Member

gmarull commented Apr 3, 2025

please, no reverts within PR commits. It's a transient work that does not need to reach main.

@wearyzen wearyzen force-pushed the pinctrl branch 2 times, most recently from 6e428a3 to 9a6cd70 Compare April 3, 2025 15:18
@wearyzen
Copy link
Collaborator

wearyzen commented Apr 4, 2025

please, no reverts within PR commits. It's a transient work that does not need to reach main.

@gmarull, the commits are fixed and ci has passed. Could you please have another look?

spchee added 8 commits April 4, 2025 14:31
Adds necessary pinctrl support to Arm SBCon I2C driver.

Signed-off-by: Samuel Chee <samche01@arm.com>
Signed-off-by: Sudan Landge <sudan.landge@arm.com>
Adds necessary pinctrl support for Arm cmsdk uart driver

Signed-off-by: Samuel Chee <samche01@arm.com>
Signed-off-by: Sudan Landge <sudan.landge@arm.com>
Adds pinctrl driver for all Arm mps2 targets.

Signed-off-by: Samuel Chee <samche01@arm.com>
Signed-off-by: Sudan Landge <sudan.landge@arm.com>
Migrates mps2 targets away from the pinmux driver to
the new pinctrl driver.

Signed-off-by: Samuel Chee <samche01@arm.com>
Signed-off-by: Sudan Landge <sudan.landge@arm.com>
Adds pinctrl driver for all Arm mps3 targets

Signed-off-by: Samuel Chee <samche01@arm.com>
Signed-off-by: Sudan Landge <sudan.landge@arm.com>
Adds initial pinctrl support to all arm mps3 board targets.

Signed-off-by: Samuel Chee <samche01@arm.com>
Signed-off-by: Sudan Landge <sudan.landge@arm.com>
Adds pinctrl driver for the v2m_beetle board target.

Signed-off-by: Samuel Chee <samche01@arm.com>
Signed-off-by: Sudan Landge <sudan.landge@arm.com>
Adds initial pinctrl support to arm v2m_beetle board target.

Signed-off-by: Samuel Chee <samche01@arm.com>
Signed-off-by: Sudan Landge <sudan.landge@arm.com>
Copy link
Member

@gmarull gmarull left a comment

Choose a reason for hiding this comment

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

just a comment regarding DT: it should likely be defined as in STM32.

Comment on lines +219 to +222
pinctrl: pinctrl {
compatible = "arm,mps3-pinctrl";
status = "okay";
};
Copy link
Member

Choose a reason for hiding this comment

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

not a memory mapped device?

Copy link
Collaborator

Choose a reason for hiding this comment

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

yes, because there isn't a separate pinctlr device and pins are managed by gpio controller.
Also, I had a quick look at STM32 DT https://github.com/zephyrproject-rtos/hal_stm32/blob/main/dts/st/mp1/stm32mp135faex-pinctrl.dtsi but didn't find anything different, could you please share more details on what you were referring to?

@wearyzen wearyzen requested a review from ithinuel April 7, 2025 12:51
@kartben kartben merged commit c8bcf1b into zephyrproject-rtos:main Apr 7, 2025
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants