Message ID | 20250128104714.80807-14-biju.das.jz@bp.renesas.com (mailing list archive) |
---|---|
State | New |
Delegated to: | Geert Uytterhoeven |
Headers | show |
Series | Add Support for RZ/G3E ICU | expand |
Hi Biju, On Tue, 28 Jan 2025 at 11:48, Biju Das <biju.das.jz@bp.renesas.com> wrote: > Add interrupt control node to RZ/G3E ("R9A09G047") SoC DTSI > and add icu as interrupt-parent of pincontrol. > > Also, define the ICU IRQs for board DT users. > > Reviewed-by: Fabrizio Castro <fabrizio.castro.jz@renesas.com> > Reviewed-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com> > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Thanks for your patch! > --- a/arch/arm64/boot/dts/renesas/r9a09g047.dtsi > +++ b/arch/arm64/boot/dts/renesas/r9a09g047.dtsi > @@ -8,6 +8,24 @@ > #include <dt-bindings/clock/renesas,r9a09g047-cpg.h> > #include <dt-bindings/interrupt-controller/arm-gic.h> > > +#define RZG3E_NMI 0 > +#define RZG3E_IRQ0 1 > +#define RZG3E_IRQ1 2 > +#define RZG3E_IRQ2 3 > +#define RZG3E_IRQ3 4 > +#define RZG3E_IRQ4 5 > +#define RZG3E_IRQ5 6 > +#define RZG3E_IRQ6 7 > +#define RZG3E_IRQ7 8 > +#define RZG3E_IRQ8 9 > +#define RZG3E_IRQ9 10 > +#define RZG3E_IRQ10 11 > +#define RZG3E_IRQ11 12 > +#define RZG3E_IRQ12 13 > +#define RZG3E_IRQ13 14 > +#define RZG3E_IRQ14 15 > +#define RZG3E_IRQ15 16 Do you need these definitions? And why here, not in <dt-bindings/...>? The similar RZ/V2H ICU does not use such definitions. The DT bindings clearly document the meaning of the cell value, and the numbers can be looked up in Table 4.6-24 ("List of Input Events") of the documentation, so I think it can be removed. The rest LGTM. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Hi Geert, Thanks for the feedback. > -----Original Message----- > From: Geert Uytterhoeven <geert@linux-m68k.org> > Sent: 28 January 2025 16:42 > Subject: Re: [PATCH v3 13/13] arm64: dts: renesas: r9a09g047: Add icu node > > Hi Biju, > > On Tue, 28 Jan 2025 at 11:48, Biju Das <biju.das.jz@bp.renesas.com> wrote: > > Add interrupt control node to RZ/G3E ("R9A09G047") SoC DTSI and add > > icu as interrupt-parent of pincontrol. > > > > Also, define the ICU IRQs for board DT users. > > > > Reviewed-by: Fabrizio Castro <fabrizio.castro.jz@renesas.com> > > Reviewed-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com> > > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> > > Thanks for your patch! > > > --- a/arch/arm64/boot/dts/renesas/r9a09g047.dtsi > > +++ b/arch/arm64/boot/dts/renesas/r9a09g047.dtsi > > @@ -8,6 +8,24 @@ > > #include <dt-bindings/clock/renesas,r9a09g047-cpg.h> > > #include <dt-bindings/interrupt-controller/arm-gic.h> > > > > +#define RZG3E_NMI 0 > > +#define RZG3E_IRQ0 1 > > +#define RZG3E_IRQ1 2 > > +#define RZG3E_IRQ2 3 > > +#define RZG3E_IRQ3 4 > > +#define RZG3E_IRQ4 5 > > +#define RZG3E_IRQ5 6 > > +#define RZG3E_IRQ6 7 > > +#define RZG3E_IRQ7 8 > > +#define RZG3E_IRQ8 9 > > +#define RZG3E_IRQ9 10 > > +#define RZG3E_IRQ10 11 > > +#define RZG3E_IRQ11 12 > > +#define RZG3E_IRQ12 13 > > +#define RZG3E_IRQ13 14 > > +#define RZG3E_IRQ14 15 > > +#define RZG3E_IRQ15 16 > > Do you need these definitions? RZG3E_IRQ2= 3, The user needs to look at Table 4.6-24 ("List of Input Events") of the documentation for the plain number. Usage will be, interrupt-parent = <&icu>; interrupts = <RZG3E_NMI IRQ_TYPE_EDGE_FALLING>; interrupts = <RZG3E_IRQ2 IRQ_TYPE_LEVEL_LOW>; > And why here, not in <dt-bindings/...>? Thought not to create a file just only for the board dts?? > The similar RZ/V2H ICU does not use such definitions. > The DT bindings clearly document the meaning of the cell value, and the numbers can be looked up in > Table 4.6-24 ("List of Input Events") of the documentation, so I think it can be removed. Agreed. Will use plain number in board DTS based on Table 4.6-24 ("List of Input Events"). Cheers, Biju
diff --git a/arch/arm64/boot/dts/renesas/r9a09g047.dtsi b/arch/arm64/boot/dts/renesas/r9a09g047.dtsi index c93aa16d0a6e..2023f70d3329 100644 --- a/arch/arm64/boot/dts/renesas/r9a09g047.dtsi +++ b/arch/arm64/boot/dts/renesas/r9a09g047.dtsi @@ -8,6 +8,24 @@ #include <dt-bindings/clock/renesas,r9a09g047-cpg.h> #include <dt-bindings/interrupt-controller/arm-gic.h> +#define RZG3E_NMI 0 +#define RZG3E_IRQ0 1 +#define RZG3E_IRQ1 2 +#define RZG3E_IRQ2 3 +#define RZG3E_IRQ3 4 +#define RZG3E_IRQ4 5 +#define RZG3E_IRQ5 6 +#define RZG3E_IRQ6 7 +#define RZG3E_IRQ7 8 +#define RZG3E_IRQ8 9 +#define RZG3E_IRQ9 10 +#define RZG3E_IRQ10 11 +#define RZG3E_IRQ11 12 +#define RZG3E_IRQ12 13 +#define RZG3E_IRQ13 14 +#define RZG3E_IRQ14 15 +#define RZG3E_IRQ15 16 + / { compatible = "renesas,r9a09g047"; #address-cells = <2>; @@ -131,6 +149,95 @@ soc: soc { #size-cells = <2>; ranges; + icu: interrupt-controller@10400000 { + compatible = "renesas,r9a09g047-icu"; + reg = <0 0x10400000 0 0x10000>; + #interrupt-cells = <2>; + #address-cells = <0>; + interrupt-controller; + interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 5 IRQ_TYPE_LEV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IGH>, + <GIC_SPI 438 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 439 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 440 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 441 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 442 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 443 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 444 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 445 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 446 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 447 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 448 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 449 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 450 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 262 IRQ_TYPE_EDGE_RISING>, + <GIC_SPI 263 IRQ_TYPE_EDGE_RISING>, + <GIC_SPI 264 IRQ_TYPE_EDGE_RISING>, + <GIC_SPI 265 IRQ_TYPE_EDGE_RISING>, + <GIC_SPI 266 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 451 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 452 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 453 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 454 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "nmi", + "port_irq0", "port_irq1", "port_irq2", + "port_irq3", "port_irq4", "port_irq5", + "port_irq6", "port_irq7", "port_irq8", + "port_irq9", "port_irq10", "port_irq11", + "port_irq12", "port_irq13", "port_irq14", + "port_irq15", + "tint0", "tint1", "tint2", "tint3", + "tint4", "tint5", "tint6", "tint7", + "tint8", "tint9", "tint10", "tint11", + "tint12", "tint13", "tint14", "tint15", + "tint16", "tint17", "tint18", "tint19", + "tint20", "tint21", "tint22", "tint23", + "tint24", "tint25", "tint26", "tint27", + "tint28", "tint29", "tint30", "tint31", + "int-ca55-0", "int-ca55-1", + "int-ca55-2", "int-ca55-3", + "icu-error-ca55", + "gpt-u0-gtciada", "gpt-u0-gtciadb", + "gpt-u1-gtciada", "gpt-u1-gtciadb"; + clocks = <&cpg CPG_MOD 0x5>; + power-domains = <&cpg>; + resets = <&cpg 0x36>; + }; + pinctrl: pinctrl@10410000 { compatible = "renesas,r9a09g047-pinctrl"; reg = <0 0x10410000 0 0x10000>; @@ -140,6 +247,7 @@ pinctrl: pinctrl@10410000 { gpio-ranges = <&pinctrl 0 0 232>; #interrupt-cells = <2>; interrupt-controller; + interrupt-parent = <&icu>; power-domains = <&cpg>; resets = <&cpg 0xa5>, <&cpg 0xa6>; };