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