Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

dt-bindings: gpio: fix microchip,mpfs-gpio interrupt documentation

The microchip,mpfs-gpio binding suffered greatly due to being written
with a narrow minded view of the controller, and the interrupt bits
ended up incorrect. It was mistakenly assumed that the interrupt
configuration was set by platform firmware, based on the FPGA
configuration, and that the GPIO DT nodes were the only way to really
communicate interrupt configuration to software.

Instead, the mux should be a device in its own right, and the GPIO
controllers should be connected to it, rather than to the PLIC.
Now that a binding exists for that mux, try to fix the misconceptions
in the GPIO controller binding.

Firstly, it's not possible for this controller to have fewer than 14
GPIOs, and thus 14 interrupts also. There are three controllers, with
14, 24 & 32 GPIOs each. The fabric core, CoreGPIO, can of course have
a customisable number of GPIOs.

The example is wacky too - it follows from the incorrect understanding
that the GPIO controllers are connected to the PLIC directly. They are
not however, with a mux sitting in between. Update the example to use
the mux as a parent, and the interrupt numbers at the mux for GPIO2 as
the example - rather than the strange looking, repeated <53>.

Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
Reviewed-by: Linus Walleij <linusw@kernel.org>
Link: https://patch.msgid.link/20260318-fondly-tradition-90b8241f0cc8@spud
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>

authored by

Conor Dooley and committed by
Bartosz Golaszewski
ececb46f 9a5bf2f5

+15 -9
+15 -9
Documentation/devicetree/bindings/gpio/microchip,mpfs-gpio.yaml
··· 65 65 contains: 66 66 const: microchip,mpfs-gpio 67 67 then: 68 + properties: 69 + ngpios: 70 + enum: [14, 24, 32] 71 + interrupts: 72 + minItems: 14 68 73 required: 69 74 - interrupts 70 75 - "#interrupt-cells" ··· 90 85 compatible = "microchip,mpfs-gpio"; 91 86 reg = <0x20122000 0x1000>; 92 87 clocks = <&clkcfg 25>; 93 - interrupt-parent = <&plic>; 88 + interrupt-parent = <&irqmux>; 94 89 gpio-controller; 95 90 #gpio-cells = <2>; 91 + ngpios = <32>; 96 92 interrupt-controller; 97 93 #interrupt-cells = <1>; 98 - interrupts = <53>, <53>, <53>, <53>, 99 - <53>, <53>, <53>, <53>, 100 - <53>, <53>, <53>, <53>, 101 - <53>, <53>, <53>, <53>, 102 - <53>, <53>, <53>, <53>, 103 - <53>, <53>, <53>, <53>, 104 - <53>, <53>, <53>, <53>, 105 - <53>, <53>, <53>, <53>; 94 + interrupts = <64>, <65>, <66>, <67>, 95 + <68>, <69>, <70>, <71>, 96 + <72>, <73>, <74>, <75>, 97 + <76>, <77>, <78>, <79>, 98 + <80>, <81>, <82>, <83>, 99 + <84>, <85>, <86>, <87>, 100 + <88>, <89>, <90>, <91>, 101 + <92>, <93>, <94>, <95>; 106 102 }; 107 103 ...