[PATCH v6 00/12] pinctrl: add support of Airoha SoCs
Mikhail Kshevetskiy
mikhail.kshevetskiy at iopsys.eu
Thu May 14 04:55:30 CEST 2026
This patch series add pin controller and gpio driver support for EN7523/
AN7581/AN7583 SoCs. The driver based on official linux airoha pinctrl and
gpio driver with Matheus Sampaio Queiroga changes.
The original Matheus Sampaio Queiroga driver can be taken from the repo:
https://sirherobrine23.com.br/airoha_an7523/kernel/commits/branch/airoha_an7523_pinctrl
Additionally in the EN7523 case the patches removes existing gpio dts nodes
and replaces them with pinctrl node. It should not be very dangerous, because:
* No official EN7523 gpio support present in U-Boot
* Legacy Linux EN7523 GPIO driver is mostly abandoned
* The same driver is planned for upstream linux/openwrt
This patchset includes bitfield.h patches created for Linux kernel
by Geert Uytterhoeven. It suits U-Boot fine. I preserve original author
and original commit messages. It might be not a best strategy, because
these patches refers to other linux kernel commits not added to U-Boot.
Please note me, if there is a better way.
The patches were tested on EN7523/AN7581/AN7583 boards.
---
Changes v2:
* pinctrl driver was split on common and per SoC parts
* EN7523 SoC support was added
* EN7523/AN7581 defconfigs were updated to activate
pinctrl/gpio support
* Board/SoC independent pinconf/pinctrl definitions
were moved to global includes
Changes v3:
* add non-constant field_{prep,get}() helpers
* put airoha common code to a separate patch
* put en7523 dts change to a separate patch
* add support of "pinmux status" command
* address a lot of comments from David Lechner
Changes v4:
* minor refactoring
* fix gpio initialization, so gpio driver becomes probed
Changes v5:
* more bitfield changes
* sort contents of pinctrl makefile
* address more issues found by David Lechner
Changes v6:
* pinctrl makefile sorting/formatting was moved to separate commit
* replace 'tristate' by 'bool' in airoha Kconfig (thanks to Peng Fan)
* a bit improve menu entry names
* add an explanation why en7581 prefix used for an7581 chips.
* add reviewed by David Lechner line to all patches
Geert Uytterhoeven (2):
bitfield: Add less-checking __FIELD_{GET,PREP}()
bitfield: Add non-constant field_{prep,get}() helpers
Mikhail Kshevetskiy (10):
bitops: import BITS_PER_TYPE() macro from linux
pinctrl: add more pinconf/pinctrl definitions
pinctrl: sort and format the contents of the makefile
pinctrl: airoha: add shared pinctrl code
pinctrl: airoha: add pin controller and gpio driver for AN7581 SoC
pinctrl: airoha: add pin controller and gpio driver for AN7583 SoC
pinctrl: airoha: add pin controller and gpio driver for EN7523 SoC
configs: airoha: an7581: enable pinctrl/gpio support
configs: airoha: en7523: enable pinctrl/gpio support
arm: dts: en7523: add pinctrl/gpio support, drop legacy gpio support
arch/arm/dts/en7523-u-boot.dtsi | 21 +
configs/an7581_evb_defconfig | 2 +-
configs/en7523_evb_defconfig | 2 +-
drivers/pinctrl/Kconfig | 1 +
drivers/pinctrl/Makefile | 61 +-
drivers/pinctrl/airoha/Kconfig | 26 +
drivers/pinctrl/airoha/Makefile | 7 +
drivers/pinctrl/airoha/airoha-common.h | 476 ++++++++++
drivers/pinctrl/airoha/pinctrl-airoha.c | 927 +++++++++++++++++++
drivers/pinctrl/airoha/pinctrl-an7581.c | 1084 +++++++++++++++++++++++
drivers/pinctrl/airoha/pinctrl-an7583.c | 979 ++++++++++++++++++++
drivers/pinctrl/airoha/pinctrl-en7523.c | 648 ++++++++++++++
include/dm/pinctrl.h | 28 +
include/linux/bitfield.h | 95 +-
include/linux/bitops.h | 1 +
include/linux/pinctrl/pinctrl.h | 74 ++
16 files changed, 4393 insertions(+), 39 deletions(-)
create mode 100644 drivers/pinctrl/airoha/Kconfig
create mode 100644 drivers/pinctrl/airoha/Makefile
create mode 100644 drivers/pinctrl/airoha/airoha-common.h
create mode 100644 drivers/pinctrl/airoha/pinctrl-airoha.c
create mode 100644 drivers/pinctrl/airoha/pinctrl-an7581.c
create mode 100644 drivers/pinctrl/airoha/pinctrl-an7583.c
create mode 100644 drivers/pinctrl/airoha/pinctrl-en7523.c
create mode 100644 include/linux/pinctrl/pinctrl.h
--
2.53.0
More information about the U-Boot
mailing list