[PATCH v6 0/9] drivers: gpio: and the QIXIS FPGA GPIO controller

Ioana Ciornei
2025-10-14T15:54:13Z

This patch set adds support for the GPIO controllers on the QIXIS FPGAs
found on some Layerscape boards such as LX2160ARDB and LS1046AQDS. At
the same time it describes the SFP+ cages found on these boards, which
are the users of those GPIO lines.

Before actually adding the GPIO driver, patches #2 and #3 add and
describe a new compatible string - fsl,lx2160ardb-fpga - which would be
used for the QIXIS FPGA found on the LX2160ARDB board. As opposed to the
other compatible strings found in fsl,fpga-qixis-i2c.yaml, the
fsl,lx2160ardb-fpga imposes a unit address for its child devices. This
will be used in the next patches when the gpio controller node will
define its unit address as the address of its underlying register offset
inside the FPGA. This requirement is described in the yaml file and it
only affects the newly added compatible.

Moving on to the GPIO subsystem, patch #4 is extending the gpio-regmap
with the fixed_direction_output bitmap which could be used by user
drivers to transmit directly the fixed direction of all the GPIO lines.

Even though this patch set touches multiple subsytems, each with their
own tree, I submit everything at once so that we can have a clear
picture on the overall intention. The hope is that each subsystem can
pick up the related patches since there is no compile time dependency
between them.

Changes in v2:
- 1/9: Used the newly added trivial-gpio.yaml file
- 1/9: Removed redundant "bindings" from commit title
- 1/9: Added only one compatible string for the gpio controllers on
LX2160ARDB since both registers have the same layout.
- 2/9: Enforce a unit address on the child gpios nodes (remove the ?)
- 2/9: Enforce the use of unit addresses by having #address-size and
#size-cells only for the newly added fsl,lx2160ardb-fpga compatible
- 4/9: Add the fixed_direction_output bitmap to the gpio_regmap_config
- 5/9: Use the newly added .fixed_direction_output bitmap
representing the fixed direction of the GPIO lines.
- 6/9: Use the same compatible string for both GPIO controller nodes.

Changes in v3:
- 2/10: Replace the trivial-gpio reference with an explicit mention of
the accepted child gpio compatible.
- 2/10: Reword the commit message.
- 2/10: Add the 'else' case to the if statement.
- 3/10: New patch
- 5/10: Make a deep copy of the new bitmap.
- 5/10: Remove the offset check against the ngpio.
- 5/10: Added documentation for the new config field.
- 6/10: Remove 'drivers' from the commit title.
- 6/10: Remove the qixis_cpld_gpio_type enum since its not needed.
- 6/10: Remove the NULL check for device_get_match_data().
- 6/10: Use a bitmap declared on the stack as the config field passed to
gpio-regmap.
- 9,10/10: Moved the reg property before address/cells-size.

Changes in v4:
- 2/11: Add an extra paragraph in the commit message to better explain
the context.
- 4/11: New patch.
- 5/11: Insert the compatible so that the alphabetical order is kept.
- 6/11: Replace devres bitmap allocation with bitmap_alloc() and
bitmap_free().

Changes in v5:
- 6/12: New patch. Fix a memory leak.
- 7/12: Rebased on top of latest linux-next, change the extra goto
statement.

Changes in v6:
- 5/9: Moved the Kconfig option for the QIXIS GPIO controller under the
MFD menu
- Removed the patches that were already accepted from v5

Ioana Ciornei (9):
dt-bindings: gpio: add QIXIS FPGA based GPIO controller
dt-bindings: fsl,fpga-qixis-i2c: add support for LX2160ARDB FPGA
dt-bindings: fsl,fpga-qixis: describe the gpio child node found on
LS1046AQDS
gpio: regmap: add the .fixed_direction_output configuration parameter
gpio: add QIXIS FPGA GPIO controller
arm64: dts: lx2160a-rdb: describe the QIXIS FPGA and two child GPIO
controllers
arm64: dts: ls1046a-qds: describe the FPGA based GPIO controller
arm64: dts: lx2160a-rdb: fully describe the two SFP+ cages
arm64: dts: ls1046a-qds: describe the two on-board SFP+ cages

.../bindings/board/fsl,fpga-qixis-i2c.yaml | 58 ++++++++++
.../bindings/board/fsl,fpga-qixis.yaml | 10 ++
.../bindings/gpio/trivial-gpio.yaml | 2 +
.../boot/dts/freescale/fsl-ls1046a-qds.dts | 52 +++++++++
.../boot/dts/freescale/fsl-lx2160a-rdb.dts | 78 +++++++++++++
drivers/gpio/Kconfig | 9 ++
drivers/gpio/Makefile | 1 +
drivers/gpio/gpio-qixis-fpga.c | 107 ++++++++++++++++++
drivers/gpio/gpio-regmap.c | 26 ++++-
include/linux/gpio/regmap.h | 5 +
10 files changed, 346 insertions(+), 2 deletions(-)
create mode 100644 drivers/gpio/gpio-qixis-fpga.c

--
2.25.1