All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v13 00/12] pinctrl: add support of Airoha SoCs
@ 2026-06-17  5:29 Mikhail Kshevetskiy
  2026-06-17  5:29 ` [PATCH v13 01/12] bitops: import BITS_PER_TYPE() macro from linux Mikhail Kshevetskiy
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: Mikhail Kshevetskiy @ 2026-06-17  5:29 UTC (permalink / raw)
  To: Tom Rini, Christian Marangi, Simon Glass, David Lechner,
	Marek Vasut, Peng Fan, Sean Anderson, Yao Zi, Michael Trimarchi,
	Michal Simek, Yury Norov (NVIDIA), Geert Uytterhoeven,
	Jonathan Cameron, Crt Mori, Ilias Apalodimas, Heiko Schocher,
	u-boot, Benjamin Larsson, Markus Gothe, Matheus Sampaio Queiroga
  Cc: Mikhail Kshevetskiy

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_en7523/kernel/src/branch/airoha_en7523_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

Changes v7:
 * an7583: add missed gpio22 pin group

Changes v8:
 * replace en7581 prefix by an7581 in the an7581 pinctrl driver
 * sync en7523 driver with latest Matheus Sampaio Queiroga work

Changes v9:
 * Remove an7581/an7583 prefixes from an7581/an7583 drivers. No point to keep
   it in the chip specific code.
 * Minor refactoring of an7583 drivers to make it more similar to an7581 one.
 * Fixed few bugs in an7581/an7583 drivers.
 * Sync code with latest Matheus Sampaio Queiroga work.
 * Remove en7523 driver by request of Matheus Sampaio Queiroga, because of
   linux en7523 driver is not ready (and currently broken)

Changes v10:
 * Add back en7523 pinctrl driver. The driver was tested/debugged together
   with Matheus Sampaio Queiroga. Pin numbers were changed according to
   the table provided by Benjamin Larsson.
 * Added myself to the list of en7523 pinctrl driver authors.
 * gpio-range property was added to pinctrl dts node.

Changes v11:
 * fix mdio pinctrl function for en7523

Changes v12:
 * code was synced with corresponding linux patchset
   https://lore.kernel.org/lkml/20260616041939.2587012-1-mikhail.kshevetskiy@iopsys.eu/

Changes v13:
 * code was synced with corresponding linux patchset v4
   https://lore.kernel.org/lkml/20260617043654.2790253-1-mikhail.kshevetskiy@iopsys.eu/

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         |   23 +
 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  |  175 +++
 drivers/pinctrl/airoha/pinctrl-airoha.c |  927 ++++++++++++++
 drivers/pinctrl/airoha/pinctrl-an7581.c | 1484 ++++++++++++++++++++++
 drivers/pinctrl/airoha/pinctrl-an7583.c | 1492 +++++++++++++++++++++++
 drivers/pinctrl/airoha/pinctrl-en7523.c | 1118 +++++++++++++++++
 include/dm/pinctrl.h                    |   28 +
 include/linux/bitfield.h                |   95 +-
 include/linux/bitops.h                  |    1 +
 include/linux/pinctrl/pinctrl.h         |   74 ++
 16 files changed, 5477 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


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

end of thread, other threads:[~2026-06-30 14:03 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-17  5:29 [PATCH v13 00/12] pinctrl: add support of Airoha SoCs Mikhail Kshevetskiy
2026-06-17  5:29 ` [PATCH v13 01/12] bitops: import BITS_PER_TYPE() macro from linux Mikhail Kshevetskiy
2026-06-17  5:29 ` [PATCH v13 02/12] bitfield: Add less-checking __FIELD_{GET,PREP}() Mikhail Kshevetskiy
2026-06-17  5:29 ` [PATCH v13 03/12] bitfield: Add non-constant field_{prep, get}() helpers Mikhail Kshevetskiy
2026-06-17  5:29 ` [PATCH v13 04/12] pinctrl: add more pinconf/pinctrl definitions Mikhail Kshevetskiy
2026-06-17  5:29 ` [PATCH v13 05/12] pinctrl: sort and format the contents of the makefile Mikhail Kshevetskiy
2026-06-17  5:29 ` [PATCH v13 06/12] pinctrl: airoha: add shared pinctrl code Mikhail Kshevetskiy
2026-06-17  5:29 ` [PATCH v13 07/12] pinctrl: airoha: add pin controller and gpio driver for AN7581 SoC Mikhail Kshevetskiy
2026-06-17  5:29 ` [PATCH v13 08/12] pinctrl: airoha: add pin controller and gpio driver for AN7583 SoC Mikhail Kshevetskiy
2026-06-17  5:29 ` [PATCH v13 09/12] pinctrl: airoha: add pin controller and gpio driver for EN7523 SoC Mikhail Kshevetskiy
2026-06-17  5:29 ` [PATCH v13 10/12] configs: airoha: an7581: enable pinctrl/gpio support Mikhail Kshevetskiy
2026-06-17  5:29 ` [PATCH v13 11/12] configs: airoha: en7523: " Mikhail Kshevetskiy
2026-06-17  5:29 ` [PATCH v13 12/12] arm: dts: en7523: add pinctrl/gpio support, drop legacy gpio support Mikhail Kshevetskiy
2026-06-30 14:03 ` [PATCH v13 00/12] pinctrl: add support of Airoha SoCs Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.