lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250317-aaeon-up-board-pinctrl-support-v2-0-36126e30aa62@bootlin.com>
Date: Mon, 17 Mar 2025 16:37:58 +0100
From: Thomas Richard <thomas.richard@...tlin.com>
To: Linus Walleij <linus.walleij@...aro.org>, 
 Andy Shevchenko <andriy.shevchenko@...ux.intel.com>, 
 Bartosz Golaszewski <brgl@...ev.pl>, 
 Geert Uytterhoeven <geert+renesas@...der.be>
Cc: linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org, 
 thomas.petazzoni@...tlin.com, DanieleCleri@...on.eu, GaryWang@...on.com.tw, 
 Thomas Richard <thomas.richard@...tlin.com>, 
 Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
Subject: [PATCH RFC v2 0/6] Add pinctrl support for the AAEON UP board FPGA

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@...tlin.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@...tlin.com>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ