mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Aisheng Dong <aisheng.dong@nxp.com>
To: Anson Huang <anson.huang@nxp.com>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"jason@lakedaemon.net" <jason@lakedaemon.net>,
	"maz@kernel.org" <maz@kernel.org>,
	"robh+dt@kernel.org" <robh+dt@kernel.org>,
	"l.stach@pengutronix.de" <l.stach@pengutronix.de>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>
Cc: dl-linux-imx <linux-imx@nxp.com>
Subject: RE: [PATCH V2] dt-bindings: interrupt-controller: Convert imx irqsteer to json-schema
Date: Mon, 18 May 2020 08:07:29 +0000	[thread overview]
Message-ID: <AM6PR04MB4966487B2E1900D09405C12380B80@AM6PR04MB4966.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <1589782336-17289-1-git-send-email-Anson.Huang@nxp.com>

> From: Anson Huang <Anson.Huang@nxp.com>
> Sent: Monday, May 18, 2020 2:12 PM
> 
> Convert the i.MX IRQSTEER binding to DT schema format using json-schema.
> 
> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>

A few minor comments, otherwise:
Reviewed-by: Dong Aisheng <aisheng.dong@nxp.com>

BTW, we probably better add ref to the common interrupt-controller.yaml to inherit
the common constraints. E.g. nodename.
But I noted some exist binding also did not include it, so maybe we can wait for Rob's
comments.

Other minor comments inline.

> ---
> Changes since V1:
> 	- Add "fsl,imx8m-irqsteer" compatible back.
> 	- Use "Multiplexer" instead of "multiplexer" for title.
> ---
>  .../bindings/interrupt-controller/fsl,irqsteer.txt | 35 ---------
>  .../interrupt-controller/fsl,irqsteer.yaml         | 89
> ++++++++++++++++++++++
>  2 files changed, 89 insertions(+), 35 deletions(-)  delete mode 100644
> Documentation/devicetree/bindings/interrupt-controller/fsl,irqsteer.txt
>  create mode 100644
> Documentation/devicetree/bindings/interrupt-controller/fsl,irqsteer.yaml
> 
> diff --git
> a/Documentation/devicetree/bindings/interrupt-controller/fsl,irqsteer.txt
> b/Documentation/devicetree/bindings/interrupt-controller/fsl,irqsteer.txt
> deleted file mode 100644
> index 582991c..0000000
> --- a/Documentation/devicetree/bindings/interrupt-controller/fsl,irqsteer.txt
> +++ /dev/null
> @@ -1,35 +0,0 @@
> -Freescale IRQSTEER Interrupt multiplexer
> -
> -Required properties:
> -
> -- compatible: should be:
> -	- "fsl,imx8m-irqsteer"
> -	- "fsl,imx-irqsteer"
> -- reg: Physical base address and size of registers.
> -- interrupts: Should contain the up to 8 parent interrupt lines used to
> -  multiplex the input interrupts. They should be specified sequentially
> -  from output 0 to 7.
> -- clocks: Should contain one clock for entry in clock-names
> -  see Documentation/devicetree/bindings/clock/clock-bindings.txt
> -- clock-names:
> -   - "ipg": main logic clock
> -- interrupt-controller: Identifies the node as an interrupt controller.
> -- #interrupt-cells: Specifies the number of cells needed to encode an
> -  interrupt source. The value must be 1.
> -- fsl,channel: The output channel that all input IRQs should be steered into.
> -- fsl,num-irqs: Number of input interrupts of this channel.
> -  Should be multiple of 32 input interrupts and up to 512 interrupts.
> -
> -Example:
> -
> -	interrupt-controller@32e2d000 {
> -		compatible = "fsl,imx8m-irqsteer", "fsl,imx-irqsteer";
> -		reg = <0x32e2d000 0x1000>;
> -		interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>;
> -		clocks = <&clk IMX8MQ_CLK_DISP_APB_ROOT>;
> -		clock-names = "ipg";
> -		fsl,channel = <0>;
> -		fsl,num-irqs = <64>;
> -		interrupt-controller;
> -		#interrupt-cells = <1>;
> -	};
> diff --git
> a/Documentation/devicetree/bindings/interrupt-controller/fsl,irqsteer.yaml
> b/Documentation/devicetree/bindings/interrupt-controller/fsl,irqsteer.yaml
> new file mode 100644
> index 0000000..5242c97
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/interrupt-controller/fsl,irqstee
> +++ r.yaml
> @@ -0,0 +1,89 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2
> +---

[...]

> +title: Freescale IRQSTEER Interrupt Multiplexer
> +
> +maintainers:
> +  - Lucas Stach <l.stach@pengutronix.de>
> +
> +properties:
> +  compatible:
> +    enum:
> +      - fsl,imx8m-irqsteer
> +      - fsl,imx-irqsteer
> +

Original compatible string definition seems not accurate.
It does not cover the case of using both together.
Anyway, that's exist issue, you can submit an extra patch to fix it later.

> +  reg:
> +    maxItems: 1
> +
> +  interrupts:
> +    description: |
> +      should contain the up to 8 parent interrupt lines used to multiplex
> +      the input interrupts. They should be specified sequentially from
> +      output 0 to 7.
> +    items:
> +      - description: irqsteer channel 0
> +      - description: irqsteer channel 1
> +      - description: irqsteer channel 2
> +      - description: irqsteer channel 3
> +      - description: irqsteer channel 4
> +      - description: irqsteer channel 5
> +      - description: irqsteer channel 6
> +      - description: irqsteer channel 7

'channel' is confusing here, it's actually output interrupt 0-7 for one channel.

s/irqsteer channel/output interrupt x

Regards
Aisheng

> +    minItems: 1
> +    maxItems: 8
> +
> +  clocks:
> +    maxItems: 1
> +
> +  clock-names:
> +    const: ipg
> +
> +  interrupt-controller: true
> +
> +  "#interrupt-cells":
> +    const: 1
> +
> +  fsl,channel:
> +    $ref: '/schemas/types.yaml#/definitions/uint32'
> +    description: |
> +      u32 value representing the output channel that all input IRQs should be
> +      steered into.
> +
> +  fsl,num-irqs:
> +    $ref: '/schemas/types.yaml#/definitions/uint32'
> +    description: |
> +      u32 value representing the number of input interrupts of this channel,
> +      should be multiple of 32 input interrupts and up to 512 interrupts.
> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +  - clocks
> +  - clock-names
> +  - interrupt-controller
> +  - "#interrupt-cells"
> +  - fsl,channel
> +  - fsl,num-irqs
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/clock/imx8mq-clock.h>
> +    #include <dt-bindings/interrupt-controller/arm-gic.h>
> +
> +    interrupt-controller@32e2d000 {
> +        compatible = "fsl,imx-irqsteer";
> +        reg = <0x32e2d000 0x1000>;
> +        interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>;
> +        clocks = <&clk IMX8MQ_CLK_DISP_APB_ROOT>;
> +        clock-names = "ipg";
> +        fsl,channel = <0>;
> +        fsl,num-irqs = <64>;
> +        interrupt-controller;
> +        #interrupt-cells = <1>;
> +    };
> --
> 2.7.4


      reply	other threads:[~2020-05-18  8:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-18  6:12 Anson Huang
2020-05-18  8:07 ` Aisheng Dong [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AM6PR04MB4966487B2E1900D09405C12380B80@AM6PR04MB4966.eurprd04.prod.outlook.com \
    --to=aisheng.dong@nxp.com \
    --cc=anson.huang@nxp.com \
    --cc=devicetree@vger.kernel.org \
    --cc=jason@lakedaemon.net \
    --cc=l.stach@pengutronix.de \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®