On Sun, Nov 29, 2026 at 10:03:37PM +0000, Wiholm Willie, Tritech Solutions AB wrote:
> On Fri, Nov 27, 2026 at 07:56:51PM +0100, Andrew Lunn wrote:
> > Can this pin on the MAC actually generate interrupts? It would be
> > better to turn it into an interrupt controller, so all the usual
> > mechanisms just work, like PHY interrupts, not just WoL wake up.
>
> Yes, by setting the PHYIE bit in the MAC_INTERRUPT_ENABLE
> register I can generate interrupts. It also requires
> PHY2MAC_INTR_POL in the GCR register which was not set
> by the firmware on my board.
>
> I tested it by manually setting PHY2MAC_INTR_POL, PHYIE
> and INT_OE (DP83867 CFG3). Magic packet then triggers
> an interrupt in eno1:mac.
Great. So you need a Linux interrupt controller, so you can then
ideally reference it in DT, in the PHY node, in the normal way.
There are a couple of DSA drivers which embed an interrupt controller
in them, which you can use as an example. They support more than one
interrupt, so are a bit more complex than what you need.
Andrew