From: Rob Herring <robh@kernel.org>
To: Suman Anna <s-anna@ti.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
Bartosz Golaszewski <brgl@bgdev.pl>,
Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>,
Jassi Brar <jassisinghbrar@gmail.com>,
Charles Keepax <ckeepax@opensource.cirrus.com>,
Richard Fitzgerald <rf@opensource.cirrus.com>,
Lee Jones <lee.jones@linaro.org>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
Paul Walmsley <paul.walmsley@sifive.com>,
Greentime Hu <greentime.hu@sifive.com>,
Bjorn Helgaas <bhelgaas@google.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Michal Simek <michal.simek@xilinx.com>,
- <patches@opensource.cirrus.com>,
John Crispin <john@phrozen.org>,
Hauke Mehrtens <hauke@hauke-m.de>,
Kumar Gogada <bharat.kumar.gogada@xilinx.com>,
"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
devicetree@vger.kernel.org,
linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Linux-ALSA <alsa-devel@alsa-project.org>,
netdev <netdev@vger.kernel.org>, PCI <linux-pci@vger.kernel.org>,
linux-riscv <linux-riscv@lists.infradead.org>,
"Nagalla, Hari" <hnagalla@ti.com>, "Menon, Nishanth" <nm@ti.com>,
Vignesh R <vigneshr@ti.com>
Subject: Re: [PATCH] dt-bindings: Drop required 'interrupt-parent'
Date: Fri, 7 Jan 2022 11:03:25 -0600 [thread overview]
Message-ID: <CAL_JsqKScenYRO4QERfdB-e8-70Va1tMBbSTXbAoUp+AVTk8Pw@mail.gmail.com> (raw)
In-Reply-To: <8902cefa-e2d7-1bcc-aae2-f272be53d675@ti.com>
On Fri, Jan 7, 2022 at 10:29 AM Suman Anna <s-anna@ti.com> wrote:
>
> Hi Rob,
>
> On 1/7/22 9:20 AM, Rob Herring wrote:
> > On Fri, Jan 7, 2022 at 8:27 AM Suman Anna <s-anna@ti.com> wrote:
> >>
> >> Hi Rob,
> >>
> >> On 1/6/22 9:19 PM, Rob Herring wrote:
> >>> 'interrupt-parent' is never required as it can be in a parent node or a
> >>> parent node itself can be an interrupt provider. Where exactly it lives is
> >>> outside the scope of a binding schema.
> >>>
> >>> Signed-off-by: Rob Herring <robh@kernel.org>
> >>> ---
> >>> .../devicetree/bindings/gpio/toshiba,gpio-visconti.yaml | 1 -
> >>> .../devicetree/bindings/mailbox/ti,omap-mailbox.yaml | 9 ---------
> >>> Documentation/devicetree/bindings/mfd/cirrus,madera.yaml | 1 -
> >>> .../devicetree/bindings/net/lantiq,etop-xway.yaml | 1 -
> >>> .../devicetree/bindings/net/lantiq,xrx200-net.yaml | 1 -
> >>> .../devicetree/bindings/pci/sifive,fu740-pcie.yaml | 1 -
> >>> .../devicetree/bindings/pci/xilinx-versal-cpm.yaml | 1 -
> >>> 7 files changed, 15 deletions(-)
> >>>
> >>> diff --git a/Documentation/devicetree/bindings/gpio/toshiba,gpio-visconti.yaml b/Documentation/devicetree/bindings/gpio/toshiba,gpio-visconti.yaml
> >>> index 9ad470e01953..b085450b527f 100644
> >>> --- a/Documentation/devicetree/bindings/gpio/toshiba,gpio-visconti.yaml
> >>> +++ b/Documentation/devicetree/bindings/gpio/toshiba,gpio-visconti.yaml
> >>> @@ -43,7 +43,6 @@ required:
> >>> - gpio-controller
> >>> - interrupt-controller
> >>> - "#interrupt-cells"
> >>> - - interrupt-parent
> >>>
> >>> additionalProperties: false
> >>>
> >>> diff --git a/Documentation/devicetree/bindings/mailbox/ti,omap-mailbox.yaml b/Documentation/devicetree/bindings/mailbox/ti,omap-mailbox.yaml
> >>> index e864d798168d..d433e496ec6e 100644
> >>> --- a/Documentation/devicetree/bindings/mailbox/ti,omap-mailbox.yaml
> >>> +++ b/Documentation/devicetree/bindings/mailbox/ti,omap-mailbox.yaml
> >>> @@ -175,15 +175,6 @@ required:
> >>> - ti,mbox-num-fifos
> >>>
> >>> allOf:
> >>> - - if:
> >>> - properties:
> >>> - compatible:
> >>> - enum:
> >>> - - ti,am654-mailbox
> >>> - then:
> >>> - required:
> >>> - - interrupt-parent
> >>> -
> >>
> >> There are multiple interrupt controllers on TI K3 devices, and we need this
> >> property to be defined _specifically_ to point to the relevant interrupt router
> >> parent node.
> >>
> >> While what you state in general is true, I cannot have a node not define this on
> >> K3 devices, and end up using the wrong interrupt parent (GIC
> >> interrupt-controller). That's why the conditional compatible check.
> >
> > But you could.
> >
> > The parent node can have a default interrupt-parent and child nodes
> > can override that. It doesn't matter which one is the default though
> > typically you would want the one used the most to be the default.
> > Looking at your dts files, it looks like you all did the opposite.
>
> Hmm, I am not sure I understood your last comment. Can you point out the
> specific usage?
Perhaps an example. These are all equivalent:
parent {
child1 {
interrupt-parent = <&intc1>;
interrupts = <1>;
};
child2 {
interrupt-parent = <&intc2>;
interrupts = <2>;
};
};
parent {
interrupt-parent = <&intc1>; // Or in the parent's parent...
child1 {
interrupts = <1>;
};
child2 {
interrupt-parent = <&intc2>;
interrupts = <2>;
};
};
parent {
interrupt-parent = <&intc2>;
child1 {
interrupt-parent = <&intc1>;
interrupts = <1>;
};
child2 {
interrupts = <2>;
};
};
You could structure main_navss and child nodes in any of these 3 ways.
>
> All our K3 dts files have the interrupt-parent = <&gic500> defined at the
> root-node, which is the default ARM GIC.
>
> Let us know if we need to fix something in our dts files.
No! I'm just saying there are multiple correct ways to write the dts files.
> The
> > only way that wouldn't work is if the parent node is if the parent
> > node has its own 'interrupts' or you are just abusing
> > 'interrupt-parent' where the standard parsing doesn't work.
>
> All our K3 gic500 nodes does have an 'interrupts' property.
I said the parent node, not the 'interrupt-parent'. In this case, the
parent is 'main_navss: bus@30800000'. It doesn't have 'interrupts' in
your case, so only the 2nd case is a possibility.
> > You are also free to use 'interrupts-extended' anywhere 'interrupts'
> > is used and then interrupt-parent being present is an error.
>
> Yes, this is understood. The OMAP Mailbox binding is reused between multiple SoC
> families, some of which do not use an Interrupt Router in between.
>
> So, whats the best way to enforce this in the specific schema? I have used the
> common 'interrupts' property that applies to all SoCs, and enforced the
> conditional 'interrupt-parent' only on relevant compatibles.
You can't. There is no way a schema can ensure you connect the right
interrupt controller just as it can't ensure you used the right
interrupt number and flags or used the right addresses. Well, you
could technically, but then at that point we could just generate the
dts from the schema.
Rob
next prev parent reply other threads:[~2022-01-07 17:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-07 3:19 [PATCH] dt-bindings: Drop required 'interrupt-parent' Rob Herring
2022-01-07 9:31 ` Bartosz Golaszewski
2022-01-07 14:26 ` Suman Anna
2022-01-07 15:20 ` Rob Herring
2022-01-07 16:29 ` Suman Anna
2022-01-07 17:03 ` Rob Herring [this message]
2022-01-10 10:33 ` Lee Jones
2022-01-11 17:51 ` Rob Herring
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=CAL_JsqKScenYRO4QERfdB-e8-70Va1tMBbSTXbAoUp+AVTk8Pw@mail.gmail.com \
--to=robh@kernel.org \
--cc=alsa-devel@alsa-project.org \
--cc=bharat.kumar.gogada@xilinx.com \
--cc=bhelgaas@google.com \
--cc=brgl@bgdev.pl \
--cc=ckeepax@opensource.cirrus.com \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=greentime.hu@sifive.com \
--cc=hauke@hauke-m.de \
--cc=hnagalla@ti.com \
--cc=jassisinghbrar@gmail.com \
--cc=john@phrozen.org \
--cc=kuba@kernel.org \
--cc=lee.jones@linaro.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=michal.simek@xilinx.com \
--cc=netdev@vger.kernel.org \
--cc=nm@ti.com \
--cc=nobuhiro1.iwamatsu@toshiba.co.jp \
--cc=palmer@dabbelt.com \
--cc=patches@opensource.cirrus.com \
--cc=paul.walmsley@sifive.com \
--cc=rf@opensource.cirrus.com \
--cc=s-anna@ti.com \
--cc=vigneshr@ti.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).