Skip to content

Commit a684fa4

Browse files
hcodinageertu
authored andcommitted
ARM: dts: r9a06g032: Add support for GPIO interrupts
In the RZ/N1 SoC, the GPIO interrupts are multiplexed using the GPIO Interrupt Multiplexer. Add the multiplexer node and connect GPIO interrupt lines to the multiplexer. The interrupt-map available in the multiplexer node has to be updated in dts files depending on the GPIO usage. Indeed, the usage of an interrupt for a GPIO is board dependent. Up to 8 GPIOs can be used as an interrupt line (one per multiplexer output interrupt). Signed-off-by: Herve Codina (Schneider Electric) <herve.codina@bootlin.com> Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Link: https://patch.msgid.link/20260114093938.1089936-9-herve.codina@bootlin.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
1 parent ca91def commit a684fa4

1 file changed

Lines changed: 41 additions & 0 deletions

File tree

arch/arm/boot/dts/renesas/r9a06g032.dtsi

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -549,6 +549,14 @@
549549
gpio-controller;
550550
#gpio-cells = <2>;
551551
snps,nr-gpios = <32>;
552+
553+
interrupt-controller;
554+
interrupt-parent = <&gpioirqmux>;
555+
interrupts = < 0 1 2 3 4 5 6 7
556+
8 9 10 11 12 13 14 15
557+
16 17 18 19 20 21 22 23
558+
24 25 26 27 28 29 30 31>;
559+
#interrupt-cells = <2>;
552560
};
553561

554562
/* GPIO0b[0..1] connected to pins GPIO1..2 */
@@ -590,6 +598,14 @@
590598
gpio-controller;
591599
#gpio-cells = <2>;
592600
snps,nr-gpios = <32>;
601+
602+
interrupt-controller;
603+
interrupt-parent = <&gpioirqmux>;
604+
interrupts = <32 33 34 35 36 37 38 39
605+
40 41 42 43 44 45 46 47
606+
48 49 50 51 52 53 54 55
607+
56 57 58 59 60 61 62 63>;
608+
#interrupt-cells = <2>;
593609
};
594610

595611
/* GPIO1b[0..1] connected to pins GPIO55..56 */
@@ -621,6 +637,14 @@
621637
gpio-controller;
622638
#gpio-cells = <2>;
623639
snps,nr-gpios = <32>;
640+
641+
interrupt-controller;
642+
interrupt-parent = <&gpioirqmux>;
643+
interrupts = <64 65 66 67 68 69 70 71
644+
72 73 74 75 76 77 78 79
645+
80 81 82 83 84 85 86 87
646+
88 89 90 91 92 93 94 95>;
647+
#interrupt-cells = <2>;
624648
};
625649

626650
/* GPIO2b[0..9] connected to pins GPIO160..169 */
@@ -633,6 +657,23 @@
633657
};
634658
};
635659

660+
gpioirqmux: interrupt-controller@51000480 {
661+
compatible = "renesas,r9a06g032-gpioirqmux", "renesas,rzn1-gpioirqmux";
662+
reg = <0x51000480 0x20>;
663+
#interrupt-cells = <1>;
664+
#address-cells = <0>;
665+
interrupt-map-mask = <0x7f>;
666+
667+
/*
668+
* Example mapping entry. Board DTs need to overwrite
669+
* 'interrupt-map' with their specific mapping. Check
670+
* the irqmux binding documentation for details.
671+
*/
672+
interrupt-map = <0 &gic GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>;
673+
674+
status = "disabled";
675+
};
676+
636677
can0: can@52104000 {
637678
compatible = "renesas,r9a06g032-sja1000", "renesas,rzn1-sja1000";
638679
reg = <0x52104000 0x800>;

0 commit comments

Comments
 (0)