linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFC v2 0/6] Add pinctrl support for the AAEON UP board FPGA
@ 2025-03-17 15:37 Thomas Richard
  2025-03-17 15:37 ` [PATCH RFC v2 1/6] gpiolib: add gpiochip_add_pin_range_sparse() function Thomas Richard
                   ` (5 more replies)
  0 siblings, 6 replies; 17+ messages in thread
From: Thomas Richard @ 2025-03-17 15:37 UTC (permalink / raw)
  To: Linus Walleij, Andy Shevchenko, Bartosz Golaszewski,
	Geert Uytterhoeven
  Cc: linux-gpio, linux-kernel, thomas.petazzoni, DanieleCleri,
	GaryWang, Thomas Richard, Bartosz Golaszewski

Second version of this series. I removed MFD and LED drivers as they were
already merged. It is in RFC state as I would like some feedback before to
add support for more boards, and to do some cleanup.

After some discussions with Andy, the preferred solution is to set the
pinctrl upboard driver as a consumer of SoC pins. Each supported has its
pinctrl mappings, the right mappings are registered and enabled (board is
identified using DMI table).

The hog mappings were removed because by default the FPGA is configured
correctly (thanks to the BIOS) for its board.

As requested by Linus, the GPIO part was reworked. The gpio-aggregator
driver was refactored to create a new library (gpio-fwd) which allows other
drivers to create gpiochip forwarder. The upboard pinctrl driver registers
a gpiochip forwarder, then requests and registers SoC GPIOs at runtime, and
forwards all GPIO accesses to the right gpiochip.

Linus, I know you were not ok with the gpiochip_add_pinlist_range()
function, but as we did not understood each other I kept it, so we can
continue the discussion.

The pinctrl drivers supports FPGA for two types of boards, UP and UP2 (UP
Squared). For now I only added pinctrl mappings for the "UP Squared" board
[1] (I selected this board as the pinctrl-broxton drivers had already all
functions and groups needed). More boards will be supported later (missing
groups and funtions should be added in Intel pinctrl drivers at the same
time).

[1] https://www.aaeon.com/en/product/detail/iot-gateway-maker-boards-up-squared

Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
---
Changes in v2:
- mfd: removed driver (already merged)
- led: removed driver (already merged)
- gpio-aggregator: refactor code to create a gpio-fwd library
- pinctrl: refactor gpio part to use the gpio-fwd library
- pinctrl: add pinctrl mappings for each board

---
Thomas Richard (6):
      gpiolib: add gpiochip_add_pin_range_sparse() function
      gpio: aggregator: refactor the forwarder part.
      gpio: aggregator: export symbols of the gpio-fwd library
      gpio: aggregator: handle runtime registration of gpio_desc in gpiochip_fwd
      gpio: aggregator: add possibility to attach data to the forwarder
      pinctrl: Add pin controller driver for AAEON UP boards

 drivers/gpio/gpio-aggregator.c    |  232 +++++---
 drivers/gpio/gpiolib.c            |   74 ++-
 drivers/pinctrl/Kconfig           |   15 +
 drivers/pinctrl/Makefile          |    1 +
 drivers/pinctrl/pinctrl-upboard.c | 1094 +++++++++++++++++++++++++++++++++++++
 include/linux/gpio/driver.h       |   12 +
 include/linux/gpio/gpio-fwd.h     |   56 ++
 7 files changed, 1379 insertions(+), 105 deletions(-)
---
base-commit: 12b58398bffc23db89e715414399b0533255da51
change-id: 20240930-aaeon-up-board-pinctrl-support-98fa4a030490

Best regards,
-- 
Thomas Richard <thomas.richard@bootlin.com>


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

end of thread, other threads:[~2025-04-15  8:39 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-17 15:37 [PATCH RFC v2 0/6] Add pinctrl support for the AAEON UP board FPGA Thomas Richard
2025-03-17 15:37 ` [PATCH RFC v2 1/6] gpiolib: add gpiochip_add_pin_range_sparse() function Thomas Richard
2025-03-17 16:59   ` Andy Shevchenko
2025-04-09 13:49     ` Thomas Richard
2025-03-17 15:38 ` [PATCH RFC v2 2/6] gpio: aggregator: refactor the forwarder part Thomas Richard
2025-03-17 17:04   ` Andy Shevchenko
2025-03-17 15:38 ` [PATCH RFC v2 3/6] gpio: aggregator: export symbols of the gpio-fwd library Thomas Richard
2025-03-17 17:10   ` Andy Shevchenko
2025-03-17 15:38 ` [PATCH RFC v2 4/6] gpio: aggregator: handle runtime registration of gpio_desc in gpiochip_fwd Thomas Richard
2025-03-17 17:13   ` Andy Shevchenko
2025-04-09 14:50     ` Thomas Richard
2025-03-17 15:38 ` [PATCH RFC v2 5/6] gpio: aggregator: add possibility to attach data to the forwarder Thomas Richard
2025-03-18 13:18   ` Bartosz Golaszewski
2025-03-17 15:38 ` [PATCH RFC v2 6/6] pinctrl: Add pin controller driver for AAEON UP boards Thomas Richard
2025-03-17 18:42   ` Andy Shevchenko
2025-04-09 14:02     ` Thomas Richard
2025-04-15  8:39       ` Thomas Richard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).