Message ID | 20230807164151.1130-10-jszhang@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c44e:0:b0:3f2:4152:657d with SMTP id w14csp1636808vqr; Mon, 7 Aug 2023 11:36:32 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGj/YGLf0W/vwR6GWRZkoPcvYV8yGiY41194ccqgZgNcoKkewp/qEpfQGNd+jrJNxKhjQod X-Received: by 2002:a17:906:7696:b0:99c:56d1:7c71 with SMTP id o22-20020a170906769600b0099c56d17c71mr9643216ejm.26.1691433391813; Mon, 07 Aug 2023 11:36:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691433391; cv=none; d=google.com; s=arc-20160816; b=t97OAdgE5+fD+EOF0V5ENPWQApcep6hAoCL6CGon4J5jFE2Cc/LpZc5YqEZuzt77Ld Sj25Ptx4fDqAkTwov6gZ48M1az6r0Ksqb4x7mhQ3CALZqfJmvLObEerL3fNDh6F3zvAQ WxX1II+HpmAWAhnYB32twFr7j//wlPbxGfRsIfNzvQ1vXUs1rviDQB2Jl3TJDseCwI35 Q5tdG5CzPlxUuxxMWUGJutlkRmekGQNfhkRl7Zw+m1lXNVAN5PHHwwp74ToF23NVkGA+ nXnpHDJX7idanK+iHqxUaSXU9LN4yLVZ+RQj9oxHrysG+QvRA3m+oBy3wrStDbYQoyqZ nyow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=lx3YPFMG6cD5nC15S2MqB+hAxpLVld9+BhVprFyhf2M=; fh=UEVvRAFK6gmZxZNnJDUC7AmNk/iU78fiWA23OmiDi44=; b=yPGX3VVe3a1N4ea3FesxbZQ5VaXHRBLWyt1nQiAfrNKLl8kFB48CWL2vu4jehoA2S9 cmgC8Pbl9KTp9Bme/pVIxtRoArxN63BnWEJJ/USq6EgVWNpSQ9nMAmtDB6d7RJQ8qxMq NNHGgfED3sZVnAJSfGYCIfAjx8hn0ctRv2SzYAL5wsZQByBxSQbYz34QOJKwxDT4LJ9h Qq2ro2hzHuEm1GfttQ2BtINtC2bMstHBuZyaUWBTjZiYtIo84FmCRTAzLK60MMMD1Smu 0OZ+8ZILhXWxJYyBgGSMk3X4o5Z85tNkwZPzWHr5zNWzYsn2ez9c6a+HyMuuVOygp2cB Hvuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lk41pLhc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id os2-20020a170906af6200b009895e9b8819si5055842ejb.1051.2023.08.07.11.36.07; Mon, 07 Aug 2023 11:36:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lk41pLhc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231997AbjHGQyh (ORCPT <rfc822;aaronkmseo@gmail.com> + 99 others); Mon, 7 Aug 2023 12:54:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57338 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231370AbjHGQye (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 7 Aug 2023 12:54:34 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C28E71BF1; Mon, 7 Aug 2023 09:54:07 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 77A7061FB5; Mon, 7 Aug 2023 16:54:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 040E5C433C9; Mon, 7 Aug 2023 16:54:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691427246; bh=+gV2OwgbEESWlTBw1vccjy1Lziej65rySDz1k5zLKn4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lk41pLhcEvbcRlk0Ghwfq5+V5oNP2DVAqeH5W4Ji1yCDzYOVskRRfMmdUBPcV71cG 8R7ccknV2Caa0lPazKNgCTD7wow65XATCsKeZ9PayomLzLyrC0/92jaC8KlILrbSFZ GCoi7s+DeNf36Q2BJqlXv+iVoeSAH2KBt1gOhgS6MzRHvImiq7FyPyyZCCL8zsGAbD kZ2EDaJRQre4aUkygKuX1GaPsVB5BorIjpd2fmvYKA7io7UUPCsSv0XzhI1gF5a6Qt qC1kS/ovu2aACZ1BAUzD4RkgPblju27ZYfjbKMD0L5MxwKZ+z0blHbbUL8ucH6SteH mHkcONWri8Ipw== From: Jisheng Zhang <jszhang@kernel.org> To: "David S . Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org>, Giuseppe Cavallaro <peppe.cavallaro@st.com>, Alexandre Torgue <alexandre.torgue@foss.st.com>, Jose Abreu <joabreu@synopsys.com> Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Subject: [PATCH net-next v2 09/10] dt-bindings: net: snps,dwmac: add per channel irq support Date: Tue, 8 Aug 2023 00:41:50 +0800 Message-Id: <20230807164151.1130-10-jszhang@kernel.org> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230807164151.1130-1-jszhang@kernel.org> References: <20230807164151.1130-1-jszhang@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773596460376016023 X-GMAIL-MSGID: 1773596460376016023 |
Series |
net: stmmac: add new features to xgmac
|
|
Commit Message
Jisheng Zhang
Aug. 7, 2023, 4:41 p.m. UTC
The IP supports per channel interrupt, add support for this usage case.
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
---
.../devicetree/bindings/net/snps,dwmac.yaml | 33 +++++++++++++++++++
1 file changed, 33 insertions(+)
Comments
On Tue, Aug 08, 2023 at 12:41:50AM +0800, Jisheng Zhang wrote: > The IP supports per channel interrupt, add support for this usage case. > > Signed-off-by: Jisheng Zhang <jszhang@kernel.org> > --- > .../devicetree/bindings/net/snps,dwmac.yaml | 33 +++++++++++++++++++ > 1 file changed, 33 insertions(+) > > diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml > index 5d81042f5634..5a63302ad200 100644 > --- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml > +++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml > @@ -109,6 +109,7 @@ properties: > - description: The interrupt that occurs when Rx exits the LPI state > - description: The interrupt that occurs when Safety Feature Correctible Errors happen > - description: The interrupt that occurs when Safety Feature Uncorrectible Errors happen > + - description: All of the rx/tx per-channel interrupts > > interrupt-names: > minItems: 1 > @@ -118,6 +119,38 @@ properties: > - const: eth_lpi > - const: sfty_ce > - const: sfty_ue > + - const: rx0 > + - const: rx1 > + - const: rx2 > + - const: rx3 > + - const: rx4 > + - const: rx5 > + - const: rx6 > + - const: rx7 > + - const: rx8 > + - const: rx9 > + - const: rx10 > + - const: rx11 > + - const: rx12 > + - const: rx13 > + - const: rx14 > + - const: rx15 > + - const: tx0 > + - const: tx1 > + - const: tx2 > + - const: tx3 > + - const: tx4 > + - const: tx5 > + - const: tx6 > + - const: tx7 > + - const: tx8 > + - const: tx9 > + - const: tx10 > + - const: tx11 > + - const: tx12 > + - const: tx13 > + - const: tx14 > + - const: tx15 I don't think Rob's comment about having added 2 interrupts but 32 interrupt names has been resolved. Did you actually test putting this many interrupts into a node? AFAICT, any more than 6 will cause complaints. Thanks, Conor.
On Tue, Aug 08, 2023 at 08:39:58AM +0100, Conor Dooley wrote: > On Tue, Aug 08, 2023 at 12:41:50AM +0800, Jisheng Zhang wrote: > > The IP supports per channel interrupt, add support for this usage case. > > > > Signed-off-by: Jisheng Zhang <jszhang@kernel.org> > > --- > > .../devicetree/bindings/net/snps,dwmac.yaml | 33 +++++++++++++++++++ > > 1 file changed, 33 insertions(+) > > > > diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml > > index 5d81042f5634..5a63302ad200 100644 > > --- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml > > +++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml > > @@ -109,6 +109,7 @@ properties: > > - description: The interrupt that occurs when Rx exits the LPI state > > - description: The interrupt that occurs when Safety Feature Correctible Errors happen > > - description: The interrupt that occurs when Safety Feature Uncorrectible Errors happen > > + - description: All of the rx/tx per-channel interrupts > > > > interrupt-names: > > minItems: 1 > > @@ -118,6 +119,38 @@ properties: > > - const: eth_lpi > > - const: sfty_ce > > - const: sfty_ue > > + - const: rx0 > > + - const: rx1 > > + - const: rx2 > > + - const: rx3 > > + - const: rx4 > > + - const: rx5 > > + - const: rx6 > > + - const: rx7 > > + - const: rx8 > > + - const: rx9 > > + - const: rx10 > > + - const: rx11 > > + - const: rx12 > > + - const: rx13 > > + - const: rx14 > > + - const: rx15 > > + - const: tx0 > > + - const: tx1 > > + - const: tx2 > > + - const: tx3 > > + - const: tx4 > > + - const: tx5 > > + - const: tx6 > > + - const: tx7 > > + - const: tx8 > > + - const: tx9 > > + - const: tx10 > > + - const: tx11 > > + - const: tx12 > > + - const: tx13 > > + - const: tx14 > > + - const: tx15 > > I don't think Rob's comment about having added 2 interrupts but 32 > interrupt names has been resolved. I misunderstood Rob's comment. Now I'm not sure whether dt-binding can support regex or something or not, or let ask for advice in the following way: how could I write the dt-binding in this case? I didn't find similar examples so far. I'm not sure listing possible description and const properties for all channel interrupts is suitable. > Did you actually test putting this many interrupts into a node? > AFAICT, any more than 6 will cause complaints. I tried 12rx and 12tx interrupts in a node, didn't see dtc warning. so I guess the complaints are from dtb check? I will try to reproduce them. > > Thanks, > Conor.
On Thu, Aug 10, 2023 at 11:59:06PM +0800, Jisheng Zhang wrote: > On Tue, Aug 08, 2023 at 08:39:58AM +0100, Conor Dooley wrote: > > On Tue, Aug 08, 2023 at 12:41:50AM +0800, Jisheng Zhang wrote: > > > The IP supports per channel interrupt, add support for this usage case. > > > > > > Signed-off-by: Jisheng Zhang <jszhang@kernel.org> > > > --- > > > .../devicetree/bindings/net/snps,dwmac.yaml | 33 +++++++++++++++++++ > > > 1 file changed, 33 insertions(+) > > > > > > diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml > > > index 5d81042f5634..5a63302ad200 100644 > > > --- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml > > > +++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml > > > @@ -109,6 +109,7 @@ properties: > > > - description: The interrupt that occurs when Rx exits the LPI state > > > - description: The interrupt that occurs when Safety Feature Correctible Errors happen > > > - description: The interrupt that occurs when Safety Feature Uncorrectible Errors happen > > > + - description: All of the rx/tx per-channel interrupts > > > > > > interrupt-names: > > > minItems: 1 > > > @@ -118,6 +119,38 @@ properties: > > > - const: eth_lpi > > > - const: sfty_ce > > > - const: sfty_ue > > > + - const: rx0 > > > + - const: rx1 > > > + - const: rx2 > > > + - const: rx3 > > > + - const: rx4 > > > + - const: rx5 > > > + - const: rx6 > > > + - const: rx7 > > > + - const: rx8 > > > + - const: rx9 > > > + - const: rx10 > > > + - const: rx11 > > > + - const: rx12 > > > + - const: rx13 > > > + - const: rx14 > > > + - const: rx15 > > > + - const: tx0 > > > + - const: tx1 > > > + - const: tx2 > > > + - const: tx3 > > > + - const: tx4 > > > + - const: tx5 > > > + - const: tx6 > > > + - const: tx7 > > > + - const: tx8 > > > + - const: tx9 > > > + - const: tx10 > > > + - const: tx11 > > > + - const: tx12 > > > + - const: tx13 > > > + - const: tx14 > > > + - const: tx15 > > > > I don't think Rob's comment about having added 2 interrupts but 32 > > interrupt names has been resolved. > > I misunderstood Rob's comment. Now I'm not sure whether dt-binding > can support regex or something or not, or let ask for advice in the > following way: how could I write the dt-binding in this case? I didn't > find similar examples so far. I'm not sure listing possible > description and const properties for all channel interrupts is suitable. I'm not sure that there is a better way. Rob maybe has a suggestion. > > Did you actually test putting this many interrupts into a node? > > AFAICT, any more than 6 will cause complaints. > > I tried 12rx and 12tx interrupts in a node, didn't see dtc warning. > so I guess the complaints are from dtb check? I will try to reproduce > them. I triggered some by putting more entries into the example in this binding & doing dt binding check.
On Thu, Aug 10, 2023 at 05:15:26PM +0100, Conor Dooley wrote: > On Thu, Aug 10, 2023 at 11:59:06PM +0800, Jisheng Zhang wrote: > > On Tue, Aug 08, 2023 at 08:39:58AM +0100, Conor Dooley wrote: > > > On Tue, Aug 08, 2023 at 12:41:50AM +0800, Jisheng Zhang wrote: > > > > The IP supports per channel interrupt, add support for this usage case. > > > > > > > > Signed-off-by: Jisheng Zhang <jszhang@kernel.org> > > > > --- > > > > .../devicetree/bindings/net/snps,dwmac.yaml | 33 +++++++++++++++++++ > > > > 1 file changed, 33 insertions(+) > > > > > > > > diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml > > > > index 5d81042f5634..5a63302ad200 100644 > > > > --- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml > > > > +++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml > > > > @@ -109,6 +109,7 @@ properties: > > > > - description: The interrupt that occurs when Rx exits the LPI state > > > > - description: The interrupt that occurs when Safety Feature Correctible Errors happen > > > > - description: The interrupt that occurs when Safety Feature Uncorrectible Errors happen > > > > + - description: All of the rx/tx per-channel interrupts > > > > > > > > interrupt-names: > > > > minItems: 1 > > > > @@ -118,6 +119,38 @@ properties: > > > > - const: eth_lpi > > > > - const: sfty_ce > > > > - const: sfty_ue > > > > + - const: rx0 > > > > + - const: rx1 > > > > + - const: rx2 > > > > + - const: rx3 > > > > + - const: rx4 > > > > + - const: rx5 > > > > + - const: rx6 > > > > + - const: rx7 > > > > + - const: rx8 > > > > + - const: rx9 > > > > + - const: rx10 > > > > + - const: rx11 > > > > + - const: rx12 > > > > + - const: rx13 > > > > + - const: rx14 > > > > + - const: rx15 > > > > + - const: tx0 > > > > + - const: tx1 > > > > + - const: tx2 > > > > + - const: tx3 > > > > + - const: tx4 > > > > + - const: tx5 > > > > + - const: tx6 > > > > + - const: tx7 > > > > + - const: tx8 > > > > + - const: tx9 > > > > + - const: tx10 > > > > + - const: tx11 > > > > + - const: tx12 > > > > + - const: tx13 > > > > + - const: tx14 > > > > + - const: tx15 > > > > > > I don't think Rob's comment about having added 2 interrupts but 32 > > > interrupt names has been resolved. > > > > I misunderstood Rob's comment. Now I'm not sure whether dt-binding > > can support regex or something or not, or let ask for advice in the > > following way: how could I write the dt-binding in this case? I didn't > > find similar examples so far. I'm not sure listing possible > > description and const properties for all channel interrupts is suitable. > > I'm not sure that there is a better way. Rob maybe has a suggestion. > > > > Did you actually test putting this many interrupts into a node? > > > AFAICT, any more than 6 will cause complaints. > > > > I tried 12rx and 12tx interrupts in a node, didn't see dtc warning. > > so I guess the complaints are from dtb check? I will try to reproduce > > them. > > I triggered some by putting more entries into the example in this > binding & doing dt binding check. I reproduced the complaints and fixed them by adding additionalItems and maxItems. PS: those per-channel and safety irqs are optional.
diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml index 5d81042f5634..5a63302ad200 100644 --- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml +++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml @@ -109,6 +109,7 @@ properties: - description: The interrupt that occurs when Rx exits the LPI state - description: The interrupt that occurs when Safety Feature Correctible Errors happen - description: The interrupt that occurs when Safety Feature Uncorrectible Errors happen + - description: All of the rx/tx per-channel interrupts interrupt-names: minItems: 1 @@ -118,6 +119,38 @@ properties: - const: eth_lpi - const: sfty_ce - const: sfty_ue + - const: rx0 + - const: rx1 + - const: rx2 + - const: rx3 + - const: rx4 + - const: rx5 + - const: rx6 + - const: rx7 + - const: rx8 + - const: rx9 + - const: rx10 + - const: rx11 + - const: rx12 + - const: rx13 + - const: rx14 + - const: rx15 + - const: tx0 + - const: tx1 + - const: tx2 + - const: tx3 + - const: tx4 + - const: tx5 + - const: tx6 + - const: tx7 + - const: tx8 + - const: tx9 + - const: tx10 + - const: tx11 + - const: tx12 + - const: tx13 + - const: tx14 + - const: tx15 clocks: minItems: 1