[PATCH v3 0/2] gpio: Add support for Axiado AX3005 SGPIO controller

Petar Stepanovic pstepanovic at axiado.com
Thu Sep 3 00:11:31 PDT 2026


Each SGPIO position provides one input GPIO and one output GPIO with
fixed directions, along with interrupt support for input GPIOs.

This series adds support for the SGPIO controller found on the Axiado
AX3005 SoC.

The series includes:
- Devicetree binding documentation
- GPIO driver implementation

The driver uses gpio-regmap for GPIO operations and provides
controller-specific interrupt handling.

Tested on Axiado AX3005 platforms.

---
Patch 1: dt-bindings: gpio: add Axiado AX3005 SGPIO controller
Patch 2: gpio: axiado: add AX3005 SGPIO controller support

Signed-off-by: Petar Stepanovic <pstepanovic at axiado.com>

---
Changes in v3:
- Dropped AX3000 support.
- Renamed the series to reflect AX3005-only support.
- Removed AX3000-specific compatible, match data, and register-layout
  handling.
- Reworked GPIO operations to use `gpio-regmap` with fixed GPIO
  directions and custom register/mask translation.
- Changed `ngpios` to represent the total number of Linux GPIO lines,
  with each SGPIO position contributing one input and one output line,
  and allowed any even count up to the hardware limit.
- Reworked interrupt handling to use a dedicated managed IRQ domain and
  the `gpio-regmap` IRQ resource helpers.
- Added IRQ lockdep classes and restricted IRQ mappings to input GPIOs.
- Reworked software edge detection using input shadow state and dynamic
  bitmaps for rising, falling, and unmasked interrupts.
- Updated input shadow handling so transitions occurring while an IRQ is
  masked are not replayed after it is unmasked.
- Added regmap caching for the write-only output shadow registers and
  marked live and interrupt-status registers appropriately.
- Reworked SoC match data to explicitly describe bank count, input-bank
  alignment.
- Reworked hardware initialization to check register-access errors, use
  named register fields and masks, and correctly handle partial banks.
- Added managed hardware shutdown so the shift engine and interrupts are
  disabled on probe failures and device removal.
- Simplified resource management and removed the custom GPIO data
  shadowing and locking used by the previous implementation.
- Clarified the binding description of SGPIO positions, fixed
  input/output directions, and interrupt capabilities.
- Link to v2: https://lore.kernel.org/r/20260729-axiado-ax3000-sgpio-controller-v2-0-976f4ed11438@axiado.com

Changes in v2:
- Split the series into two patches: the binding and `MAINTAINERS`
  update, followed by the SGPIO driver.
- Added SoC-specific compatibles for AX3000 and AX3005 and selected
  hardware limits and register layouts through match data.
- Reworked clock handling to use one APB clock and calculate the SGPIO
  divider from `bus-frequency`.
- Removed the custom `design-variant`, `dout-init`, `apb-frequency`,
  and clock-source selection properties from the previous design.
- Added validation for the GPIO count, clock rates, and SGPIO divider
  calculation.
- Added fixed GPIO direction handling: even offsets are inputs and odd
  offsets are outputs.
- Fixed child IRQ mapping for the interleaved input/output GPIO layout
  and restricted interrupts to input GPIOs.
- Reworked interrupt handling to support rising, falling, and both-edge
  detection through software filtering.
- Initialized the input cache before enabling interrupts to prevent
  false edge events during probe.
- Serialized output cache updates and register writes with a mutex to
  prevent lost concurrent updates.
- Updated GPIO IRQ handling to use GPIO IRQ resource helpers and
  threaded nested interrupts.
- Added managed hardware cleanup for probe failures and device removal.
- Updated the Kconfig regmap dependency for the MMIO-backed variant.
- Simplified resource management and error handling and performed
  general coding-style cleanup.
- Link to v1: https://lore.kernel.org/r/20260414-axiado-ax3000-sgpio-controller-v1-0-b5c7e4c2e69b@axiado.com

To: Petar Stepanovic <pstepanovic at axiado.com>
To: SriNavmani A <srinavmani at axiado.com>
To: Prasad Bolisetty <pbolisetty at axiado.com>
To: Linus Walleij <linusw at kernel.org>
To: Bartosz Golaszewski <brgl at kernel.org>
To: Rob Herring <robh at kernel.org>
To: Krzysztof Kozlowski <krzk+dt at kernel.org>
To: Conor Dooley <conor+dt at kernel.org>
To: Tzu-Hao Wei <twei at axiado.com>
To: Karthikeyan Mitran <kmitran at axiado.com>
To: Michael Walle <mwalle at kernel.org>
Cc: linux-gpio at vger.kernel.org
Cc: devicetree at vger.kernel.org
Cc: linux-arm-kernel at lists.infradead.org
Cc: linux-kernel at vger.kernel.org

---
Petar Stepanovic (2):
      dt-bindings: gpio: add Axiado AX3005 SGPIO controller
      gpio: axiado: add AX3005 SGPIO controller support

 .../bindings/gpio/axiado,ax3005-sgpio.yaml         | 112 ++++
 MAINTAINERS                                        |   9 +
 drivers/gpio/Kconfig                               |  21 +
 drivers/gpio/Makefile                              |   1 +
 drivers/gpio/gpio-axiado-sgpio.c                   | 737 +++++++++++++++++++++
 5 files changed, 880 insertions(+)
---
base-commit: 818bebeb63dd6bf5f4e07e145f6cdbace520a34c
change-id: 20260320-axiado-ax3000-sgpio-controller-00f6e1db6ce9

Best regards,
--  
Petar Stepanovic <pstepanovic at axiado.com>




More information about the linux-arm-kernel mailing list