[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAL_JsqJ4SsEzZz=JfFMDDUMXEDfybMZw4BVDcj1MoapM+8jQwg@mail.gmail.com>
Date: Wed, 9 Feb 2022 09:28:59 -0600
From: Rob Herring <robh@...nel.org>
To: Luiz Angelo Daros de Luca <luizluca@...il.com>
Cc: Alvin Šipraga <ALSI@...g-olufsen.dk>,
Linus Walleij <linus.walleij@...aro.org>,
devicetree@...r.kernel.org, Arnd Bergmann <arnd@...db.de>,
Olof Johansson <olof@...om.net>,
Arınç ÜNAL <arinc.unal@...nc9.com>,
Florian Fainelli <f.fainelli@...il.com>,
Stephen Rothwell <sfr@...b.auug.org.au>,
Andrew Lunn <andrew@...n.ch>,
Vivien Didelot <vivien.didelot@...il.com>,
Vladimir Oltean <olteanv@...il.com>,
"David S . Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
"open list:NETWORKING DRIVERS" <netdev@...r.kernel.org>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] dt-bindings: net: dsa: realtek-smi: convert to YAML schema
On Sat, Jan 29, 2022 at 10:02 AM Luiz Angelo Daros de Luca
<luizluca@...il.com> wrote:
>
> Thanks Rob, now that the code side is merged, I'm back to docs.
Sigh, bindings are supposed to be accepted first...
>
>
> > > + interrupt-controller:
> > > + description: see interrupt-controller/interrupts.txt
> >
> > Don't need generic descriptions. Just 'true' here is fine.
>
> Do you really mean quoted true, like in "description: 'true' "?
> Without quotes it will fail
interrupt-controller: true
> >
> > > +
> > > + interrupts:
> > > + description: TODO
> >
> > You have to define how many interrupts and what they are.
>
> I didn't write the interruption code and Linus and Alvin might help here.
>
> The switch has a single interrupt pin that signals an interruption happened.
Then it's 1 interrupt?
> The code reads a register to multiplex to these interruptions:
>
> INT_TYPE_LINK_STATUS = 0,
> INT_TYPE_METER_EXCEED,
> INT_TYPE_LEARN_LIMIT,
> INT_TYPE_LINK_SPEED,
> INT_TYPE_CONGEST,
> INT_TYPE_GREEN_FEATURE,
> INT_TYPE_LOOP_DETECT,
> INT_TYPE_8051,
> INT_TYPE_CABLE_DIAG,
> INT_TYPE_ACL,
> INT_TYPE_RESERVED, /* Unused */
> INT_TYPE_SLIENT,
Unless the DT needs to route all these interrupts to multiple nodes,
then the switch needs to be an interrupt-controller.
>
> And most of them, but not all, multiplex again to each port.
Now I'm lost. So it's 1 per port, not 1 for the switch?
> However, the linux driver today does not care about any of these
> interruptions but INT_TYPE_LINK_STATUS. So it simply multiplex only
> this the interruption to each port, in a n-cell map (n being number of
> ports).
> I don't know what to describe here as device-tree should be something
> independent of a particular OS or driver.
You shouldn't need to know what Linux does to figure this out.
>
> Anyway, I doubt someone might want to plug one of these interruptions
> outside the switch driver. Could it be simple as this:
>
> interrupts:
> minItems: 3
> maxItems: 10
> description:
> interrupt mapping one per switch port
>
> Once realtek-smi.yaml settles, I'll also send the realtek-mdio.yaml.
>
> Regards,
>
> Luiz
Powered by blists - more mailing lists