From: "Alvin Šipraga" <ALSI@bang-olufsen.dk>
To: Rob Herring <robh@kernel.org>
Cc: "Luiz Angelo Daros de Luca" <luizluca@gmail.com>,
"Linus Walleij" <linus.walleij@linaro.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"Arnd Bergmann" <arnd@arndb.de>,
"Olof Johansson" <olof@lixom.net>,
"Arınç ÜNAL" <arinc.unal@arinc9.com>,
"Florian Fainelli" <f.fainelli@gmail.com>,
"Stephen Rothwell" <sfr@canb.auug.org.au>,
"Andrew Lunn" <andrew@lunn.ch>,
"Vivien Didelot" <vivien.didelot@gmail.com>,
"Vladimir Oltean" <olteanv@gmail.com>,
"David S . Miller" <davem@davemloft.net>,
"Jakub Kicinski" <kuba@kernel.org>,
"open list:NETWORKING DRIVERS" <netdev@vger.kernel.org>,
"open list" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] dt-bindings: net: dsa: realtek-smi: convert to YAML schema
Date: Wed, 9 Feb 2022 16:49:20 +0000 [thread overview]
Message-ID: <87zgn0gf3k.fsf@bang-olufsen.dk> (raw)
In-Reply-To: <CAL_JsqJ4SsEzZz=JfFMDDUMXEDfybMZw4BVDcj1MoapM+8jQwg@mail.gmail.com> (Rob Herring's message of "Wed, 9 Feb 2022 09:28:59 -0600")
Hi,
Rob Herring <robh@kernel.org> writes:
>> >
>> > > +
>> > > + 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?
Correct. The switch has one physcical interrupt signal.
>
>> 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.
Yes, it is an interrupt-controller, and an interrupt-parent to the phy
nodes.
>
>>
>> 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?
There is one physical interrupt signal for these switches. In the switch
driver IRQ handler, some registers are inspected to decide what type of
event it is. Luiz pasted the enum of possible interrupt types in his
mail above. Most of these events are ignored, or are otherwise internal
to the switch driver. But in some cases, the interrupt is actually for
one of the embedded PHYs in the switch. That's why we make the switch
an interrupt-controller.
So, in summary:
- one interrupt for the switch
- the switch is an interrupt-controller
- ... and is the interrupt-parent for the phy nodes.
The rest is internal details and shouldn't matter, as far as my
understanding of device tree bindings goes. Happy to be corrected
though.
Kind regards,
Alvin
next prev parent reply other threads:[~2022-02-09 16:49 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-28 7:26 [PATCH] dt-bindings: net: dsa: realtek-smi: convert to YAML schema Luiz Angelo Daros de Luca
2022-01-02 6:38 ` Linus Walleij
2022-01-04 23:44 ` Luiz Angelo Daros de Luca
2022-01-10 18:09 ` Rob Herring
2022-01-16 0:15 ` Linus Walleij
2022-01-10 18:20 ` Rob Herring
2022-01-29 16:02 ` Luiz Angelo Daros de Luca
2022-01-29 19:35 ` Arınç ÜNAL
2022-01-29 20:52 ` Luiz Angelo Daros de Luca
2022-01-30 17:35 ` Florian Fainelli
2022-01-31 0:49 ` Luiz Angelo Daros de Luca
2022-02-09 8:37 ` Luiz Angelo Daros de Luca
2022-02-09 15:28 ` Rob Herring
2022-02-09 16:49 ` Alvin Šipraga [this message]
2022-02-09 17:36 ` Andrew Lunn
2022-02-09 18:43 ` Luiz Angelo Daros de Luca
2022-02-09 18:55 ` Florian Fainelli
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=87zgn0gf3k.fsf@bang-olufsen.dk \
--to=alsi@bang-olufsen.dk \
--cc=andrew@lunn.ch \
--cc=arinc.unal@arinc9.com \
--cc=arnd@arndb.de \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=f.fainelli@gmail.com \
--cc=kuba@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luizluca@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=olof@lixom.net \
--cc=olteanv@gmail.com \
--cc=robh@kernel.org \
--cc=sfr@canb.auug.org.au \
--cc=vivien.didelot@gmail.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