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 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 --- Geert Uytterhoeven (1): bitfield: Add non-constant field_{prep,get}() helpers Mikhail Kshevetskiy (8): pinctrl: add more pinconf/pinctrl definitions 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 | 7 +- configs/en7523_evb_defconfig | 3 +- drivers/pinctrl/Kconfig | 1 + drivers/pinctrl/Makefile | 1 + drivers/pinctrl/airoha/Kconfig | 26 + drivers/pinctrl/airoha/Makefile | 7 + drivers/pinctrl/airoha/airoha-common.h | 512 +++++++++++ drivers/pinctrl/airoha/pinctrl-airoha.c | 843 ++++++++++++++++++ drivers/pinctrl/airoha/pinctrl-an7581.c | 1074 +++++++++++++++++++++++ drivers/pinctrl/airoha/pinctrl-an7583.c | 976 ++++++++++++++++++++ drivers/pinctrl/airoha/pinctrl-en7523.c | 648 ++++++++++++++ include/dm/pinctrl.h | 28 + include/linux/bitfield.h | 59 ++ include/linux/pinctrl/pinctrl.h | 74 ++ 15 files changed, 4273 insertions(+), 7 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

