Thread (16 messages) flat view 16 messages, 4 authors, 2021-08-16

Re: [PATCH net-next 1/3] dt-bindings: net: fsl, fec: add "fsl, wakeup-irq" property

From: Andrew Lunn <andrew@lunn.ch>
Date: 2021-08-10 14:33:19
Also in: linux-devicetree, lkml, netdev

quoted
quoted
1) FEC controller has up to 4 interrupt lines and all of these are routed to GIC
interrupt controller.
quoted
2) FEC has a wakeup interrupt signal and always are mixed with other
interrupt signals, and then output to one interrupt line.
quoted
3) For legacy SoCs, wakeup interrupt are mixed to int0 line, but for i.MX8M
serials, are mixed to int2 line.
So you need to know which of the interrupts listed is the wake up
interrupt.

I can see a few ways to do this:

The FEC driver already has quirks. Add a quirk to fec_imx8mq_info and
fec_imx8qm_info to indicate these should use int2.

or

Documentation/devicetree/bindings/interrupt-controller/interrupts.txt 

  b) two cells
  ------------
  The #interrupt-cells property is set to 2 and the first cell defines the
  index of the interrupt within the controller, while the second cell is used
  to specify any of the following flags:
    - bits[3:0] trigger type and level flags
        1 = low-to-high edge triggered
        2 = high-to-low edge triggered
        4 = active high level-sensitive
        8 = active low level-sensitive

You could add

       18 = wakeup source

and extend to core to either do all the work for you, or tell you this
interrupt is flagged as being a wakeup source. This solution has the
advantage of it should be usable in other drivers.

	  Andrew

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help