devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] gpio: mmio: Support IXP4xx expansion bus MMIO GPIO
@ 2025-08-22 15:46 Linus Walleij
  2025-08-22 15:46 ` [PATCH v2 1/3] dt-bindings: gpio-mmio: Support hogs Linus Walleij
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Linus Walleij @ 2025-08-22 15:46 UTC (permalink / raw)
  To: Bartosz Golaszewski, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Linus Walleij, Imre Kaloz, Krzysztof Kozlowski
  Cc: linux-gpio, devicetree, Linus Walleij

After Florian reminded me to do things properly, here are
fixups and additions to the MMIO GPIO bindings and a
tie-in to the IXP4xx expansion bus memory controller.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
Changes in v2:
- Drop the bank-width binding, this was based on a misunderstanding.
- Drop the bank-width from the example as well.
- Collect ACKs.
- Link to v1: https://lore.kernel.org/r/20250820-ixp4xx-eb-mmio-gpio-v1-0-0e167398c8ac@linaro.org

---
Linus Walleij (3):
      dt-bindings: gpio-mmio: Support hogs
      dt-bindings: gpio-mmio: Add MMIO for IXP4xx expansion bus
      gpio: mmio: Add compatible for the ixp4xx eb MMIO

 .../devicetree/bindings/gpio/gpio-mmio.yaml        | 36 +++++++++++++++++++++-
 drivers/gpio/gpio-mmio.c                           |  1 +
 2 files changed, 36 insertions(+), 1 deletion(-)
---
base-commit: 8f5ae30d69d7543eee0d70083daf4de8fe15d585
change-id: 20250820-ixp4xx-eb-mmio-gpio-80884f67aa67

Best regards,
-- 
Linus Walleij <linus.walleij@linaro.org>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v2 1/3] dt-bindings: gpio-mmio: Support hogs
  2025-08-22 15:46 [PATCH v2 0/3] gpio: mmio: Support IXP4xx expansion bus MMIO GPIO Linus Walleij
@ 2025-08-22 15:46 ` Linus Walleij
  2025-08-22 15:46 ` [PATCH v2 2/3] dt-bindings: gpio-mmio: Add MMIO for IXP4xx expansion bus Linus Walleij
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Linus Walleij @ 2025-08-22 15:46 UTC (permalink / raw)
  To: Bartosz Golaszewski, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Linus Walleij, Imre Kaloz, Krzysztof Kozlowski
  Cc: linux-gpio, devicetree, Linus Walleij

We use hogs on some MMIO GPIO controllers so make sure the
bindings support this using a pattern property.

Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 Documentation/devicetree/bindings/gpio/gpio-mmio.yaml | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/Documentation/devicetree/bindings/gpio/gpio-mmio.yaml b/Documentation/devicetree/bindings/gpio/gpio-mmio.yaml
index 87e986386f32a4a8ba257d6a4d8da492b05d5bbf..ca32317dff85bc72aace6638dabbdd91de5e569b 100644
--- a/Documentation/devicetree/bindings/gpio/gpio-mmio.yaml
+++ b/Documentation/devicetree/bindings/gpio/gpio-mmio.yaml
@@ -89,6 +89,12 @@ properties:
     description:
       If this property is present, the controller cannot drive the GPIO lines.
 
+patternProperties:
+  "^.+-hog(-[0-9]+)?$":
+    type: object
+    required:
+      - gpio-hog
+
 required:
   - compatible
   - reg

-- 
2.50.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH v2 2/3] dt-bindings: gpio-mmio: Add MMIO for IXP4xx expansion bus
  2025-08-22 15:46 [PATCH v2 0/3] gpio: mmio: Support IXP4xx expansion bus MMIO GPIO Linus Walleij
  2025-08-22 15:46 ` [PATCH v2 1/3] dt-bindings: gpio-mmio: Support hogs Linus Walleij
@ 2025-08-22 15:46 ` Linus Walleij
  2025-08-22 15:46 ` [PATCH v2 3/3] gpio: mmio: Add compatible for the ixp4xx eb MMIO Linus Walleij
  2025-08-25 18:50 ` [PATCH v2 0/3] gpio: mmio: Support IXP4xx expansion bus MMIO GPIO Bartosz Golaszewski
  3 siblings, 0 replies; 5+ messages in thread
From: Linus Walleij @ 2025-08-22 15:46 UTC (permalink / raw)
  To: Bartosz Golaszewski, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Linus Walleij, Imre Kaloz, Krzysztof Kozlowski
  Cc: linux-gpio, devicetree, Linus Walleij

This expansion is a simple MMIO-mapped GPIO device but the bus has a
number of additional properties that we need to bring in using
a reference to the bus child node schema.

Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 .../devicetree/bindings/gpio/gpio-mmio.yaml        | 30 +++++++++++++++++++++-
 1 file changed, 29 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/gpio/gpio-mmio.yaml b/Documentation/devicetree/bindings/gpio/gpio-mmio.yaml
index ca32317dff85bc72aace6638dabbdd91de5e569b..b4d55bf6a28548534f35ca8af22d18a596c6d2b2 100644
--- a/Documentation/devicetree/bindings/gpio/gpio-mmio.yaml
+++ b/Documentation/devicetree/bindings/gpio/gpio-mmio.yaml
@@ -22,6 +22,7 @@ properties:
       - brcm,bcm6345-gpio
       - ni,169445-nand-gpio
       - wd,mbl-gpio # Western Digital MyBook Live memory-mapped GPIO controller
+      - intel,ixp4xx-expansion-bus-mmio-gpio
 
   big-endian: true
 
@@ -89,6 +90,14 @@ properties:
     description:
       If this property is present, the controller cannot drive the GPIO lines.
 
+if:
+  properties:
+    compatible:
+      contains:
+        const: intel,ixp4xx-expansion-bus-mmio-gpio
+then:
+  $ref: /schemas/memory-controllers/intel,ixp4xx-expansion-peripheral-props.yaml#
+
 patternProperties:
   "^.+-hog(-[0-9]+)?$":
     type: object
@@ -102,7 +111,7 @@ required:
   - '#gpio-cells'
   - gpio-controller
 
-additionalProperties: false
+unevaluatedProperties: false
 
 examples:
   - |
@@ -132,3 +141,22 @@ examples:
       gpio-controller;
       #gpio-cells = <2>;
     };
+
+    bus@c4000000 {
+        compatible = "intel,ixp42x-expansion-bus-controller", "syscon";
+        reg = <0xc4000000 0x30>;
+        native-endian;
+        #address-cells = <2>;
+        #size-cells = <1>;
+        ranges = <0 0x0 0x50000000 0x01000000>;
+        dma-ranges = <0 0x0 0x50000000 0x01000000>;
+        gpio@1,0 {
+            compatible = "intel,ixp4xx-expansion-bus-mmio-gpio";
+            gpio-controller;
+            #gpio-cells = <2>;
+            big-endian;
+            reg = <1 0x00000000 0x2>;
+            reg-names = "dat";
+            intel,ixp4xx-eb-write-enable = <1>;
+        };
+    };

-- 
2.50.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH v2 3/3] gpio: mmio: Add compatible for the ixp4xx eb MMIO
  2025-08-22 15:46 [PATCH v2 0/3] gpio: mmio: Support IXP4xx expansion bus MMIO GPIO Linus Walleij
  2025-08-22 15:46 ` [PATCH v2 1/3] dt-bindings: gpio-mmio: Support hogs Linus Walleij
  2025-08-22 15:46 ` [PATCH v2 2/3] dt-bindings: gpio-mmio: Add MMIO for IXP4xx expansion bus Linus Walleij
@ 2025-08-22 15:46 ` Linus Walleij
  2025-08-25 18:50 ` [PATCH v2 0/3] gpio: mmio: Support IXP4xx expansion bus MMIO GPIO Bartosz Golaszewski
  3 siblings, 0 replies; 5+ messages in thread
From: Linus Walleij @ 2025-08-22 15:46 UTC (permalink / raw)
  To: Bartosz Golaszewski, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Linus Walleij, Imre Kaloz, Krzysztof Kozlowski
  Cc: linux-gpio, devicetree, Linus Walleij

The IXP4xx expansion bus can have simple memory-mapped GPIO
on it. Using the proper device tree bindings, support probing
this directly from the device tree.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 drivers/gpio/gpio-mmio.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpio/gpio-mmio.c b/drivers/gpio/gpio-mmio.c
index 021ad62778c2f49f0819b767a60112945999f572..79e1be149c94842cb6fa6b657343b11e78701220 100644
--- a/drivers/gpio/gpio-mmio.c
+++ b/drivers/gpio/gpio-mmio.c
@@ -730,6 +730,7 @@ static const struct of_device_id bgpio_of_match[] = {
 	{ .compatible = "brcm,bcm6345-gpio" },
 	{ .compatible = "wd,mbl-gpio" },
 	{ .compatible = "ni,169445-nand-gpio" },
+	{ .compatible = "intel,ixp4xx-expansion-bus-mmio-gpio" },
 	{ }
 };
 MODULE_DEVICE_TABLE(of, bgpio_of_match);

-- 
2.50.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v2 0/3] gpio: mmio: Support IXP4xx expansion bus MMIO GPIO
  2025-08-22 15:46 [PATCH v2 0/3] gpio: mmio: Support IXP4xx expansion bus MMIO GPIO Linus Walleij
                   ` (2 preceding siblings ...)
  2025-08-22 15:46 ` [PATCH v2 3/3] gpio: mmio: Add compatible for the ixp4xx eb MMIO Linus Walleij
@ 2025-08-25 18:50 ` Bartosz Golaszewski
  3 siblings, 0 replies; 5+ messages in thread
From: Bartosz Golaszewski @ 2025-08-25 18:50 UTC (permalink / raw)
  To: Bartosz Golaszewski, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Linus Walleij, Imre Kaloz, Krzysztof Kozlowski,
	Linus Walleij
  Cc: Bartosz Golaszewski, linux-gpio, devicetree

From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>


On Fri, 22 Aug 2025 17:46:25 +0200, Linus Walleij wrote:
> After Florian reminded me to do things properly, here are
> fixups and additions to the MMIO GPIO bindings and a
> tie-in to the IXP4xx expansion bus memory controller.
> 
> 

Applied, thanks!

[1/3] dt-bindings: gpio-mmio: Support hogs
      https://git.kernel.org/brgl/linux/c/545908a9fb9c01e1bd7afe040f5623f561d50ea0
[2/3] dt-bindings: gpio-mmio: Add MMIO for IXP4xx expansion bus
      https://git.kernel.org/brgl/linux/c/1f3c076063f03999c351c0725adf744ef5660733
[3/3] gpio: mmio: Add compatible for the ixp4xx eb MMIO
      https://git.kernel.org/brgl/linux/c/38623d532c99ebd926f4eebb7c7de19cb7e5aef4

Best regards,
-- 
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-08-25 18:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-22 15:46 [PATCH v2 0/3] gpio: mmio: Support IXP4xx expansion bus MMIO GPIO Linus Walleij
2025-08-22 15:46 ` [PATCH v2 1/3] dt-bindings: gpio-mmio: Support hogs Linus Walleij
2025-08-22 15:46 ` [PATCH v2 2/3] dt-bindings: gpio-mmio: Add MMIO for IXP4xx expansion bus Linus Walleij
2025-08-22 15:46 ` [PATCH v2 3/3] gpio: mmio: Add compatible for the ixp4xx eb MMIO Linus Walleij
2025-08-25 18:50 ` [PATCH v2 0/3] gpio: mmio: Support IXP4xx expansion bus MMIO GPIO Bartosz Golaszewski

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).