Hi Rob, Kaneko-san, On Fri, Oct 11, 2019 at 12:07 AM Rob Herring <robh@xxxxxxxxxx> wrote: > On Fri, Sep 27, 2019 at 04:59:37AM +0900, Yoshihiro Kaneko wrote: > > Convert R-/SH-Mobile IRQPin Controller bindings documentation to json-schema. > > > > Signed-off-by: Yoshihiro Kaneko <ykaneko0929@xxxxxxxxx> > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/interrupt-controller/renesas,intc-irqpin.yaml > > @@ -0,0 +1,102 @@ > > +# SPDX-License-Identifier: GPL-2.0 > > +%YAML 1.2 > > +--- > > +$id: http://devicetree.org/schemas/interrupt-controller/renesas,intc-irqpin.yaml# > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > + > > +title: DT bindings for the R-/SH-Mobile irqpin controller > > + > > +maintainers: > > + - Geert Uytterhoeven <geert+renesas@xxxxxxxxx> Looks like I received many maintainerships recently ;-) > > + > > +properties: > > + compatible: > > + items: > > + - enum: > > + - renesas,intc-irqpin-r8a7740 # R-Mobile A1 > > + - renesas,intc-irqpin-r8a7778 # R-Car M1A > > + - renesas,intc-irqpin-r8a7779 # R-Car H1 > > + - renesas,intc-irqpin-sh73a0 # SH-Mobile AG5 > > + - const: renesas,intc-irqpin > > + > > + reg: > > + # Base address and length of each register bank used by the external > > + # IRQ pins driven by the interrupt controller hardware module. The base > > + # addresses, length and number of required register banks varies with > > + # soctype. > > + minItems: 1 minItems: 5 > > + maxItems: 6 > > Every entry is the same thing? No they're not. First entry is the Interrupt control register. Second entry is the Interrupt priority register. Third entry is the Interrupt source register. Fourth entry is the Interrupt mask register. Fifth entry is the Interrupt mask clear register. Sixth entry is the optional Interrupt control register for ICR0 with IRLM bit. The fact that SH/R-Mobile SoCs have 4 instances of this block, with interleaved registers, and different register widths, doesn't help much, and I understand that was the reason for the individual register descriptions. This is a very old binding, which tried to describe everything in DT, using a generic compatible value. Of course this lead to a mess when having different register layouts, optional registers, and a sense-bitfield-width property... The modern way would be to describe all differences in the driver, based on SoC-specific compatible values. Given this is for rather old SoCs, I see no point in upgrading the bindings. > > + irqpin1: interrupt-controller@e6900004 { > > + compatible = "renesas,intc-irqpin-r8a7740", > > + "renesas,intc-irqpin"; > > + #interrupt-cells = <2>; > > + interrupt-controller; > > + reg = <0xe6900004 4>, > > + <0xe6900014 4>, > > + <0xe6900024 1>, > > + <0xe6900044 1>, > > + <0xe6900064 1>; > > Really only 1 byte? Yep. Some registers are 8-bit on some SoCs... > > + interrupts = <GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH > > + GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH > > + GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH > > + GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH > > + GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH > > + GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH > > + GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH > > + GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH>; > > <> each interrupt specifier. > > Above you said there is only 1 interrupt... Which is wrong. But the description was correct. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx 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