From: Petar Stepanovic <pstepanovic@axiado.com>
To: Petar Stepanovic <pstepanovic@axiado.com>,
Tzu-Hao Wei <twei@axiado.com>, Swark Yang <syang@axiado.com>,
Prasad Bolisetty <pbolisetty@axiado.com>,
Linus Walleij <linusw@kernel.org>,
Bartosz Golaszewski <brgl@kernel.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Harshit Shah <hshah@axiado.com>,
SriNavmani A <srinavmani@axiado.com>,
Karthikeyan Mitran <kmitran@axiado.com>,
Michael Walle <mwalle@kernel.org>
Cc: linux-gpio@vger.kernel.org, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, openbmc@lists.ozlabs.org
Subject: [PATCH v3 0/2] gpio: Add support for Axiado AX3005 SGPIO controller
Date: Thu, 03 Sep 2026 00:11:31 -0700 [thread overview]
Message-ID: <20260903-axiado-ax3000-sgpio-controller-v3-0-b30820e1b858@axiado.com> (raw)
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@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@axiado.com>
To: SriNavmani A <srinavmani@axiado.com>
To: Prasad Bolisetty <pbolisetty@axiado.com>
To: Linus Walleij <linusw@kernel.org>
To: Bartosz Golaszewski <brgl@kernel.org>
To: Rob Herring <robh@kernel.org>
To: Krzysztof Kozlowski <krzk+dt@kernel.org>
To: Conor Dooley <conor+dt@kernel.org>
To: Tzu-Hao Wei <twei@axiado.com>
To: Karthikeyan Mitran <kmitran@axiado.com>
To: Michael Walle <mwalle@kernel.org>
Cc: linux-gpio@vger.kernel.org
Cc: devicetree@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@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@axiado.com>
next reply other threads:[~2026-09-03 7:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-03 7:11 Petar Stepanovic [this message]
2026-09-03 7:11 ` [PATCH v3 1/2] dt-bindings: gpio: add Axiado AX3005 SGPIO controller Petar Stepanovic
2026-09-03 17:36 ` Conor Dooley
2026-09-03 7:11 ` [PATCH v3 2/2] gpio: axiado: add AX3005 SGPIO controller support Petar Stepanovic
2026-09-03 7:22 ` sashiko-bot
2026-09-03 8:59 ` Bartosz Golaszewski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260903-axiado-ax3000-sgpio-controller-v3-0-b30820e1b858@axiado.com \
--to=pstepanovic@axiado.com \
--cc=brgl@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=hshah@axiado.com \
--cc=kmitran@axiado.com \
--cc=krzk+dt@kernel.org \
--cc=linusw@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mwalle@kernel.org \
--cc=openbmc@lists.ozlabs.org \
--cc=pbolisetty@axiado.com \
--cc=robh@kernel.org \
--cc=srinavmani@axiado.com \
--cc=syang@axiado.com \
--cc=twei@axiado.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox