* [PATCH v5 00/12] drivers: gpio: and the QIXIS FPGA GPIO controller
@ 2025-09-22 14:24 Ioana Ciornei
2025-09-22 14:24 ` [PATCH v5 01/12] dt-bindings: gpio: add QIXIS FPGA based " Ioana Ciornei
` (12 more replies)
0 siblings, 13 replies; 24+ messages in thread
From: Ioana Ciornei @ 2025-09-22 14:24 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Linus Walleij,
Bartosz Golaszewski, Shawn Guo, Michael Walle, Lee Jones,
devicetree, linux-gpio, linux-kernel
Cc: Frank Li
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.
Please note that CHECK_DTBS will fail without the following fixup patch.
https://lore.kernel.org/all/20250912165916.3098215-1-ioana.ciornei@nxp.com/
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.
Ioana Ciornei (12):
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
mfd: simple-mfd-i2c: keep compatible strings in alphabetical order
mfd: simple-mfd-i2c: add compatible string for LX2160ARDB
gpio: regmap: fix memory leak of gpio_regmap structure
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 | 28 ++++-
drivers/mfd/simple-mfd-i2c.c | 7 +-
include/linux/gpio/regmap.h | 5 +
11 files changed, 351 insertions(+), 6 deletions(-)
create mode 100644 drivers/gpio/gpio-qixis-fpga.c
--
2.25.1
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH v5 01/12] dt-bindings: gpio: add QIXIS FPGA based GPIO controller
2025-09-22 14:24 [PATCH v5 00/12] drivers: gpio: and the QIXIS FPGA GPIO controller Ioana Ciornei
@ 2025-09-22 14:24 ` Ioana Ciornei
2025-09-22 14:40 ` Bartosz Golaszewski
2025-09-22 14:24 ` [PATCH v5 02/12] dt-bindings: fsl,fpga-qixis-i2c: add support for LX2160ARDB FPGA Ioana Ciornei
` (11 subsequent siblings)
12 siblings, 1 reply; 24+ messages in thread
From: Ioana Ciornei @ 2025-09-22 14:24 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Linus Walleij,
Bartosz Golaszewski, Shawn Guo, Michael Walle, Lee Jones,
devicetree, linux-gpio, linux-kernel
Cc: Frank Li
Add a device tree binding for the QIXIS FPGA based GPIO controller.
Depending on the board, the QIXIS FPGA exposes registers which act as a
GPIO controller, each with 8 GPIO lines of fixed direction.
Since each QIXIS FPGA layout has its particularities, add a separate
compatible string for each board/GPIO register combination supported.
Since these GPIO controllers are trivial, make use of the newly added
trivial-gpio.yaml file instead of creating an entirely new one.
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
---
Changes in v2:
- Used the newly added trivial-gpio.yaml file
- Removed redundant "bindings" from commit title
- Added only one compatible string for the gpio controllers on
LX2160ARDB since both registers have the same layout.
Changes in v3:
- none
Changes in v4:
- none
Changes in v5:
- none
Documentation/devicetree/bindings/gpio/trivial-gpio.yaml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Documentation/devicetree/bindings/gpio/trivial-gpio.yaml b/Documentation/devicetree/bindings/gpio/trivial-gpio.yaml
index c994177de940..3f4bbd57fc52 100644
--- a/Documentation/devicetree/bindings/gpio/trivial-gpio.yaml
+++ b/Documentation/devicetree/bindings/gpio/trivial-gpio.yaml
@@ -22,6 +22,8 @@ properties:
- cznic,moxtet-gpio
- dlg,slg7xl45106
- fcs,fxl6408
+ - fsl,ls1046aqds-fpga-gpio-stat-pres2
+ - fsl,lx2160ardb-fpga-gpio-sfp
- gateworks,pld-gpio
- ibm,ppc4xx-gpio
- loongson,ls1x-gpio
--
2.25.1
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH v5 02/12] dt-bindings: fsl,fpga-qixis-i2c: add support for LX2160ARDB FPGA
2025-09-22 14:24 [PATCH v5 00/12] drivers: gpio: and the QIXIS FPGA GPIO controller Ioana Ciornei
2025-09-22 14:24 ` [PATCH v5 01/12] dt-bindings: gpio: add QIXIS FPGA based " Ioana Ciornei
@ 2025-09-22 14:24 ` Ioana Ciornei
2025-09-22 14:24 ` [PATCH v5 03/12] dt-bindings: fsl,fpga-qixis: describe the gpio child node found on LS1046AQDS Ioana Ciornei
` (10 subsequent siblings)
12 siblings, 0 replies; 24+ messages in thread
From: Ioana Ciornei @ 2025-09-22 14:24 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Linus Walleij,
Bartosz Golaszewski, Shawn Guo, Michael Walle, Lee Jones,
devicetree, linux-gpio, linux-kernel
Cc: Frank Li, Conor Dooley
Extend the list of supported compatible strings with fsl,lx2160ardb-fpga.
Since the register map exposed by the LX2160ARDB's FPGA also contains
two GPIO controllers, accept the necessary GPIO pattern property.
At the same time, add the #address-cells and #size-cells properties as
valid ones so that the child nodes of the fsl,lx2160ardb-fpga node are
addressable.
This is necessary because when defining child devices such as the GPIO
controller described in the added example, the child device needs a the
reg property to properly identify its register location in the parent
I2C device address space.
Impose this restriction for the new compatible through an if-statement.
The feature set exposed by these QIXIS FPGA devices is highly dependent
on the board type, meaning that even though the FPGA found on the
LX2160AQDS board (fsl,lx2160aqds-fpga) works in the same way in terms of
access over I2C as the one found on the LX2160ARDB (fsl,lx2160ardb-fpga
added here), the register map inside the device space is different since
there are different on-board devices to be controlled.
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
---
Changes in v2:
- Enforce a unit address on the child gpios nodes (remove the ?)
- Enforce the use of unit addresses by having #address-size and
#size-cells only for the newly added fsl,lx2160ardb-fpga compatible
Changes in v3:
- Replace the trivial-gpio reference with an explicit mention of the
accepted child gpio compatible.
- Reword the commit message.
- Add the 'else' case to the if statement.
Changes in v4:
- Add an extra paragraph in the commit message to better explain the
context.
Changes in v5:
- none
.../bindings/board/fsl,fpga-qixis-i2c.yaml | 58 +++++++++++++++++++
1 file changed, 58 insertions(+)
diff --git a/Documentation/devicetree/bindings/board/fsl,fpga-qixis-i2c.yaml b/Documentation/devicetree/bindings/board/fsl,fpga-qixis-i2c.yaml
index 28b37772fb65..e889dac052e7 100644
--- a/Documentation/devicetree/bindings/board/fsl,fpga-qixis-i2c.yaml
+++ b/Documentation/devicetree/bindings/board/fsl,fpga-qixis-i2c.yaml
@@ -22,6 +22,13 @@ properties:
- fsl,lx2160aqds-fpga
- const: fsl,fpga-qixis-i2c
- const: simple-mfd
+ - const: fsl,lx2160ardb-fpga
+
+ "#address-cells":
+ const: 1
+
+ "#size-cells":
+ const: 0
interrupts:
maxItems: 1
@@ -32,10 +39,37 @@ properties:
mux-controller:
$ref: /schemas/mux/reg-mux.yaml
+patternProperties:
+ "^gpio@[0-9a-f]+$":
+ type: object
+ additionalProperties: true
+
+ properties:
+ compatible:
+ contains:
+ enum:
+ - fsl,lx2160ardb-fpga-gpio-sfp
+
required:
- compatible
- reg
+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - fsl,lx2160ardb-fpga
+ then:
+ required:
+ - "#address-cells"
+ - "#size-cells"
+ else:
+ properties:
+ "#address-cells": false
+ "#size-cells": false
+
additionalProperties: false
examples:
@@ -68,3 +102,27 @@ examples:
};
};
+ - |
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ board-control@66 {
+ compatible = "fsl,lx2160ardb-fpga";
+ reg = <0x66>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ gpio@19 {
+ compatible = "fsl,lx2160ardb-fpga-gpio-sfp";
+ reg = <0x19>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ gpio-line-names =
+ "SFP2_TX_EN", "",
+ "", "",
+ "SFP2_RX_LOS", "SFP2_TX_FAULT",
+ "", "SFP2_MOD_ABS";
+ };
+ };
+ };
--
2.25.1
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH v5 03/12] dt-bindings: fsl,fpga-qixis: describe the gpio child node found on LS1046AQDS
2025-09-22 14:24 [PATCH v5 00/12] drivers: gpio: and the QIXIS FPGA GPIO controller Ioana Ciornei
2025-09-22 14:24 ` [PATCH v5 01/12] dt-bindings: gpio: add QIXIS FPGA based " Ioana Ciornei
2025-09-22 14:24 ` [PATCH v5 02/12] dt-bindings: fsl,fpga-qixis-i2c: add support for LX2160ARDB FPGA Ioana Ciornei
@ 2025-09-22 14:24 ` Ioana Ciornei
2025-09-23 14:37 ` Rob Herring (Arm)
2025-09-22 14:24 ` [PATCH v5 04/12] mfd: simple-mfd-i2c: keep compatible strings in alphabetical order Ioana Ciornei
` (9 subsequent siblings)
12 siblings, 1 reply; 24+ messages in thread
From: Ioana Ciornei @ 2025-09-22 14:24 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Linus Walleij,
Bartosz Golaszewski, Shawn Guo, Michael Walle, Lee Jones,
devicetree, linux-gpio, linux-kernel
Cc: Frank Li
Extend the list of accepted child nodes with the QIXIS FPGA based GPIO
controller and explicitly list its compatible string
fsl,ls1046aqds-fpga-gpio-stat-pres2 as the only one accepted.
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
---
Changes in v3:
- new patch
Changes in v4:
- none
Changes in v5:
- none
.../devicetree/bindings/board/fsl,fpga-qixis.yaml | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/Documentation/devicetree/bindings/board/fsl,fpga-qixis.yaml b/Documentation/devicetree/bindings/board/fsl,fpga-qixis.yaml
index 5a3cd431ef6e..2eacb581b9fd 100644
--- a/Documentation/devicetree/bindings/board/fsl,fpga-qixis.yaml
+++ b/Documentation/devicetree/bindings/board/fsl,fpga-qixis.yaml
@@ -57,6 +57,16 @@ patternProperties:
'^mdio-mux@[a-f0-9,]+$':
$ref: /schemas/net/mdio-mux-mmioreg.yaml
+ '^gpio@[0-9a-f]+$':
+ type: object
+ additionalProperties: true
+
+ properties:
+ compatible:
+ contains:
+ enum:
+ - fsl,ls1046aqds-fpga-gpio-stat-pres2
+
required:
- compatible
- reg
--
2.25.1
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH v5 04/12] mfd: simple-mfd-i2c: keep compatible strings in alphabetical order
2025-09-22 14:24 [PATCH v5 00/12] drivers: gpio: and the QIXIS FPGA GPIO controller Ioana Ciornei
` (2 preceding siblings ...)
2025-09-22 14:24 ` [PATCH v5 03/12] dt-bindings: fsl,fpga-qixis: describe the gpio child node found on LS1046AQDS Ioana Ciornei
@ 2025-09-22 14:24 ` Ioana Ciornei
2025-09-25 12:13 ` Lee Jones
2025-09-22 14:24 ` [PATCH v5 05/12] mfd: simple-mfd-i2c: add compatible string for LX2160ARDB Ioana Ciornei
` (8 subsequent siblings)
12 siblings, 1 reply; 24+ messages in thread
From: Ioana Ciornei @ 2025-09-22 14:24 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Linus Walleij,
Bartosz Golaszewski, Shawn Guo, Michael Walle, Lee Jones,
devicetree, linux-gpio, linux-kernel
Cc: Frank Li
Reorder the of_device_id structures so that they are in alphabetical
order.
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
---
Changes in v4:
- new patch
Changes in v5:
- none
drivers/mfd/simple-mfd-i2c.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/mfd/simple-mfd-i2c.c b/drivers/mfd/simple-mfd-i2c.c
index 63ac26388860..0cca7a9044cd 100644
--- a/drivers/mfd/simple-mfd-i2c.c
+++ b/drivers/mfd/simple-mfd-i2c.c
@@ -110,13 +110,13 @@ static const struct simple_mfd_data spacemit_p1 = {
};
static const struct of_device_id simple_mfd_i2c_of_match[] = {
+ { .compatible = "fsl,ls1028aqds-fpga" },
+ { .compatible = "fsl,lx2160aqds-fpga" },
{ .compatible = "kontron,sl28cpld" },
- { .compatible = "silergy,sy7636a", .data = &silergy_sy7636a},
{ .compatible = "maxim,max5970", .data = &maxim_max5970},
{ .compatible = "maxim,max5978", .data = &maxim_max5970},
{ .compatible = "maxim,max77705-battery", .data = &maxim_mon_max77705},
- { .compatible = "fsl,lx2160aqds-fpga" },
- { .compatible = "fsl,ls1028aqds-fpga" },
+ { .compatible = "silergy,sy7636a", .data = &silergy_sy7636a},
{ .compatible = "spacemit,p1", .data = &spacemit_p1, },
{}
};
--
2.25.1
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH v5 05/12] mfd: simple-mfd-i2c: add compatible string for LX2160ARDB
2025-09-22 14:24 [PATCH v5 00/12] drivers: gpio: and the QIXIS FPGA GPIO controller Ioana Ciornei
` (3 preceding siblings ...)
2025-09-22 14:24 ` [PATCH v5 04/12] mfd: simple-mfd-i2c: keep compatible strings in alphabetical order Ioana Ciornei
@ 2025-09-22 14:24 ` Ioana Ciornei
2025-09-22 14:24 ` [PATCH v5 06/12] gpio: regmap: fix memory leak of gpio_regmap structure Ioana Ciornei
` (7 subsequent siblings)
12 siblings, 0 replies; 24+ messages in thread
From: Ioana Ciornei @ 2025-09-22 14:24 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Linus Walleij,
Bartosz Golaszewski, Shawn Guo, Michael Walle, Lee Jones,
devicetree, linux-gpio, linux-kernel
Cc: Frank Li
Extend the list of supported devices with the QIXIS FPGA found on the
LX2160ARDB board.
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
---
Changes in v2:
- none
Changes in v3:
- none
Changes in v4:
- Insert the compatible so that the alphabetical order is kept.
Changes in v5:
- none
drivers/mfd/simple-mfd-i2c.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/mfd/simple-mfd-i2c.c b/drivers/mfd/simple-mfd-i2c.c
index 0cca7a9044cd..0a607a1e3ca1 100644
--- a/drivers/mfd/simple-mfd-i2c.c
+++ b/drivers/mfd/simple-mfd-i2c.c
@@ -112,6 +112,7 @@ static const struct simple_mfd_data spacemit_p1 = {
static const struct of_device_id simple_mfd_i2c_of_match[] = {
{ .compatible = "fsl,ls1028aqds-fpga" },
{ .compatible = "fsl,lx2160aqds-fpga" },
+ { .compatible = "fsl,lx2160ardb-fpga" },
{ .compatible = "kontron,sl28cpld" },
{ .compatible = "maxim,max5970", .data = &maxim_max5970},
{ .compatible = "maxim,max5978", .data = &maxim_max5970},
--
2.25.1
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH v5 06/12] gpio: regmap: fix memory leak of gpio_regmap structure
2025-09-22 14:24 [PATCH v5 00/12] drivers: gpio: and the QIXIS FPGA GPIO controller Ioana Ciornei
` (4 preceding siblings ...)
2025-09-22 14:24 ` [PATCH v5 05/12] mfd: simple-mfd-i2c: add compatible string for LX2160ARDB Ioana Ciornei
@ 2025-09-22 14:24 ` Ioana Ciornei
2025-09-22 14:31 ` Michael Walle
2025-09-22 14:24 ` [PATCH v5 07/12] gpio: regmap: add the .fixed_direction_output configuration parameter Ioana Ciornei
` (6 subsequent siblings)
12 siblings, 1 reply; 24+ messages in thread
From: Ioana Ciornei @ 2025-09-22 14:24 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Linus Walleij,
Bartosz Golaszewski, Shawn Guo, Michael Walle, Lee Jones,
devicetree, linux-gpio, linux-kernel
Cc: Frank Li
The gpio_regmap structure is leaked on the error path. Fix this by
jumping to the appropriate kfree instead of returning directly.
Fixes: db305161880a ("gpio: regmap: Allow ngpio to be read from the property")
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Suggested-by: Michael Walle <mwalle@kernel.org>
---
Changes in v5:
- new patch
drivers/gpio/gpio-regmap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpio/gpio-regmap.c b/drivers/gpio/gpio-regmap.c
index d9d23853e032..ab9e4077fa60 100644
--- a/drivers/gpio/gpio-regmap.c
+++ b/drivers/gpio/gpio-regmap.c
@@ -281,7 +281,7 @@ struct gpio_regmap *gpio_regmap_register(const struct gpio_regmap_config *config
if (!chip->ngpio) {
ret = gpiochip_get_ngpios(chip, chip->parent);
if (ret)
- return ERR_PTR(ret);
+ goto err_free_gpio;
}
/* if not set, assume there is only one register */
--
2.25.1
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH v5 07/12] gpio: regmap: add the .fixed_direction_output configuration parameter
2025-09-22 14:24 [PATCH v5 00/12] drivers: gpio: and the QIXIS FPGA GPIO controller Ioana Ciornei
` (5 preceding siblings ...)
2025-09-22 14:24 ` [PATCH v5 06/12] gpio: regmap: fix memory leak of gpio_regmap structure Ioana Ciornei
@ 2025-09-22 14:24 ` Ioana Ciornei
2025-09-22 14:32 ` Michael Walle
2025-09-22 14:39 ` Bartosz Golaszewski
2025-09-22 14:24 ` [PATCH v5 08/12] gpio: add QIXIS FPGA GPIO controller Ioana Ciornei
` (5 subsequent siblings)
12 siblings, 2 replies; 24+ messages in thread
From: Ioana Ciornei @ 2025-09-22 14:24 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Linus Walleij,
Bartosz Golaszewski, Shawn Guo, Michael Walle, Lee Jones,
devicetree, linux-gpio, linux-kernel
Cc: Frank Li
There are GPIO controllers such as the one present in the LX2160ARDB
QIXIS FPGA which have fixed-direction input and output GPIO lines mixed
together in a single register. This cannot be modeled using the
gpio-regmap as-is since there is no way to present the true direction of
a GPIO line.
In order to make this use case possible, add a new configuration
parameter - fixed_direction_output - into the gpio_regmap_config
structure. This will enable user drivers to provide a bitmap that
represents the fixed direction of the GPIO lines.
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
---
Changes in v2:
- Add the fixed_direction_output bitmap to the gpio_regmap_config
Changes in v3:
- Make a deep copy of the new bitmap.
- Remove the offset check against the ngpio.
- Added documentation for the new config field.
Changes in v4:
- Replace devres bitmap allocation with bitmap_alloc() and
bitmap_free().
Changes in v5:
- Rebased on top of latest linux-next, change the extra goto statement.
drivers/gpio/gpio-regmap.c | 26 ++++++++++++++++++++++++--
include/linux/gpio/regmap.h | 5 +++++
2 files changed, 29 insertions(+), 2 deletions(-)
diff --git a/drivers/gpio/gpio-regmap.c b/drivers/gpio/gpio-regmap.c
index ab9e4077fa60..f4267af00027 100644
--- a/drivers/gpio/gpio-regmap.c
+++ b/drivers/gpio/gpio-regmap.c
@@ -31,6 +31,7 @@ struct gpio_regmap {
unsigned int reg_clr_base;
unsigned int reg_dir_in_base;
unsigned int reg_dir_out_base;
+ unsigned long *fixed_direction_output;
#ifdef CONFIG_REGMAP_IRQ
int regmap_irq_line;
@@ -134,6 +135,13 @@ static int gpio_regmap_get_direction(struct gpio_chip *chip,
unsigned int base, val, reg, mask;
int invert, ret;
+ if (gpio->fixed_direction_output) {
+ if (test_bit(offset, gpio->fixed_direction_output))
+ return GPIO_LINE_DIRECTION_OUT;
+ else
+ return GPIO_LINE_DIRECTION_IN;
+ }
+
if (gpio->reg_dat_base && !gpio->reg_set_base)
return GPIO_LINE_DIRECTION_IN;
if (gpio->reg_set_base && !gpio->reg_dat_base)
@@ -284,6 +292,17 @@ struct gpio_regmap *gpio_regmap_register(const struct gpio_regmap_config *config
goto err_free_gpio;
}
+ if (config->fixed_direction_output) {
+ gpio->fixed_direction_output = bitmap_alloc(chip->ngpio,
+ GFP_KERNEL);
+ if (!gpio->fixed_direction_output) {
+ ret = -ENOMEM;
+ goto err_free_gpio;
+ }
+ bitmap_copy(gpio->fixed_direction_output,
+ config->fixed_direction_output, chip->ngpio);
+ }
+
/* if not set, assume there is only one register */
gpio->ngpio_per_reg = config->ngpio_per_reg;
if (!gpio->ngpio_per_reg)
@@ -300,7 +319,7 @@ struct gpio_regmap *gpio_regmap_register(const struct gpio_regmap_config *config
ret = gpiochip_add_data(chip, gpio);
if (ret < 0)
- goto err_free_gpio;
+ goto err_free_bitmap;
#ifdef CONFIG_REGMAP_IRQ
if (config->regmap_irq_chip) {
@@ -309,7 +328,7 @@ struct gpio_regmap *gpio_regmap_register(const struct gpio_regmap_config *config
config->regmap_irq_line, config->regmap_irq_flags,
0, config->regmap_irq_chip, &gpio->irq_chip_data);
if (ret)
- goto err_free_gpio;
+ goto err_free_bitmap;
irq_domain = regmap_irq_get_domain(gpio->irq_chip_data);
} else
@@ -326,6 +345,8 @@ struct gpio_regmap *gpio_regmap_register(const struct gpio_regmap_config *config
err_remove_gpiochip:
gpiochip_remove(chip);
+err_free_bitmap:
+ bitmap_free(gpio->fixed_direction_output);
err_free_gpio:
kfree(gpio);
return ERR_PTR(ret);
@@ -344,6 +365,7 @@ void gpio_regmap_unregister(struct gpio_regmap *gpio)
#endif
gpiochip_remove(&gpio->gpio_chip);
+ bitmap_free(gpio->fixed_direction_output);
kfree(gpio);
}
EXPORT_SYMBOL_GPL(gpio_regmap_unregister);
diff --git a/include/linux/gpio/regmap.h b/include/linux/gpio/regmap.h
index 622a2939ebe0..87983a5f3681 100644
--- a/include/linux/gpio/regmap.h
+++ b/include/linux/gpio/regmap.h
@@ -38,6 +38,10 @@ struct regmap;
* offset to a register/bitmask pair. If not
* given the default gpio_regmap_simple_xlate()
* is used.
+ * @fixed_direction_output:
+ * (Optional) Bitmap representing the fixed direction of
+ * the GPIO lines. Useful when there are GPIO lines with a
+ * fixed direction mixed together in the same register.
* @drvdata: (Optional) Pointer to driver specific data which is
* not used by gpio-remap but is provided "as is" to the
* driver callback(s).
@@ -85,6 +89,7 @@ struct gpio_regmap_config {
int reg_stride;
int ngpio_per_reg;
struct irq_domain *irq_domain;
+ unsigned long *fixed_direction_output;
#ifdef CONFIG_REGMAP_IRQ
struct regmap_irq_chip *regmap_irq_chip;
--
2.25.1
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH v5 08/12] gpio: add QIXIS FPGA GPIO controller
2025-09-22 14:24 [PATCH v5 00/12] drivers: gpio: and the QIXIS FPGA GPIO controller Ioana Ciornei
` (6 preceding siblings ...)
2025-09-22 14:24 ` [PATCH v5 07/12] gpio: regmap: add the .fixed_direction_output configuration parameter Ioana Ciornei
@ 2025-09-22 14:24 ` Ioana Ciornei
2025-09-22 14:34 ` Michael Walle
` (2 more replies)
2025-09-22 14:24 ` [PATCH v5 09/12] arm64: dts: lx2160a-rdb: describe the QIXIS FPGA and two child GPIO controllers Ioana Ciornei
` (4 subsequent siblings)
12 siblings, 3 replies; 24+ messages in thread
From: Ioana Ciornei @ 2025-09-22 14:24 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Linus Walleij,
Bartosz Golaszewski, Shawn Guo, Michael Walle, Lee Jones,
devicetree, linux-gpio, linux-kernel
Cc: Frank Li
Add support for the GPIO controller found on some QIXIS FPGAs in
Layerscape boards such as LX2160ARDB and LS1046AQDS. This driver is
using gpio-regmap.
A GPIO controller has a maximum of 8 lines (all found in the same
register). Even within the same controller, the GPIO lines' direction is
fixed, which mean that both input and output lines are found in the same
register. This is why the driver also passed to gpio-regmap the newly
added .fixed_direction_output bitmap to represent the true direction of
the lines.
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
---
Changes in v2:
- Use the newly added .fixed_direction_output bitmap representing
the fixed direction of the GPIO lines.
Changes in v3:
- Remove 'drivers' from the commit title.
- Remove the qixis_cpld_gpio_type enum since its not needed.
- Remove the NULL check for device_get_match_data().
- Use a bitmap declared on the stack as the config field passed to
gpio-regmap.
Changes in v4:
- none
Changes in v5:
- none
drivers/gpio/Kconfig | 9 +++
drivers/gpio/Makefile | 1 +
drivers/gpio/gpio-qixis-fpga.c | 107 +++++++++++++++++++++++++++++++++
3 files changed, 117 insertions(+)
create mode 100644 drivers/gpio/gpio-qixis-fpga.c
diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
index 7ee3afbc2b05..c9f18ef3cc3d 100644
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -1986,6 +1986,15 @@ config GPIO_LATCH
Say yes here to enable a driver for GPIO multiplexers based on latches
connected to other GPIOs.
+config GPIO_QIXIS_FPGA
+ tristate "NXP QIXIS FPGA GPIO support"
+ depends on MFD_SIMPLE_MFD_I2C || COMPILE_TEST
+ select GPIO_REGMAP
+ help
+ This enables support for the GPIOs found in the QIXIS FPGA which is
+ integrated on some NXP Layerscape boards such as LX2160ARDB and
+ LS1046AQDS.
+
config GPIO_MOCKUP
tristate "GPIO Testing Driver (DEPRECATED)"
select IRQ_SIM
diff --git a/drivers/gpio/Makefile b/drivers/gpio/Makefile
index ec296fa14bfd..ee260a0809d3 100644
--- a/drivers/gpio/Makefile
+++ b/drivers/gpio/Makefile
@@ -146,6 +146,7 @@ obj-$(CONFIG_GPIO_PL061) += gpio-pl061.o
obj-$(CONFIG_GPIO_PMIC_EIC_SPRD) += gpio-pmic-eic-sprd.o
obj-$(CONFIG_GPIO_POLARFIRE_SOC) += gpio-mpfs.o
obj-$(CONFIG_GPIO_PXA) += gpio-pxa.o
+obj-$(CONFIG_GPIO_QIXIS_FPGA) += gpio-qixis-fpga.o
obj-$(CONFIG_GPIO_RASPBERRYPI_EXP) += gpio-raspberrypi-exp.o
obj-$(CONFIG_GPIO_RC5T583) += gpio-rc5t583.o
obj-$(CONFIG_GPIO_RCAR) += gpio-rcar.o
diff --git a/drivers/gpio/gpio-qixis-fpga.c b/drivers/gpio/gpio-qixis-fpga.c
new file mode 100644
index 000000000000..048a2cac4f0f
--- /dev/null
+++ b/drivers/gpio/gpio-qixis-fpga.c
@@ -0,0 +1,107 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Layerscape GPIO QIXIS FPGA driver
+ *
+ * Copyright 2025 NXP
+ */
+
+#include <linux/device.h>
+#include <linux/gpio/driver.h>
+#include <linux/gpio/regmap.h>
+#include <linux/kernel.h>
+#include <linux/mod_devicetable.h>
+#include <linux/module.h>
+#include <linux/platform_device.h>
+#include <linux/regmap.h>
+
+struct qixis_cpld_gpio_config {
+ u64 output_lines;
+};
+
+static const struct qixis_cpld_gpio_config lx2160ardb_sfp_cfg = {
+ .output_lines = BIT(0),
+};
+
+static const struct qixis_cpld_gpio_config ls1046aqds_stat_pres2_cfg = {
+ .output_lines = 0x0,
+};
+
+static const struct regmap_config regmap_config_8r_8v = {
+ .reg_bits = 8,
+ .val_bits = 8,
+};
+
+static int qixis_cpld_gpio_probe(struct platform_device *pdev)
+{
+ DECLARE_BITMAP(fixed_direction_output, 8);
+ const struct qixis_cpld_gpio_config *cfg;
+ struct gpio_regmap_config config = {0};
+ struct regmap *regmap;
+ void __iomem *reg;
+ u32 base;
+ int ret;
+
+ if (!pdev->dev.parent)
+ return -ENODEV;
+
+ cfg = device_get_match_data(&pdev->dev);
+
+ ret = device_property_read_u32(&pdev->dev, "reg", &base);
+ if (ret)
+ return ret;
+
+ regmap = dev_get_regmap(pdev->dev.parent, NULL);
+ if (!regmap) {
+ /* In case there is no regmap configured by the parent device,
+ * create our own from the MMIO space.
+ */
+ reg = devm_platform_ioremap_resource(pdev, 0);
+ if (!reg)
+ return -ENODEV;
+
+ regmap = devm_regmap_init_mmio(&pdev->dev, reg, ®map_config_8r_8v);
+ if (!regmap)
+ return -ENODEV;
+
+ /* In this case, the offset of our register is 0 inside the
+ * regmap area that we just created.
+ */
+ base = 0;
+ }
+ config.reg_dat_base = GPIO_REGMAP_ADDR(base);
+ config.reg_set_base = GPIO_REGMAP_ADDR(base);
+
+ config.drvdata = (void *)cfg;
+ config.regmap = regmap;
+ config.parent = &pdev->dev;
+ config.ngpio_per_reg = 8;
+ config.ngpio = 8;
+
+ bitmap_from_u64(fixed_direction_output, cfg->output_lines);
+ config.fixed_direction_output = fixed_direction_output;
+
+ return PTR_ERR_OR_ZERO(devm_gpio_regmap_register(&pdev->dev, &config));
+}
+
+static const struct of_device_id qixis_cpld_gpio_of_match[] = {
+ {
+ .compatible = "fsl,lx2160ardb-fpga-gpio-sfp",
+ .data = &lx2160ardb_sfp_cfg,
+ },
+ {
+ .compatible = "fsl,ls1046aqds-fpga-gpio-stat-pres2",
+ .data = &ls1046aqds_stat_pres2_cfg,
+ },
+
+ {}
+};
+MODULE_DEVICE_TABLE(of, qixis_cpld_gpio_of_match);
+
+static struct platform_driver qixis_cpld_gpio_driver = {
+ .probe = qixis_cpld_gpio_probe,
+ .driver = {
+ .name = "gpio-qixis-cpld",
+ .of_match_table = qixis_cpld_gpio_of_match,
+ },
+};
+module_platform_driver(qixis_cpld_gpio_driver);
--
2.25.1
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH v5 09/12] arm64: dts: lx2160a-rdb: describe the QIXIS FPGA and two child GPIO controllers
2025-09-22 14:24 [PATCH v5 00/12] drivers: gpio: and the QIXIS FPGA GPIO controller Ioana Ciornei
` (7 preceding siblings ...)
2025-09-22 14:24 ` [PATCH v5 08/12] gpio: add QIXIS FPGA GPIO controller Ioana Ciornei
@ 2025-09-22 14:24 ` Ioana Ciornei
2025-09-22 14:24 ` [PATCH v5 10/12] arm64: dts: ls1046a-qds: describe the FPGA based GPIO controller Ioana Ciornei
` (3 subsequent siblings)
12 siblings, 0 replies; 24+ messages in thread
From: Ioana Ciornei @ 2025-09-22 14:24 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Linus Walleij,
Bartosz Golaszewski, Shawn Guo, Michael Walle, Lee Jones,
devicetree, linux-gpio, linux-kernel
Cc: Frank Li
Describe the FPGA present on the LX2160ARDB board as a simple-mfd I2C
device. The FPGA presents registers that deal with power-on-reset
timing, muxing, SFP cage monitoring and control etc.
Also add the two GPIO controllers responsible for monitoring and
controlling the SFP+ cages used for MAC5 and MAC6.
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
---
Changes in v2:
- Use the same compatible string for both GPIO controller nodes.
Changes in v3:
- none
Changes in v4:
- none
Changes in v5:
- none
.../boot/dts/freescale/fsl-lx2160a-rdb.dts | 31 +++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/arch/arm64/boot/dts/freescale/fsl-lx2160a-rdb.dts b/arch/arm64/boot/dts/freescale/fsl-lx2160a-rdb.dts
index 0c44b3cbef77..4ede1295f29d 100644
--- a/arch/arm64/boot/dts/freescale/fsl-lx2160a-rdb.dts
+++ b/arch/arm64/boot/dts/freescale/fsl-lx2160a-rdb.dts
@@ -170,6 +170,37 @@ mt35xu512aba1: flash@1 {
&i2c0 {
status = "okay";
+ cpld@66 {
+ compatible = "fsl,lx2160ardb-fpga";
+ reg = <0x66>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ sfp2_csr: gpio@19 {
+ compatible = "fsl,lx2160ardb-fpga-gpio-sfp";
+ reg = <0x19>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ gpio-line-names =
+ "SFP2_TX_EN", "",
+ "", "",
+ "SFP2_RX_LOS", "SFP2_TX_FAULT",
+ "", "SFP2_MOD_ABS";
+ };
+
+ sfp3_csr: gpio@1a {
+ compatible = "fsl,lx2160ardb-fpga-gpio-sfp";
+ reg = <0x1a>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ gpio-line-names =
+ "SFP3_TX_EN", "",
+ "", "",
+ "SFP3_RX_LOS", "SFP3_TX_FAULT",
+ "", "SFP3_MOD_ABS";
+ };
+ };
+
i2c-mux@77 {
compatible = "nxp,pca9547";
reg = <0x77>;
--
2.25.1
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH v5 10/12] arm64: dts: ls1046a-qds: describe the FPGA based GPIO controller
2025-09-22 14:24 [PATCH v5 00/12] drivers: gpio: and the QIXIS FPGA GPIO controller Ioana Ciornei
` (8 preceding siblings ...)
2025-09-22 14:24 ` [PATCH v5 09/12] arm64: dts: lx2160a-rdb: describe the QIXIS FPGA and two child GPIO controllers Ioana Ciornei
@ 2025-09-22 14:24 ` Ioana Ciornei
2025-09-22 14:24 ` [PATCH v5 11/12] arm64: dts: lx2160a-rdb: fully describe the two SFP+ cages Ioana Ciornei
` (2 subsequent siblings)
12 siblings, 0 replies; 24+ messages in thread
From: Ioana Ciornei @ 2025-09-22 14:24 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Linus Walleij,
Bartosz Golaszewski, Shawn Guo, Michael Walle, Lee Jones,
devicetree, linux-gpio, linux-kernel
Cc: Frank Li
The QIXIS FPGA node is extended so that it describes the GPIO controller
responsible for all the status presence lines on both SFP+ cages as well
as the IO SLOTs present on the board.
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
---
Changes in v2:
- none
Changes in v3:
- none
Changes in v4:
- none
Changes in v5:
- none
arch/arm64/boot/dts/freescale/fsl-ls1046a-qds.dts | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1046a-qds.dts b/arch/arm64/boot/dts/freescale/fsl-ls1046a-qds.dts
index 736722b58e77..812cf1c5d7f4 100644
--- a/arch/arm64/boot/dts/freescale/fsl-ls1046a-qds.dts
+++ b/arch/arm64/boot/dts/freescale/fsl-ls1046a-qds.dts
@@ -166,8 +166,20 @@ nand@1,0 {
fpga: board-control@2,0 {
compatible = "fsl,ls1046aqds-fpga", "fsl,fpga-qixis", "simple-mfd";
+ #address-cells = <1>;
+ #size-cells = <1>;
reg = <0x2 0x0 0x0000100>;
ranges = <0 2 0 0x100>;
+
+ stat_pres2: gpio@c {
+ compatible = "fsl,ls1046aqds-fpga-gpio-stat-pres2";
+ reg = <0xc 1>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ gpio-line-names =
+ "SLOT1", "SLOT2", "SLOT3", "SLOT4", "SLOT5", "SLOT6",
+ "SFP1_MOD_DEF", "SFP2_MOD_DEF";
+ };
};
};
--
2.25.1
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH v5 11/12] arm64: dts: lx2160a-rdb: fully describe the two SFP+ cages
2025-09-22 14:24 [PATCH v5 00/12] drivers: gpio: and the QIXIS FPGA GPIO controller Ioana Ciornei
` (9 preceding siblings ...)
2025-09-22 14:24 ` [PATCH v5 10/12] arm64: dts: ls1046a-qds: describe the FPGA based GPIO controller Ioana Ciornei
@ 2025-09-22 14:24 ` Ioana Ciornei
2025-09-22 14:24 ` [PATCH v5 12/12] arm64: dts: ls1046a-qds: describe the two on-board " Ioana Ciornei
2025-09-22 14:36 ` (subset) [PATCH v5 00/12] drivers: gpio: and the QIXIS FPGA GPIO controller Bartosz Golaszewski
12 siblings, 0 replies; 24+ messages in thread
From: Ioana Ciornei @ 2025-09-22 14:24 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Linus Walleij,
Bartosz Golaszewski, Shawn Guo, Michael Walle, Lee Jones,
devicetree, linux-gpio, linux-kernel
Cc: Frank Li
Describe the two SFP+ cages found on the LX2160ARDB board with their
respective I2C buses and GPIO lines.
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
---
Changes in v2:
- none
Changes in v3:
- Moved the reg property before address/cells-size.
Changes in v4:
- none
Changes in v5:
- none
.../boot/dts/freescale/fsl-lx2160a-rdb.dts | 47 +++++++++++++++++++
1 file changed, 47 insertions(+)
diff --git a/arch/arm64/boot/dts/freescale/fsl-lx2160a-rdb.dts b/arch/arm64/boot/dts/freescale/fsl-lx2160a-rdb.dts
index 4ede1295f29d..1c1ed0c5f016 100644
--- a/arch/arm64/boot/dts/freescale/fsl-lx2160a-rdb.dts
+++ b/arch/arm64/boot/dts/freescale/fsl-lx2160a-rdb.dts
@@ -31,6 +31,28 @@ sb_3v3: regulator-sb3v3 {
regulator-boot-on;
regulator-always-on;
};
+
+ sfp2: sfp-2 {
+ compatible = "sff,sfp";
+ i2c-bus = <&sfp2_i2c>;
+ maximum-power-milliwatt = <2000>;
+ /* Leave commented out if using DPMAC_LINK_TYPE_FIXED mode */
+ /* tx-disable-gpios = <&sfp2_csr 0 GPIO_ACTIVE_HIGH>; */
+ los-gpios = <&sfp2_csr 4 GPIO_ACTIVE_HIGH>;
+ tx-fault-gpios = <&sfp2_csr 5 GPIO_ACTIVE_HIGH>;
+ mod-def0-gpios = <&sfp2_csr 7 GPIO_ACTIVE_LOW>;
+ };
+
+ sfp3: sfp-3 {
+ compatible = "sff,sfp";
+ i2c-bus = <&sfp3_i2c>;
+ maximum-power-milliwatt = <2000>;
+ /* Leave commented out if using DPMAC_LINK_TYPE_FIXED mode */
+ /* tx-disable-gpios = <&sfp3_csr 0 GPIO_ACTIVE_HIGH>; */
+ los-gpios = <&sfp3_csr 4 GPIO_ACTIVE_HIGH>;
+ tx-fault-gpios = <&sfp3_csr 5 GPIO_ACTIVE_HIGH>;
+ mod-def0-gpios = <&sfp3_csr 7 GPIO_ACTIVE_LOW>;
+ };
};
&crypto {
@@ -236,6 +258,31 @@ temperature-sensor@4d {
vcc-supply = <&sb_3v3>;
};
};
+
+ i2c@7 {
+ reg = <0x7>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ i2c-mux@75 {
+ compatible = "nxp,pca9547";
+ reg = <0x75>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ sfp2_i2c: i2c@4 {
+ reg = <0x4>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+
+ sfp3_i2c: i2c@5 {
+ reg = <0x5>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+ };
};
};
--
2.25.1
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH v5 12/12] arm64: dts: ls1046a-qds: describe the two on-board SFP+ cages
2025-09-22 14:24 [PATCH v5 00/12] drivers: gpio: and the QIXIS FPGA GPIO controller Ioana Ciornei
` (10 preceding siblings ...)
2025-09-22 14:24 ` [PATCH v5 11/12] arm64: dts: lx2160a-rdb: fully describe the two SFP+ cages Ioana Ciornei
@ 2025-09-22 14:24 ` Ioana Ciornei
2025-09-22 14:36 ` (subset) [PATCH v5 00/12] drivers: gpio: and the QIXIS FPGA GPIO controller Bartosz Golaszewski
12 siblings, 0 replies; 24+ messages in thread
From: Ioana Ciornei @ 2025-09-22 14:24 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Linus Walleij,
Bartosz Golaszewski, Shawn Guo, Michael Walle, Lee Jones,
devicetree, linux-gpio, linux-kernel
Cc: Frank Li
Describe the two SFP+ cages present on the LS1046AQDS board and their
associated I2C buses and GPIO lines.
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
---
Changes in v2:
- none
Changes in v3:
- Moved the reg property before address/cells-size.
Changes in v4:
- none
Changes in v5:
- none
.../boot/dts/freescale/fsl-ls1046a-qds.dts | 40 +++++++++++++++++++
1 file changed, 40 insertions(+)
diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1046a-qds.dts b/arch/arm64/boot/dts/freescale/fsl-ls1046a-qds.dts
index 812cf1c5d7f4..48a6c08fcea8 100644
--- a/arch/arm64/boot/dts/freescale/fsl-ls1046a-qds.dts
+++ b/arch/arm64/boot/dts/freescale/fsl-ls1046a-qds.dts
@@ -42,6 +42,21 @@ aliases {
chosen {
stdout-path = "serial0:115200n8";
};
+
+ sfp1: sfp-1 {
+ compatible = "sff,sfp";
+ i2c-bus = <&sfp1_i2c>;
+ maximum-power-milliwatt = <2000>;
+ mod-def0-gpios = <&stat_pres2 6 GPIO_ACTIVE_LOW>;
+ };
+
+ sfp2: sfp-2 {
+ compatible = "sff,sfp";
+ i2c-bus = <&sfp2_i2c>;
+ maximum-power-milliwatt = <2000>;
+ mod-def0-gpios = <&stat_pres2 7 GPIO_ACTIVE_LOW>;
+ };
+
};
&dspi {
@@ -139,6 +154,31 @@ temp-sensor@4c {
reg = <0x4c>;
};
};
+
+ i2c@7 {
+ reg = <0x7>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ i2c-mux@76 {
+ compatible = "nxp,pca9547";
+ reg = <0x76>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ sfp1_i2c: i2c@6 {
+ reg = <0x6>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+
+ sfp2_i2c: i2c@7 {
+ reg = <0x7>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+ };
};
};
--
2.25.1
^ permalink raw reply related [flat|nested] 24+ messages in thread
* Re: [PATCH v5 06/12] gpio: regmap: fix memory leak of gpio_regmap structure
2025-09-22 14:24 ` [PATCH v5 06/12] gpio: regmap: fix memory leak of gpio_regmap structure Ioana Ciornei
@ 2025-09-22 14:31 ` Michael Walle
0 siblings, 0 replies; 24+ messages in thread
From: Michael Walle @ 2025-09-22 14:31 UTC (permalink / raw)
To: Ioana Ciornei, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Linus Walleij, Bartosz Golaszewski, Shawn Guo, Lee Jones,
devicetree, linux-gpio, linux-kernel
Cc: Frank Li
[-- Attachment #1: Type: text/plain, Size: 379 bytes --]
> The gpio_regmap structure is leaked on the error path. Fix this by
> jumping to the appropriate kfree instead of returning directly.
>
> Fixes: db305161880a ("gpio: regmap: Allow ngpio to be read from the property")
> Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
> Suggested-by: Michael Walle <mwalle@kernel.org>
Reviewed-by: Michael Walle <mwalle@kernel.org>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 297 bytes --]
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH v5 07/12] gpio: regmap: add the .fixed_direction_output configuration parameter
2025-09-22 14:24 ` [PATCH v5 07/12] gpio: regmap: add the .fixed_direction_output configuration parameter Ioana Ciornei
@ 2025-09-22 14:32 ` Michael Walle
2025-09-22 14:39 ` Bartosz Golaszewski
1 sibling, 0 replies; 24+ messages in thread
From: Michael Walle @ 2025-09-22 14:32 UTC (permalink / raw)
To: Ioana Ciornei, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Linus Walleij, Bartosz Golaszewski, Shawn Guo, Lee Jones,
devicetree, linux-gpio, linux-kernel
Cc: Frank Li
[-- Attachment #1: Type: text/plain, Size: 676 bytes --]
> There are GPIO controllers such as the one present in the LX2160ARDB
> QIXIS FPGA which have fixed-direction input and output GPIO lines mixed
> together in a single register. This cannot be modeled using the
> gpio-regmap as-is since there is no way to present the true direction of
> a GPIO line.
>
> In order to make this use case possible, add a new configuration
> parameter - fixed_direction_output - into the gpio_regmap_config
> structure. This will enable user drivers to provide a bitmap that
> represents the fixed direction of the GPIO lines.
>
> Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Reviewed-by: Michael Walle <mwalle@kernel.org>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 297 bytes --]
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH v5 08/12] gpio: add QIXIS FPGA GPIO controller
2025-09-22 14:24 ` [PATCH v5 08/12] gpio: add QIXIS FPGA GPIO controller Ioana Ciornei
@ 2025-09-22 14:34 ` Michael Walle
2025-09-22 14:39 ` Bartosz Golaszewski
2025-09-30 23:00 ` Linus Walleij
2 siblings, 0 replies; 24+ messages in thread
From: Michael Walle @ 2025-09-22 14:34 UTC (permalink / raw)
To: Ioana Ciornei, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Linus Walleij, Bartosz Golaszewski, Shawn Guo, Lee Jones,
devicetree, linux-gpio, linux-kernel
Cc: Frank Li
[-- Attachment #1: Type: text/plain, Size: 727 bytes --]
> Add support for the GPIO controller found on some QIXIS FPGAs in
> Layerscape boards such as LX2160ARDB and LS1046AQDS. This driver is
> using gpio-regmap.
>
> A GPIO controller has a maximum of 8 lines (all found in the same
> register). Even within the same controller, the GPIO lines' direction is
> fixed, which mean that both input and output lines are found in the same
> register. This is why the driver also passed to gpio-regmap the newly
> added .fixed_direction_output bitmap to represent the true direction of
> the lines.
>
> Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
> Reviewed-by: Frank Li <Frank.Li@nxp.com>
Reviewed-by: Michael Walle <mwalle@kernel.org> # for the gpio-regmap part
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 297 bytes --]
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: (subset) [PATCH v5 00/12] drivers: gpio: and the QIXIS FPGA GPIO controller
2025-09-22 14:24 [PATCH v5 00/12] drivers: gpio: and the QIXIS FPGA GPIO controller Ioana Ciornei
` (11 preceding siblings ...)
2025-09-22 14:24 ` [PATCH v5 12/12] arm64: dts: ls1046a-qds: describe the two on-board " Ioana Ciornei
@ 2025-09-22 14:36 ` Bartosz Golaszewski
2025-09-22 14:41 ` Ioana Ciornei
12 siblings, 1 reply; 24+ messages in thread
From: Bartosz Golaszewski @ 2025-09-22 14:36 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Linus Walleij,
Bartosz Golaszewski, Shawn Guo, Michael Walle, Lee Jones,
devicetree, linux-gpio, linux-kernel, Ioana Ciornei
Cc: Bartosz Golaszewski, Frank Li
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
On Mon, 22 Sep 2025 17:24:15 +0300, Ioana Ciornei wrote:
> 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.
>
> [...]
It's too late into the cycle for the entire series to make the v6.18 merge
window but I queued this for fixes and will send it for v6.17.
[06/12] gpio: regmap: fix memory leak of gpio_regmap structure
https://git.kernel.org/brgl/linux/c/3bd44edd6c55828fd4e11cb0efce5b7160bfa2de
Best regards,
--
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH v5 07/12] gpio: regmap: add the .fixed_direction_output configuration parameter
2025-09-22 14:24 ` [PATCH v5 07/12] gpio: regmap: add the .fixed_direction_output configuration parameter Ioana Ciornei
2025-09-22 14:32 ` Michael Walle
@ 2025-09-22 14:39 ` Bartosz Golaszewski
1 sibling, 0 replies; 24+ messages in thread
From: Bartosz Golaszewski @ 2025-09-22 14:39 UTC (permalink / raw)
To: Ioana Ciornei
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Linus Walleij,
Bartosz Golaszewski, Shawn Guo, Michael Walle, Lee Jones,
devicetree, linux-gpio, linux-kernel, Frank Li
On Mon, 22 Sep 2025 16:24:22 +0200, Ioana Ciornei <ioana.ciornei@nxp.com> said:
> There are GPIO controllers such as the one present in the LX2160ARDB
> QIXIS FPGA which have fixed-direction input and output GPIO lines mixed
> together in a single register. This cannot be modeled using the
> gpio-regmap as-is since there is no way to present the true direction of
> a GPIO line.
>
> In order to make this use case possible, add a new configuration
> parameter - fixed_direction_output - into the gpio_regmap_config
> structure. This will enable user drivers to provide a bitmap that
> represents the fixed direction of the GPIO lines.
>
> Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
> ---
> Changes in v2:
> - Add the fixed_direction_output bitmap to the gpio_regmap_config
> Changes in v3:
> - Make a deep copy of the new bitmap.
> - Remove the offset check against the ngpio.
> - Added documentation for the new config field.
> Changes in v4:
> - Replace devres bitmap allocation with bitmap_alloc() and
> bitmap_free().
> Changes in v5:
> - Rebased on top of latest linux-next, change the extra goto statement.
>
Acked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH v5 08/12] gpio: add QIXIS FPGA GPIO controller
2025-09-22 14:24 ` [PATCH v5 08/12] gpio: add QIXIS FPGA GPIO controller Ioana Ciornei
2025-09-22 14:34 ` Michael Walle
@ 2025-09-22 14:39 ` Bartosz Golaszewski
2025-09-30 23:00 ` Linus Walleij
2 siblings, 0 replies; 24+ messages in thread
From: Bartosz Golaszewski @ 2025-09-22 14:39 UTC (permalink / raw)
To: Ioana Ciornei
Cc: Frank Li, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Linus Walleij, Bartosz Golaszewski, Shawn Guo, Michael Walle,
Lee Jones, devicetree, linux-gpio, linux-kernel
On Mon, 22 Sep 2025 16:24:23 +0200, Ioana Ciornei <ioana.ciornei@nxp.com> said:
> Add support for the GPIO controller found on some QIXIS FPGAs in
> Layerscape boards such as LX2160ARDB and LS1046AQDS. This driver is
> using gpio-regmap.
>
> A GPIO controller has a maximum of 8 lines (all found in the same
> register). Even within the same controller, the GPIO lines' direction is
> fixed, which mean that both input and output lines are found in the same
> register. This is why the driver also passed to gpio-regmap the newly
> added .fixed_direction_output bitmap to represent the true direction of
> the lines.
>
> Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
> Reviewed-by: Frank Li <Frank.Li@nxp.com>
> ---
> Changes in v2:
> - Use the newly added .fixed_direction_output bitmap representing
> the fixed direction of the GPIO lines.
> Changes in v3:
> - Remove 'drivers' from the commit title.
> - Remove the qixis_cpld_gpio_type enum since its not needed.
> - Remove the NULL check for device_get_match_data().
> - Use a bitmap declared on the stack as the config field passed to
> gpio-regmap.
> Changes in v4:
> - none
> Changes in v5:
> - none
>
Acked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH v5 01/12] dt-bindings: gpio: add QIXIS FPGA based GPIO controller
2025-09-22 14:24 ` [PATCH v5 01/12] dt-bindings: gpio: add QIXIS FPGA based " Ioana Ciornei
@ 2025-09-22 14:40 ` Bartosz Golaszewski
0 siblings, 0 replies; 24+ messages in thread
From: Bartosz Golaszewski @ 2025-09-22 14:40 UTC (permalink / raw)
To: Ioana Ciornei
Cc: Frank Li, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Linus Walleij, Bartosz Golaszewski, Shawn Guo, Michael Walle,
Lee Jones, devicetree, linux-gpio, linux-kernel
On Mon, 22 Sep 2025 16:24:16 +0200, Ioana Ciornei <ioana.ciornei@nxp.com> said:
> Add a device tree binding for the QIXIS FPGA based GPIO controller.
> Depending on the board, the QIXIS FPGA exposes registers which act as a
> GPIO controller, each with 8 GPIO lines of fixed direction.
>
> Since each QIXIS FPGA layout has its particularities, add a separate
> compatible string for each board/GPIO register combination supported.
>
> Since these GPIO controllers are trivial, make use of the newly added
> trivial-gpio.yaml file instead of creating an entirely new one.
>
> Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
> Acked-by: Rob Herring (Arm) <robh@kernel.org>
> Reviewed-by: Frank Li <Frank.Li@nxp.com>
> ---
> Changes in v2:
> - Used the newly added trivial-gpio.yaml file
> - Removed redundant "bindings" from commit title
> - Added only one compatible string for the gpio controllers on
> LX2160ARDB since both registers have the same layout.
> Changes in v3:
> - none
> Changes in v4:
> - none
> Changes in v5:
> - none
>
> Documentation/devicetree/bindings/gpio/trivial-gpio.yaml | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/gpio/trivial-gpio.yaml b/Documentation/devicetree/bindings/gpio/trivial-gpio.yaml
> index c994177de940..3f4bbd57fc52 100644
> --- a/Documentation/devicetree/bindings/gpio/trivial-gpio.yaml
> +++ b/Documentation/devicetree/bindings/gpio/trivial-gpio.yaml
> @@ -22,6 +22,8 @@ properties:
> - cznic,moxtet-gpio
> - dlg,slg7xl45106
> - fcs,fxl6408
> + - fsl,ls1046aqds-fpga-gpio-stat-pres2
> + - fsl,lx2160ardb-fpga-gpio-sfp
> - gateworks,pld-gpio
> - ibm,ppc4xx-gpio
> - loongson,ls1x-gpio
> --
> 2.25.1
>
>
Acked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: (subset) [PATCH v5 00/12] drivers: gpio: and the QIXIS FPGA GPIO controller
2025-09-22 14:36 ` (subset) [PATCH v5 00/12] drivers: gpio: and the QIXIS FPGA GPIO controller Bartosz Golaszewski
@ 2025-09-22 14:41 ` Ioana Ciornei
0 siblings, 0 replies; 24+ messages in thread
From: Ioana Ciornei @ 2025-09-22 14:41 UTC (permalink / raw)
To: Bartosz Golaszewski
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Linus Walleij,
Shawn Guo, Michael Walle, Lee Jones, devicetree, linux-gpio,
linux-kernel, Bartosz Golaszewski, Frank Li
On Mon, Sep 22, 2025 at 04:36:11PM +0200, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
>
>
> On Mon, 22 Sep 2025 17:24:15 +0300, Ioana Ciornei wrote:
> > 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.
> >
> > [...]
>
> It's too late into the cycle for the entire series to make the v6.18 merge
> window but I queued this for fixes and will send it for v6.17.
>
> [06/12] gpio: regmap: fix memory leak of gpio_regmap structure
> https://git.kernel.org/brgl/linux/c/3bd44edd6c55828fd4e11cb0efce5b7160bfa2de
Ok, sure.
I will re-submit after the merge window with what patches remain.
Ioana
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH v5 03/12] dt-bindings: fsl,fpga-qixis: describe the gpio child node found on LS1046AQDS
2025-09-22 14:24 ` [PATCH v5 03/12] dt-bindings: fsl,fpga-qixis: describe the gpio child node found on LS1046AQDS Ioana Ciornei
@ 2025-09-23 14:37 ` Rob Herring (Arm)
0 siblings, 0 replies; 24+ messages in thread
From: Rob Herring (Arm) @ 2025-09-23 14:37 UTC (permalink / raw)
To: Ioana Ciornei
Cc: Conor Dooley, Michael Walle, devicetree, Krzysztof Kozlowski,
Lee Jones, Shawn Guo, Bartosz Golaszewski, Frank Li, linux-gpio,
linux-kernel, Linus Walleij
On Mon, 22 Sep 2025 17:24:18 +0300, Ioana Ciornei wrote:
> Extend the list of accepted child nodes with the QIXIS FPGA based GPIO
> controller and explicitly list its compatible string
> fsl,ls1046aqds-fpga-gpio-stat-pres2 as the only one accepted.
>
> Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
> ---
> Changes in v3:
> - new patch
> Changes in v4:
> - none
> Changes in v5:
> - none
>
> .../devicetree/bindings/board/fsl,fpga-qixis.yaml | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH v5 04/12] mfd: simple-mfd-i2c: keep compatible strings in alphabetical order
2025-09-22 14:24 ` [PATCH v5 04/12] mfd: simple-mfd-i2c: keep compatible strings in alphabetical order Ioana Ciornei
@ 2025-09-25 12:13 ` Lee Jones
0 siblings, 0 replies; 24+ messages in thread
From: Lee Jones @ 2025-09-25 12:13 UTC (permalink / raw)
To: Ioana Ciornei
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Linus Walleij,
Bartosz Golaszewski, Shawn Guo, Michael Walle, devicetree,
linux-gpio, linux-kernel, Frank Li
On Mon, 22 Sep 2025, Ioana Ciornei wrote:
> Reorder the of_device_id structures so that they are in alphabetical
> order.
>
> Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
> ---
> Changes in v4:
> - new patch
> Changes in v5:
> - none
>
> drivers/mfd/simple-mfd-i2c.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
Applied, thanks
--
Lee Jones [李琼斯]
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH v5 08/12] gpio: add QIXIS FPGA GPIO controller
2025-09-22 14:24 ` [PATCH v5 08/12] gpio: add QIXIS FPGA GPIO controller Ioana Ciornei
2025-09-22 14:34 ` Michael Walle
2025-09-22 14:39 ` Bartosz Golaszewski
@ 2025-09-30 23:00 ` Linus Walleij
2 siblings, 0 replies; 24+ messages in thread
From: Linus Walleij @ 2025-09-30 23:00 UTC (permalink / raw)
To: Ioana Ciornei
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Bartosz Golaszewski, Shawn Guo, Michael Walle, Lee Jones,
devicetree, linux-gpio, linux-kernel, Frank Li
Hi Ioana,
thanks for your patch!
On Mon, Sep 22, 2025 at 4:24 PM Ioana Ciornei <ioana.ciornei@nxp.com> wrote:
> Add support for the GPIO controller found on some QIXIS FPGAs in
> Layerscape boards such as LX2160ARDB and LS1046AQDS. This driver is
> using gpio-regmap.
>
> A GPIO controller has a maximum of 8 lines (all found in the same
> register). Even within the same controller, the GPIO lines' direction is
> fixed, which mean that both input and output lines are found in the same
> register. This is why the driver also passed to gpio-regmap the newly
> added .fixed_direction_output bitmap to represent the true direction of
> the lines.
>
> Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
> Reviewed-by: Frank Li <Frank.Li@nxp.com>
(...)
> +++ b/drivers/gpio/Kconfig
> @@ -1986,6 +1986,15 @@ config GPIO_LATCH
> Say yes here to enable a driver for GPIO multiplexers based on latches
> connected to other GPIOs.
>
> +config GPIO_QIXIS_FPGA
> + tristate "NXP QIXIS FPGA GPIO support"
> + depends on MFD_SIMPLE_MFD_I2C || COMPILE_TEST
> + select GPIO_REGMAP
> + help
> + This enables support for the GPIOs found in the QIXIS FPGA which is
> + integrated on some NXP Layerscape boards such as LX2160ARDB and
> + LS1046AQDS.
> +
> config GPIO_MOCKUP
> tristate "GPIO Testing Driver (DEPRECATED)"
> select IRQ_SIM
Why is this menu entry among the virtual GPIO drivers?
Move it under the MFD menu where it should be, please.
With this fixed:
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 24+ messages in thread
end of thread, other threads:[~2025-09-30 23:00 UTC | newest]
Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-22 14:24 [PATCH v5 00/12] drivers: gpio: and the QIXIS FPGA GPIO controller Ioana Ciornei
2025-09-22 14:24 ` [PATCH v5 01/12] dt-bindings: gpio: add QIXIS FPGA based " Ioana Ciornei
2025-09-22 14:40 ` Bartosz Golaszewski
2025-09-22 14:24 ` [PATCH v5 02/12] dt-bindings: fsl,fpga-qixis-i2c: add support for LX2160ARDB FPGA Ioana Ciornei
2025-09-22 14:24 ` [PATCH v5 03/12] dt-bindings: fsl,fpga-qixis: describe the gpio child node found on LS1046AQDS Ioana Ciornei
2025-09-23 14:37 ` Rob Herring (Arm)
2025-09-22 14:24 ` [PATCH v5 04/12] mfd: simple-mfd-i2c: keep compatible strings in alphabetical order Ioana Ciornei
2025-09-25 12:13 ` Lee Jones
2025-09-22 14:24 ` [PATCH v5 05/12] mfd: simple-mfd-i2c: add compatible string for LX2160ARDB Ioana Ciornei
2025-09-22 14:24 ` [PATCH v5 06/12] gpio: regmap: fix memory leak of gpio_regmap structure Ioana Ciornei
2025-09-22 14:31 ` Michael Walle
2025-09-22 14:24 ` [PATCH v5 07/12] gpio: regmap: add the .fixed_direction_output configuration parameter Ioana Ciornei
2025-09-22 14:32 ` Michael Walle
2025-09-22 14:39 ` Bartosz Golaszewski
2025-09-22 14:24 ` [PATCH v5 08/12] gpio: add QIXIS FPGA GPIO controller Ioana Ciornei
2025-09-22 14:34 ` Michael Walle
2025-09-22 14:39 ` Bartosz Golaszewski
2025-09-30 23:00 ` Linus Walleij
2025-09-22 14:24 ` [PATCH v5 09/12] arm64: dts: lx2160a-rdb: describe the QIXIS FPGA and two child GPIO controllers Ioana Ciornei
2025-09-22 14:24 ` [PATCH v5 10/12] arm64: dts: ls1046a-qds: describe the FPGA based GPIO controller Ioana Ciornei
2025-09-22 14:24 ` [PATCH v5 11/12] arm64: dts: lx2160a-rdb: fully describe the two SFP+ cages Ioana Ciornei
2025-09-22 14:24 ` [PATCH v5 12/12] arm64: dts: ls1046a-qds: describe the two on-board " Ioana Ciornei
2025-09-22 14:36 ` (subset) [PATCH v5 00/12] drivers: gpio: and the QIXIS FPGA GPIO controller Bartosz Golaszewski
2025-09-22 14:41 ` Ioana Ciornei
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).