Linux GPIO subsystem development
 help / color / mirror / Atom feed
* pinctrl-scmi: Support for pin-only mode when groups are unavailable
@ 2025-10-16 16:05 Ciprian Marian Costea
  2025-10-16 17:36 ` Cristian Marussi
  0 siblings, 1 reply; 4+ messages in thread
From: Ciprian Marian Costea @ 2025-10-16 16:05 UTC (permalink / raw)
  To: arm-scmi, linux-gpio; +Cc: Sudeep Holla, Cristian Marussi

Hello,


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.

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.

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 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-10-20 21:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2025-10-20  7:07   ` Ciprian Marian Costea
2025-10-20 21:51   ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox