Skip to content

pinctrl: airoha: add AN7589 support

John Crispin linux-devicetree linux-gpio linux-mediatek lkml mfd 3 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest9 patches 0 repliesNew
  2. v27 patches 7 repliesSuperseded
  3. v17 patches 5 repliesSuperseded

Changes in v3 from the cover letter

- Split the bindings in three: the syscon compatible (patch 5), the pin controller (patch 6) and the GPIO system controller (patch 7) (Lee, Conor).
- Patch 6: allow one group per node, except for pcm_spi and pcie, whose groups carry different signals of one device. Fix the uart5 example (Conor).
- Patch 7: name the PWM controller in the commit message (Conor).
- Add the Reviewed-by of Lorenzo to patches 3 and 9.
- Link to v2: https://lore.kernel.org/r/[email protected]

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9pinctrl: airoha: make gpio register layout per SoCdrivers/pinctrl/airoha/airoha-common.h drivers/pinctrl/airoha/pinctrl-airoha.c drivers/pinctrl/airoha/pinctrl-an7563.c +4 more+18 -70 replies
2/9pinctrl: airoha: add per pin mode field muxdrivers/pinctrl/airoha/airoha-common.h drivers/pinctrl/airoha/pinctrl-airoha.c+62 -00 replies
3/9pinctrl: airoha: make the chip SCU optionaldrivers/pinctrl/airoha/pinctrl-airoha.c+19 -60 replies
4/9pinctrl: airoha: mux a requested GPIO through the IOMUXdrivers/pinctrl/airoha/airoha-common.h drivers/pinctrl/airoha/pinctrl-airoha.c+15 -00 replies
5/9dt-bindings: mfd: syscon: add airoha,an7589-iomuxDocumentation/devicetree/bindings/mfd/syscon.yaml+1 -00 replies
6/9dt-bindings: pinctrl: airoha: add AN7589Documentation/devicetree/bindings/pinctrl/airoha,an7589-pinctrl.yaml MAINTAINERS+356 -00 replies
7/9dt-bindings: mfd: airoha: add AN7589 GPIO system controllerDocumentation/devicetree/bindings/mfd/airoha,an7589-gpio-sysctl.yaml MAINTAINERS+67 -00 replies
8/9pinctrl: airoha: move the GPIO register offsets to the common headerdrivers/pinctrl/airoha/airoha-common.h drivers/pinctrl/airoha/pinctrl-airoha.c+20 -200 replies
9/9pinctrl: airoha: add support of an7589 SoCMAINTAINERS drivers/pinctrl/airoha/Kconfig drivers/pinctrl/airoha/Makefile +1 more+636 -00 replies

Reviews trailers per patch

4 of 9 patches have a Reviewed-by or Acked-by.

PatchLorenzo Bianconi
1/9A-b
2/9
3/9R-b
4/9
5/9
6/9
7/9
8/9A-b
9/9R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/9] pinctrl: airoha: add AN7589 support

The Airoha AN7589 has a GPIO controller like the EN7581 one, with a third bank for 74 GPIOs in total. Its pin functions are selected
differently: a separate IOMUX block holds a 4 bit mode field per pin, eight pins per register, and mode 0 makes any pin a GPIO.

The first four patches prepare the shared driver and change nothing for the SoCs it serves today:

1. The GPIO register layout moves into the match data, so a SoC can describe more than 64 pins.
2. A function group can carry one IOMUX mode per pin. A SoC describes its IOMUX in the match data: the width of the mode field and, from patch 4, the mode that makes a pin a GPIO.
3. The chip SCU becomes optional, as the AN7589 needs none.
4. A pin requested by gpiolib is put into GPIO mode through the IOMUX, so no per pin gpio function is needed.

Patch 5 adds the IOMUX to the syscon compatibles. Patch 6 adds the binding for the pin controller. Patch 7 adds the binding for the GPIO system controller it sits under, which also holds the PWM controller. Patch 8 moves the GPIO register offsets to the common header, so the AN7589 data can describe its own register table, with no functional change. Patch 9 adds the AN7589 pin data.

The series applies to next-20261105 and has no dependencies.

Changes in v3:
- Split the bindings in three: the syscon compatible (patch 5), the pin controller (patch 6) and the GPIO system controller (patch 7) (Lee, Conor).
- Patch 6: allow one group per node, except for pcm_spi and pcie, whose groups carry different signals of one device. Fix the uart5 example (Conor).
- Patch 7: name the PWM controller in the commit message (Conor).
- Add the Reviewed-by of Lorenzo to patches 3 and 9.
- Link to v2: https://lore.kernel.org/r/[email protected]

Changes in v2:
- Patch 3: look up the airoha,chip-scu phandle before the check for a chip SCU compatible (Lorenzo).
- Patch 6: one function per block type (uart, i2c, spi, pcm, mdio, pcie, pon, sgpio, jtag), with the group selecting the instance, as in the other Airoha pin controller bindings. List the valid groups for the groups property (Conor).
- Patch 9: the function table follows the binding. Name the match data, the OF match table and the platform driver after the AN7589 (Lorenzo).
- Link to v1: https://lore.kernel.org/r/[email protected]

John Crispin (9):
pinctrl: airoha: make gpio register layout per SoC
pinctrl: airoha: add per pin mode field mux
pinctrl: airoha: make the chip SCU optional
pinctrl: airoha: mux a requested GPIO through the IOMUX
dt-bindings: mfd: syscon: add airoha,an7589-iomux
dt-bindings: pinctrl: airoha: add AN7589
dt-bindings: mfd: airoha: add AN7589 GPIO system controller
pinctrl: airoha: move the GPIO register offsets to the common header
pinctrl: airoha: add support of an7589 SoC

 .../mfd/airoha,an7589-gpio-sysctl.yaml        |  66 ++
 .../devicetree/bindings/mfd/syscon.yaml       |   1 +
 .../pinctrl/airoha,an7589-pinctrl.yaml        | 355 ++++++++++
 MAINTAINERS                                   |   3 +
 drivers/pinctrl/airoha/Kconfig                |  11 +
 drivers/pinctrl/airoha/Makefile               |   1 +
 drivers/pinctrl/airoha/airoha-common.h        |  41 +-
 drivers/pinctrl/airoha/pinctrl-airoha.c       | 119 +++-
 drivers/pinctrl/airoha/pinctrl-an7563.c       |   1 +
 drivers/pinctrl/airoha/pinctrl-an7581.c       |   1 +
 drivers/pinctrl/airoha/pinctrl-an7583.c       |   1 +
 drivers/pinctrl/airoha/pinctrl-an7589.c       | 623 ++++++++++++++++++
 drivers/pinctrl/airoha/pinctrl-en7523.c       |   1 +
 drivers/pinctrl/airoha/pinctrl-en7528.c       |   1 +
 14 files changed, 1193 insertions(+), 32 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/mfd/airoha,an7589-gpio-sysctl.yaml
 create mode 100644 Documentation/devicetree/bindings/pinctrl/airoha,an7589-pinctrl.yaml
 create mode 100644 drivers/pinctrl/airoha/pinctrl-an7589.c

base-commit: ddfe51b0a0f5dc9e415cc2c8ad8db17532dd426b

Signature · 1 line
2.34.1