From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 886F2C4338F for ; Tue, 10 Aug 2021 14:35:54 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0846F60E9B for ; Tue, 10 Aug 2021 14:35:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 0846F60E9B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lunn.ch Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=H0BvKoq9Jzd1BBvPAIP1j0Y6LLfZGjp3uYjvpbR/NOs=; b=WxdAD7Mm/5ES4j fEn3NbafXM4XopyCpAzxIVOZC2pIKSHQMG670Vi1vGEIZXCjo3nbI6swr+8Gq5HOJUqIZaigVVJrs I9vPaemnAPHMjj5EkT1xizf24QotJPcXP5R+8pISQb44aCFumaBeijOwvT/cJXH5CkIX3XwYQfAxO AbQ56R8ypkEPIXqwlZxIoHWEm6/H4x1/EI6U5c7iWEHIelvic2IYhQ2cHjdSwC/m3zR0FjlbV0rH7 69/IhhNZnBQC2aNWSKzODjZyjPOhJmVGUrCoOzfGvxM4bEdLKkdqwSRs+QJS7SU60xBD7n64MUVni 5/B+GSdsmCg+CL5aIYpQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mDSog-004Dtc-ND; Tue, 10 Aug 2021 14:33:18 +0000 Received: from vps0.lunn.ch ([185.16.172.187]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mDSoa-004Drc-He for linux-arm-kernel@lists.infradead.org; Tue, 10 Aug 2021 14:33:16 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=3FxL/4S4YmrQ+IWKQjnrpQVFunMNvpe9IajSsBJ9+jM=; b=xmpRAlZqaHdbLxX7ChgXsuhmse zrIYeTvO9v6JolQjUytMTEX+UmMI1Jedhxl2nz6zjt2z1DCEGQM1xkwSCJLQGieLeZVKpE5t418DV rVVBRsXnuhng9//M+3v6h7BEvl9Z6nrPeln1nAmwSV5ENgjSD7gv4a43zGbzLqTAyfVM=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1mDSoM-00Gv7f-0A; Tue, 10 Aug 2021 16:32:58 +0200 Date: Tue, 10 Aug 2021 16:32:57 +0200 From: Andrew Lunn To: Joakim Zhang Cc: Florian Fainelli , "davem@davemloft.net" , "kuba@kernel.org" , "robh+dt@kernel.org" , "shawnguo@kernel.org" , "s.hauer@pengutronix.de" , "festevam@gmail.com" , "kernel@pengutronix.de" , dl-linux-imx , "netdev@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" Subject: Re: [PATCH net-next 1/3] dt-bindings: net: fsl, fec: add "fsl, wakeup-irq" property Message-ID: References: <20210805074615.29096-1-qiangqing.zhang@nxp.com> <20210805074615.29096-2-qiangqing.zhang@nxp.com> <2e1a14bf-2fa8-ed39-d133-807c4e14859c@gmail.com> <498f3cee-8f37-2ab1-93c4-5472572ecc37@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210810_073312_677379_08101E83 X-CRM114-Status: GOOD ( 12.10 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org > > > 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A32C8C4338F for ; Tue, 10 Aug 2021 14:33:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 84E8E60560 for ; Tue, 10 Aug 2021 14:33:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240469AbhHJOde (ORCPT ); Tue, 10 Aug 2021 10:33:34 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:42928 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240212AbhHJOdb (ORCPT ); Tue, 10 Aug 2021 10:33:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=3FxL/4S4YmrQ+IWKQjnrpQVFunMNvpe9IajSsBJ9+jM=; b=xmpRAlZqaHdbLxX7ChgXsuhmse zrIYeTvO9v6JolQjUytMTEX+UmMI1Jedhxl2nz6zjt2z1DCEGQM1xkwSCJLQGieLeZVKpE5t418DV rVVBRsXnuhng9//M+3v6h7BEvl9Z6nrPeln1nAmwSV5ENgjSD7gv4a43zGbzLqTAyfVM=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1mDSoM-00Gv7f-0A; Tue, 10 Aug 2021 16:32:58 +0200 Date: Tue, 10 Aug 2021 16:32:57 +0200 From: Andrew Lunn To: Joakim Zhang Cc: Florian Fainelli , "davem@davemloft.net" , "kuba@kernel.org" , "robh+dt@kernel.org" , "shawnguo@kernel.org" , "s.hauer@pengutronix.de" , "festevam@gmail.com" , "kernel@pengutronix.de" , dl-linux-imx , "netdev@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" Subject: Re: [PATCH net-next 1/3] dt-bindings: net: fsl, fec: add "fsl, wakeup-irq" property Message-ID: References: <20210805074615.29096-1-qiangqing.zhang@nxp.com> <20210805074615.29096-2-qiangqing.zhang@nxp.com> <2e1a14bf-2fa8-ed39-d133-807c4e14859c@gmail.com> <498f3cee-8f37-2ab1-93c4-5472572ecc37@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org > > > 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