dt-bindings: gpio: mpfs: add coreGPIO support
authorJamie Gibbons <jamie.gibbons@microchip.com>
Wed, 27 Mar 2024 12:24:37 +0000 (12:24 +0000)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Fri, 29 Mar 2024 12:21:30 +0000 (13:21 +0100)
The GPIO controllers on PolarFire SoC were based on the "soft" IP
CoreGPIO, but the inp/outp registers are at different offsets. Add
compatible to allow for support of both sets of offsets. The soft
core will not always have interrupts wired up, so only enforce them for
the "hard" core on PolarFire SoC.

Signed-off-by: Jamie Gibbons <jamie.gibbons@microchip.com>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Documentation/devicetree/bindings/gpio/microchip,mpfs-gpio.yaml

index d481e78958a74ae9f62f61c83d12eaf9caf51a3f..6884dacb2865025f173f6342435d4ad20c1c21b6 100644 (file)
@@ -14,6 +14,7 @@ properties:
     items:
       - enum:
           - microchip,mpfs-gpio
+          - microchip,coregpio-rtl-v3
 
   reg:
     maxItems: 1
@@ -62,12 +63,21 @@ patternProperties:
       - gpio-hog
       - gpios
 
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: microchip,mpfs-gpio
+    then:
+      required:
+        - interrupts
+        - "#interrupt-cells"
+        - interrupt-controller
+
 required:
   - compatible
   - reg
-  - interrupts
-  - "#interrupt-cells"
-  - interrupt-controller
   - "#gpio-cells"
   - gpio-controller
   - clocks