From: Cristian Marussi <cristian.marussi@arm.com>
To: Ciprian Marian Costea <ciprianmarian.costea@oss.nxp.com>
Cc: arm-scmi@vger.kernel.org, linux-gpio@vger.kernel.org,
Sudeep Holla <sudeep.holla@arm.com>,
Cristian Marussi <cristian.marussi@arm.com>,
Linus Walleij <linus.walleij@linaro.org>
Subject: Re: pinctrl-scmi: Support for pin-only mode when groups are unavailable
Date: Thu, 16 Oct 2025 18:36:54 +0100 [thread overview]
Message-ID: <aPEtEnd3kG_pxWPf@pluto> (raw)
In-Reply-To: <0c4bc190-7049-4753-b88e-479a3ff584fc@oss.nxp.com>
On Thu, Oct 16, 2025 at 07:05:21PM +0300, Ciprian Marian Costea wrote:
> Hello,
>
[CC: <linus.walleij@linaro.org>]
Hi Ciprian,
I will have a better look at this in the coming days ...
...but I think, in the meantime, better if we CC also the PINCTRL
Maintainer Linus Walleij that helped us reviewing also this driver from the
PINCTRL subsystem perspective....
>
> I’m currently exploring a solution to improve the 'pinctrl-scmi' [1] driver
> so it can better support SCMI platforms that only provide individual pin
> control. At the moment, the driver handles only group-based operations,
> which means platforms without pin groups run into limitations.
...ok
>
> According to the SCMI v4.0 specification (section 3.11.2.8), both
> group-based and per-pin control modes should be supported. However, on
> pin-only platforms, the current implementation cannot enumerate groups,
> configure pinmux, or assign functions per pin. This results in probe
> failures and '-EINVAL' errors when trying to configure non-existent groups.
>
...indeed
> I haven’t seen any work in this area yet, but if nothing is in progress, I’d
> like to propose an approach that keeps compatibility with the existing Linux
> pinctrl framework while adding per-pin support. The idea is to detect
...nothing planned or requested as of now that I know...so feel free to propose
your improvements...becasue it is easier to discuss in front of a series :P
Cheers,
Cristian
> whether the platform supports groups or pins-only during probe, and when
> groups are missing, create virtual groups from the DT pin specifications.
> This would allow us to reuse the existing group-based logic while enabling
> per-pin muxing.
>
> For example, a DTS node could look like this:
>
> uart_pins: uart-pins {
> pins = <10 11>; /* SCMI pin IDs */
> functions = <2 3>; /* Per-pin function IDs: UART_TX, UART_RX */
> };
>
> or:
>
> uart_pins: uart-pins {
> pins = <10 11>; /* SCMI pin IDs */
> function = <2>; /* Same function for all pins */
> };
>
> To make this work, the driver would need to:
> - Detect capabilities during probe (groups vs pins-only). Can be
> implemented via 'pinctrl_ops->count_get()'.
> - Create virtual groups when groups are unsupported.
> - Add per-pin mux/config operations by introducing a 'pin_mux_set()'
> callback in the SCMI core, since currently only group-based 'mux_set' is
> implemented.
>
> I’d really appreciate your thoughts on whether this direction makes sense
> and if there’s anything I should consider before starting.
> Thanks a lot for your time and guidance!
>
> [1]
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/pinctrl/pinctrl-scmi.c
>
> Best Regards,
> Ciprian Costea
next prev parent reply other threads:[~2025-10-16 17:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-16 16:05 pinctrl-scmi: Support for pin-only mode when groups are unavailable Ciprian Marian Costea
2025-10-16 17:36 ` Cristian Marussi [this message]
2025-10-20 7:07 ` Ciprian Marian Costea
2025-10-20 21:51 ` Linus Walleij
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aPEtEnd3kG_pxWPf@pluto \
--to=cristian.marussi@arm.com \
--cc=arm-scmi@vger.kernel.org \
--cc=ciprianmarian.costea@oss.nxp.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=sudeep.holla@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox