linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Joakim Zhang <qiangqing.zhang@nxp.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"kuba@kernel.org" <kuba@kernel.org>,
	"robh+dt@kernel.org" <robh+dt@kernel.org>,
	"shawnguo@kernel.org" <shawnguo@kernel.org>,
	"s.hauer@pengutronix.de" <s.hauer@pengutronix.de>,
	"festevam@gmail.com" <festevam@gmail.com>,
	"kernel@pengutronix.de" <kernel@pengutronix.de>,
	dl-linux-imx <linux-imx@nxp.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH net-next 1/3] dt-bindings: net: fsl, fec: add "fsl, wakeup-irq" property
Date: Tue, 10 Aug 2021 16:32:57 +0200	[thread overview]
Message-ID: <YRKOGYwx1uVdsKoF@lunn.ch> (raw)
In-Reply-To: <DB8PR04MB6795DC35D0387637052E64A1E6F79@DB8PR04MB6795.eurprd04.prod.outlook.com>

> > > 1) FEC controller has up to 4 interrupt lines and all of these are routed to GIC
> > interrupt controller.
> > > 2) FEC has a wakeup interrupt signal and always are mixed with other
> > interrupt signals, and then output to one interrupt line.
> > > 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

  reply	other threads:[~2021-08-10 14:33 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-05  7:46 [PATCH net-next 0/3] net: fec: add support to select wakeup irq source Joakim Zhang
2021-08-05  7:46 ` [PATCH net-next 1/3] dt-bindings: net: fsl,fec: add "fsl,wakeup-irq" property Joakim Zhang
2021-08-05  9:18   ` [PATCH net-next 1/3] dt-bindings: net: fsl, fec: add "fsl, wakeup-irq" property Florian Fainelli
2021-08-09  5:08     ` Joakim Zhang
2021-08-09 18:39       ` Florian Fainelli
2021-08-10  2:21         ` Joakim Zhang
2021-08-10 14:32           ` Andrew Lunn [this message]
2021-08-11  7:57             ` Joakim Zhang
2021-08-11 16:16               ` Andrew Lunn
2021-08-13 18:22               ` Rob Herring
2021-08-16  6:48                 ` Joakim Zhang
2021-08-10 17:45           ` Florian Fainelli
2021-08-11  8:06             ` Joakim Zhang
2021-08-12  9:46               ` Florian Fainelli
2021-08-05  7:46 ` [PATCH net-next 2/3] net: fec: add support to select wakeup irq source Joakim Zhang
2021-08-05  7:46 ` [PATCH net-next 3/3] arm64: dts: imx8m: add "fsl,wakeup-irq" property for FEC Joakim Zhang

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=YRKOGYwx1uVdsKoF@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=f.fainelli@gmail.com \
    --cc=festevam@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=qiangqing.zhang@nxp.com \
    --cc=robh+dt@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    /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).