From: Vladimir Zapolskiy <vz@mleia.com>
To: Leonardo Felipe Takao Hirata <leo.fthirata@gmail.com>,
tglx@linutronix.de, robh@kernel.org, krzk+dt@kernel.org,
conor+dt@kernel.org
Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
skhan@linuxfoundation.org,
linux-kernel-mentees@lists.linuxfoundation.org
Subject: Re: [PATCH v2] dt-bindings: interrupt-controller: Convert nxp,lpc3220-mic.txt to yaml format
Date: Wed, 26 Feb 2025 11:41:52 +0200 [thread overview]
Message-ID: <29ce9b9b-3993-4b88-a201-5d67050d53ae@mleia.com> (raw)
In-Reply-To: <20250226010956.50566-1-leo.fthirata@gmail.com>
Hello Leonardo,
thank you so much for working on this.
On 2/26/25 03:09, Leonardo Felipe Takao Hirata wrote:
> Convert NXP LPC3220-MIC to DT schema.
>
> Signed-off-by: Leonardo Felipe Takao Hirata <leo.fthirata@gmail.com>
> ---
> Changes in v2:
> - Fix SoB
> - Remove reg description
> - List #interrupt-cell items
> - Add interrupt restriction per variant
> - Remove extra examples
> ---
> .../interrupt-controller/nxp,lpc3220-mic.txt | 58 --------------
> .../interrupt-controller/nxp,lpc3220-mic.yaml | 80 +++++++++++++++++++
> 2 files changed, 80 insertions(+), 58 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/interrupt-controller/nxp,lpc3220-mic.txt
> create mode 100644 Documentation/devicetree/bindings/interrupt-controller/nxp,lpc3220-mic.yaml
>
<snip>
> diff --git a/Documentation/devicetree/bindings/interrupt-controller/nxp,lpc3220-mic.yaml b/Documentation/devicetree/bindings/interrupt-controller/nxp,lpc3220-mic.yaml
> new file mode 100644
> index 000000000000..489bd329bc4e
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/interrupt-controller/nxp,lpc3220-mic.yaml
> @@ -0,0 +1,80 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/interrupt-controller/nxp,lpc3220-mic.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: NXP LPC32xx MIC, SIC1 and SIC2 Interrupt Controllers
> +
> +maintainers:
> + - Vladimir Zapolskiy <vz@mleia.com>
> +
> +properties:
> + compatible:
> + enum:
> + - nxp,lpc3220-mic
> + - nxp,lpc3220-sic
> +
> + reg:
> + maxItems: 1
> +
> + interrupt-controller: true
> +
> + '#interrupt-cells':
> + const: 2
> +
> + interrupts:
> + items:
> + - description:
> + IRQ number.
For sake of better understanding SIC1 and SIC2 interrupt controllers
are chained to MIC, that's why there is 'interrupts' property present,
and here 0/1 interrupt values are for regular IRQ, 30/31 are for fast IRQ.
Also please add here
minItems: 2
maxItems: 2
I believe that the 'interrupts' property can be just left without any
given description, or just give a simple description like
IRQ and FIQ outputs of sub interrupt controllers to the main interrupt controller
> + - description: |
> + IRQ type. Can be one of:
> +
> + IRQ_TYPE_EDGE_RISING = Low-to-high edge triggered,
> + IRQ_TYPE_EDGE_FALLING = High-to-low edge triggered,
> + IRQ_TYPE_LEVEL_HIGH = Active high level-sensitive,
> + IRQ_TYPE_LEVEL_LOW = Active low level-sensitive.
> +
> + Reset value is IRQ_TYPE_LEVEL_LOW.
> +
> +required:
> + - compatible
> + - reg
> + - interrupt-controller
> + - '#interrupt-cells'
> +
> +allOf:
> + - if:
> + properties:
> + compatible:
> + contains:
> + const: nxp,lpc3220-sic
> + then:
> + required:
> + - interrupts
> + else:
> + properties:
> + interrupts: false
Please check if this 'else' condition can be removed.
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/interrupt-controller/irq.h>
> +
> + mic: interrupt-controller@40008000 {
> + compatible = "nxp,lpc3220-mic";
> + reg = <0x40008000 0x4000>;
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +
> + sic1: interrupt-controller@4000c000 {
> + compatible = "nxp,lpc3220-sic";
> + reg = <0x4000c000 0x4000>;
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + interrupt-parent = <&mic>;
> + interrupts = <0 IRQ_TYPE_LEVEL_LOW>,
> + <30 IRQ_TYPE_LEVEL_LOW>;
> + };
--
Best wishes,
Vladimir
next prev parent reply other threads:[~2025-02-26 9:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-26 1:09 [PATCH v2] dt-bindings: interrupt-controller: Convert nxp,lpc3220-mic.txt to yaml format Leonardo Felipe Takao Hirata
2025-02-26 8:32 ` Krzysztof Kozlowski
2025-02-26 9:41 ` Vladimir Zapolskiy [this message]
2025-02-26 10:14 ` Krzysztof Kozlowski
2025-02-26 13:28 ` Leonardo Felipe Takao Hirata
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=29ce9b9b-3993-4b88-a201-5d67050d53ae@mleia.com \
--to=vz@mleia.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=leo.fthirata@gmail.com \
--cc=linux-kernel-mentees@lists.linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh@kernel.org \
--cc=skhan@linuxfoundation.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