Re: [DO NOT MERGE v6 17/37] dt-bindings: interrupt-controller: renesas,sh7751-intc: Add json-schema

From: Linus Walleij
Date: Tue Jan 09 2024 - 07:31:02 EST


Hi Yoshinori,

thanks for your patch!

On Tue, Jan 9, 2024 at 9:24 AM Yoshinori Sato
<ysato@xxxxxxxxxxxxxxxxxxxx> wrote:

> + renesas,icr-irlm:
> + $ref: /schemas/types.yaml#/definitions/flag
> + description: If true four independent interrupt requests mode (ICR.IRLM is 1).
> +
> + renesas,ipr-map:
> + $ref: /schemas/types.yaml#/definitions/uint32-array
> + description: |
> + IRQ to IPR mapping definition.
> + 1st - INTEVT code
> + 2nd - Register
> + 3rd - bit index

(...)

> + renesas,ipr-map = <0x240 IPRD IPR_B12>, /* IRL0 */
> + <0x2a0 IPRD IPR_B8>, /* IRL1 */
> + <0x300 IPRD IPR_B4>, /* IRL2 */
> + <0x360 IPRD IPR_B0>, /* IRL3 */
(...)

Is it really necessary to have all this in the device tree?

You know from the compatible that this is "renesas,sh7751-intc"
and I bet this table will be the same for any sh7751 right?

Then just put it in a table in the driver instead and skip this from
the device tree and bindings. If more interrupt controllers need
to be supported by the driver, you can simply look up the table from
the compatible string.

Yours,
Linus Walleij