From: Rob Herring <robh@kernel.org>
To: Mark-PK Tsai <mark-pk.tsai@mediatek.com>
Cc: devicetree@vger.kernel.org, alix.wu@mediatek.com,
jason@lakedaemon.net, maz@kernel.org, yj.chiang@mediatek.com,
daniel@0x0f.com, linux-kernel@vger.kernel.org,
linux-mediatek@lists.infradead.org, matthias.bgg@gmail.com,
tglx@linutronix.de, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 2/2] dt-bindings: interrupt-controller: Add MStar interrupt controller
Date: Tue, 25 Aug 2020 15:48:42 -0600 [thread overview]
Message-ID: <20200825214842.GA1367012@bogus> (raw)
In-Reply-To: <20200819034231.20726-3-mark-pk.tsai@mediatek.com>
On Wed, Aug 19, 2020 at 11:42:31AM +0800, Mark-PK Tsai wrote:
> Add binding for MStar interrupt controller.
>
> Signed-off-by: Mark-PK Tsai <mark-pk.tsai@mediatek.com>
> ---
> .../interrupt-controller/mstar,mst-intc.yaml | 82 +++++++++++++++++++
> 1 file changed, 82 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/interrupt-controller/mstar,mst-intc.yaml
>
> diff --git a/Documentation/devicetree/bindings/interrupt-controller/mstar,mst-intc.yaml b/Documentation/devicetree/bindings/interrupt-controller/mstar,mst-intc.yaml
> new file mode 100644
> index 000000000000..6e383315e529
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/interrupt-controller/mstar,mst-intc.yaml
> @@ -0,0 +1,82 @@
> +# SPDX-License-Identifier: GPL-2.0
Dual license new bindings.
(GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/interrupt-controller/mstar,mst-intc.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: MStar Interrupt Controller
> +
> +maintainers:
> + - Mark-PK Tsai <mark-pk.tsai@mediatek.com>
> +
> +description: |+
> + MStar, SigmaStar and Mediatek DTV SoCs contain multiple legacy
> + interrupt controllers that routes interrupts to the GIC.
> +
> + The HW block exposes a number of interrupt controllers, each
> + can support up to 64 interrupts.
> +
> +allOf:
> + - $ref: /schemas/interrupt-controller.yaml#
Drop this. It is applied based on node name matching already.
> +
> +properties:
> + compatible:
> + items:
> + - const: mstar,mst-intc
> + - enum:
> + - mediatek,mt58xx-intc
Normally, the 1st entry would be enum as that's where you'd add new
compatibles (as the fallback is constant). But if you don't forsee any
additions, just make both 'const'
> +
> + interrupt-controller: true
> +
> + "#address-cells":
> + enum: [ 0, 1, 2 ]
This would normally be 0 in an interrupt controller. It's only relevant
if you have an 'interrupt-map' which this is the parent for.
> + "#size-cells":
> + enum: [ 1, 2 ]
And this should be dropped.
> +
> + "#interrupt-cells":
> + const: 3
> + description: |
> + Use the same format as specified by GIC in arm,gic.yaml.
That's odd. You have the same SPI and PPI stuff?
> +
> + reg:
> + description: |
> + Physical base address of the mstar interrupt controller
> + registers and length of memory mapped region.
Drop this. That's every 'reg' property.
> + minItems: 1
maxItems is more logical.
> +
> + mstar,irqs-map-range:
> + description: |
> + The range of parent interrupt controller's interrupt lines
> + that are hardwired to mstar interrupt controller.
Is this <start size> or <start end>?
Really, this should just use 'interrupts' even though that's a bit
verbose. Or be implied by the compatible string. What's the maximum
number of parent interrupts?
In any case, we really need to stop having vendor specific properties
for this.
> + $ref: /schemas/types.yaml#/definitions/uint32-matrix
> + items:
> + minItems: 2
> + maxItems: 2
> +
> + mstar,intc-no-eoi:
> + description: |
Don't need '|' if there's no formatting.
> + Mark this controller has no End Of Interrupt(EOI) implementation.
> + This is a empty, boolean property.
You can drop this line. The schema says this.
> + type: boolean
> +
> +required:
> + - compatible
> + - reg
> + - mstar,irqs-map-range
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + mst_intc0: interrupt-controller@1f2032d0 {
> + compatible = "mstar,mst-intc", "mediatek,mt58xx-intc";
> + interrupt-controller;
> + #interrupt-cells = <3>;
> + #address-cells = <1>;
> + #size-cells = <1>;
> + interrupt-parent = <&gic>;
> + reg = <0x1f2032d0 0x30>;
> + mstar,irqs-map-range = <0 63>;
Is 0 a PPI or SPI? This property is making some assumption and wouldn't
be able to support both types or another parent interrupt controller.
> + };
> +...
> --
> 2.18.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-08-25 21:50 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-19 3:42 [PATCH 0/2] Add MStar interrupt controller support Mark-PK Tsai
2020-08-19 3:42 ` [PATCH 1/2] irqchip: irq-mst: " Mark-PK Tsai
2020-08-19 8:14 ` Marc Zyngier
2020-08-19 13:31 ` Mark-PK Tsai
2020-08-19 13:42 ` Marc Zyngier
2020-08-19 14:55 ` Mark-PK Tsai
2020-08-19 15:24 ` Marc Zyngier
2020-08-19 3:42 ` [PATCH 2/2] dt-bindings: interrupt-controller: Add MStar interrupt controller Mark-PK Tsai
2020-08-25 21:48 ` Rob Herring [this message]
2020-08-26 7:50 ` Mark-PK Tsai
2020-08-19 15:37 ` [PATCH v2 1/2] irqchip: irq-mst: Add MStar interrupt controller support Mark-PK Tsai
2020-08-20 12:36 ` Daniel Palmer
2020-08-20 12:47 ` Marc Zyngier
2020-09-02 6:59 ` Mark-PK Tsai
2020-08-22 4:48 ` Daniel Palmer
2020-08-24 2:36 ` Mark-PK Tsai
2020-08-24 2:48 ` [PATCH] MAINTAINERS: Add maintenance information for MStar Interrupt Controller Mark-PK Tsai
-- strict thread matches above, loose matches on Subject: below --
2020-09-02 6:33 [PATCH v3 2/2] dt-bindings: interrupt-controller: Add MStar interrupt controller Mark-PK Tsai
2020-09-02 6:52 ` [PATCH " Mark-PK Tsai
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=20200825214842.GA1367012@bogus \
--to=robh@kernel.org \
--cc=alix.wu@mediatek.com \
--cc=daniel@0x0f.com \
--cc=devicetree@vger.kernel.org \
--cc=jason@lakedaemon.net \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=mark-pk.tsai@mediatek.com \
--cc=matthias.bgg@gmail.com \
--cc=maz@kernel.org \
--cc=tglx@linutronix.de \
--cc=yj.chiang@mediatek.com \
/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;
as well as URLs for NNTP newsgroup(s).