From patchwork Mon Mar 13 22:50:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Serge Semin X-Patchwork-Id: 1756603 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2620:137:e000::1:20; helo=out1.vger.email; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=baikalelectronics.ru header.i=@baikalelectronics.ru header.a=rsa-sha256 header.s=post header.b=U7y0JqJZ; dkim-atps=neutral Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by legolas.ozlabs.org (Postfix) with ESMTP id 4PbBk94r2sz246l for ; Tue, 14 Mar 2023 09:52:17 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230184AbjCMWwO (ORCPT ); Mon, 13 Mar 2023 18:52:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57480 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230138AbjCMWwI (ORCPT ); Mon, 13 Mar 2023 18:52:08 -0400 Received: from post.baikalelectronics.com (post.baikalelectronics.com [213.79.110.86]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0264512866; Mon, 13 Mar 2023 15:51:40 -0700 (PDT) Received: from post.baikalelectronics.com (localhost.localdomain [127.0.0.1]) by post.baikalelectronics.com (Proxmox) with ESMTP id 19318E0EB2; Tue, 14 Mar 2023 01:51:08 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= baikalelectronics.ru; h=cc:cc:content-transfer-encoding :content-type:content-type:date:from:from:in-reply-to:message-id :mime-version:references:reply-to:subject:subject:to:to; s=post; bh=pK/cCmy7hQrJyE9NQeB9yO2KIq8yqVfTtGldxs03tag=; b=U7y0JqJZtuQk TZbJt1w2qXDtOvlw+MFw+lU2b/i7IxrJ0odcBIOIq3uAqDxT6HwpQDxrFhYDhVla DqnKru53elR3fQ/RIOOTVo6EsI1HSVORdl6lOMv3/lmWXeQ7a5dWz9bR93RGMoNs jOTmLTyCHgVdOihClF39lFNerh2dxPI= Received: from mail.baikal.int (mail.baikal.int [192.168.51.25]) by post.baikalelectronics.com (Proxmox) with ESMTP id 025FDE0E6A; Tue, 14 Mar 2023 01:51:08 +0300 (MSK) Received: from localhost (10.8.30.10) by mail (192.168.51.25) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 14 Mar 2023 01:51:07 +0300 From: Serge Semin To: Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Rob Herring , Krzysztof Kozlowski CC: Serge Semin , Serge Semin , Alexey Malahov , Pavel Parkhomenko , Christian Marangi , Richard Cochran , Biao Huang , Yang Yingliang , , , , , , Rob Herring Subject: [PATCH net-next 01/16] dt-bindings: net: dwmac: Validate PBL for all IP-cores Date: Tue, 14 Mar 2023 01:50:48 +0300 Message-ID: <20230313225103.30512-2-Sergey.Semin@baikalelectronics.ru> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230313225103.30512-1-Sergey.Semin@baikalelectronics.ru> References: <20230313225103.30512-1-Sergey.Semin@baikalelectronics.ru> MIME-Version: 1.0 X-Originating-IP: [10.8.30.10] X-ClientProxiedBy: MAIL.baikal.int (192.168.51.25) To mail (192.168.51.25) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,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: X-Mailing-List: devicetree@vger.kernel.org Indeed the maximum DMA burst length can be programmed not only for DW xGMACs, Allwinner EMACs and Spear SoC GMAC, but in accordance with [1] for Generic DW *MAC IP-cores. Moreover the STMMAC set of drivers parse the property and then apply the configuration for all supported DW MAC devices. All of that makes the property being available for all IP-cores the bindings supports. Let's make sure the PBL-related properties are validated for all of them by the common DW MAC DT schema. [1] DesignWare Cores Ethernet MAC Universal Databook, Revision 3.73a, October 2013, p. 380. Signed-off-by: Serge Semin Reviewed-by: Rob Herring --- Changelog v1: - Use correct syntax of the JSON pointers, so the later would begin with a '/' after the '#'. --- .../devicetree/bindings/net/snps,dwmac.yaml | 77 +++++++------------ 1 file changed, 26 insertions(+), 51 deletions(-) diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml index 16b7d2904696..a0a0437eb4f0 100644 --- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml +++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml @@ -426,6 +426,32 @@ properties: description: Use Address-Aligned Beats + snps,pbl: + description: + Programmable Burst Length (tx and rx) + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [2, 4, 8] + + snps,txpbl: + description: + Tx Programmable Burst Length. If set, DMA tx will use this + value rather than snps,pbl. + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [2, 4, 8] + + snps,rxpbl: + description: + Rx Programmable Burst Length. If set, DMA rx will use this + value rather than snps,pbl. + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [2, 4, 8] + + snps,no-pbl-x8: + $ref: /schemas/types.yaml#/definitions/flag + description: + Don\'t multiply the pbl/txpbl/rxpbl values by 8. For core + rev < 3.50, don\'t multiply the values by 4. + snps,fixed-burst: $ref: /schemas/types.yaml#/definitions/flag description: @@ -556,57 +582,6 @@ dependencies: allOf: - $ref: "ethernet-controller.yaml#" - - if: - properties: - compatible: - contains: - enum: - - allwinner,sun7i-a20-gmac - - allwinner,sun8i-a83t-emac - - allwinner,sun8i-h3-emac - - allwinner,sun8i-r40-gmac - - allwinner,sun8i-v3s-emac - - allwinner,sun50i-a64-emac - - ingenic,jz4775-mac - - ingenic,x1000-mac - - ingenic,x1600-mac - - ingenic,x1830-mac - - ingenic,x2000-mac - - snps,dwmac-3.50a - - snps,dwmac-4.10a - - snps,dwmac-4.20a - - snps,dwxgmac - - snps,dwxgmac-2.10 - - st,spear600-gmac - - then: - properties: - snps,pbl: - description: - Programmable Burst Length (tx and rx) - $ref: /schemas/types.yaml#/definitions/uint32 - enum: [1, 2, 4, 8, 16, 32] - - snps,txpbl: - description: - Tx Programmable Burst Length. If set, DMA tx will use this - value rather than snps,pbl. - $ref: /schemas/types.yaml#/definitions/uint32 - enum: [1, 2, 4, 8, 16, 32] - - snps,rxpbl: - description: - Rx Programmable Burst Length. If set, DMA rx will use this - value rather than snps,pbl. - $ref: /schemas/types.yaml#/definitions/uint32 - enum: [1, 2, 4, 8, 16, 32] - - snps,no-pbl-x8: - $ref: /schemas/types.yaml#/definitions/flag - description: - Don\'t multiply the pbl/txpbl/rxpbl values by 8. For core - rev < 3.50, don\'t multiply the values by 4. - - if: properties: compatible: From patchwork Mon Mar 13 22:50:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Serge Semin X-Patchwork-Id: 1756605 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2620:137:e000::1:20; helo=out1.vger.email; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=baikalelectronics.ru header.i=@baikalelectronics.ru header.a=rsa-sha256 header.s=post header.b=R1LVmsJT; dkim-atps=neutral Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by legolas.ozlabs.org (Postfix) with ESMTP id 4PbBkF5hm3z1yWr for ; Tue, 14 Mar 2023 09:52:21 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230175AbjCMWwT (ORCPT ); Mon, 13 Mar 2023 18:52:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57480 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229765AbjCMWwN (ORCPT ); Mon, 13 Mar 2023 18:52:13 -0400 Received: from post.baikalelectronics.com (post.baikalelectronics.com [213.79.110.86]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5E10617CF1; Mon, 13 Mar 2023 15:51:48 -0700 (PDT) Received: from post.baikalelectronics.com (localhost.localdomain [127.0.0.1]) by post.baikalelectronics.com (Proxmox) with ESMTP id 7D222E0EB3; Tue, 14 Mar 2023 01:51:09 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= baikalelectronics.ru; h=cc:cc:content-transfer-encoding :content-type:content-type:date:from:from:in-reply-to:message-id :mime-version:references:reply-to:subject:subject:to:to; s=post; bh=kthLOnTvdI5B68iXv3NtNVKvPTWVJkrui6RMOnKn7gs=; b=R1LVmsJTQUkR epWSuw/HlktHE+Y1XsNC3ZqFoXyCuTD2sBXtPmC6kKs7+v2Qi1OLu/sZk9PZVU8h YH7CD27aixfnJrARjyWIMtnu7CuqjJDB6Y1NUH9//5oeSk4zQ12acVxA7uWrln+C oeKATIua1dM6JQr4ZWEeD9npu32Xmes= Received: from mail.baikal.int (mail.baikal.int [192.168.51.25]) by post.baikalelectronics.com (Proxmox) with ESMTP id 6B321E0E6A; Tue, 14 Mar 2023 01:51:09 +0300 (MSK) Received: from localhost (10.8.30.10) by mail (192.168.51.25) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 14 Mar 2023 01:51:08 +0300 From: Serge Semin To: Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Rob Herring , Krzysztof Kozlowski CC: Serge Semin , Serge Semin , Alexey Malahov , Pavel Parkhomenko , Christian Marangi , Richard Cochran , Biao Huang , Yang Yingliang , , , , , , Rob Herring Subject: [PATCH net-next 02/16] dt-bindings: net: dwmac: Extend number of PBL values Date: Tue, 14 Mar 2023 01:50:49 +0300 Message-ID: <20230313225103.30512-3-Sergey.Semin@baikalelectronics.ru> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230313225103.30512-1-Sergey.Semin@baikalelectronics.ru> References: <20230313225103.30512-1-Sergey.Semin@baikalelectronics.ru> MIME-Version: 1.0 X-Originating-IP: [10.8.30.10] X-ClientProxiedBy: MAIL.baikal.int (192.168.51.25) To mail (192.168.51.25) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,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: X-Mailing-List: devicetree@vger.kernel.org In accordance with [1] the permitted PBL values can be set as one of [1, 2, 4, 8, 16, 32]. The rest of the values result in undefined behavior. At the same time some of the permitted values can be also invalid depending on the controller FIFOs size and the data bus width. Due to having too many variables all the possible PBL property constraints can't be implemented in the bindings schema, let's extend the set of permitted PBL values to be as much as the configuration register supports leaving the undefined behaviour cases for developers to handle. [1] DesignWare Cores Ethernet MAC Universal Databook, Revision 3.73a, October 2013, p. 380. Signed-off-by: Serge Semin Reviewed-by: Rob Herring --- Changelog v1: - Use correct syntax of the JSON pointers, so the later would begin with a '/' after the '#'. --- Documentation/devicetree/bindings/net/snps,dwmac.yaml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml index a0a0437eb4f0..fb9b8506a48f 100644 --- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml +++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml @@ -428,23 +428,26 @@ properties: snps,pbl: description: - Programmable Burst Length (tx and rx) + Programmable Burst Length (tx and rx). Note some of these values + can be still invalid due to HW limitations connected with the data + bus width and the FIFOs depth, so a total length of a single DMA + burst shouldn't exceed half the FIFO depth. $ref: /schemas/types.yaml#/definitions/uint32 - enum: [2, 4, 8] + enum: [1, 2, 4, 8, 16, 32] snps,txpbl: description: Tx Programmable Burst Length. If set, DMA tx will use this value rather than snps,pbl. $ref: /schemas/types.yaml#/definitions/uint32 - enum: [2, 4, 8] + enum: [1, 2, 4, 8, 16, 32] snps,rxpbl: description: Rx Programmable Burst Length. If set, DMA rx will use this value rather than snps,pbl. $ref: /schemas/types.yaml#/definitions/uint32 - enum: [2, 4, 8] + enum: [1, 2, 4, 8, 16, 32] snps,no-pbl-x8: $ref: /schemas/types.yaml#/definitions/flag From patchwork Mon Mar 13 22:50:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Serge Semin X-Patchwork-Id: 1756604 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2620:137:e000::1:20; helo=out1.vger.email; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=baikalelectronics.ru header.i=@baikalelectronics.ru header.a=rsa-sha256 header.s=post header.b=nsN4DFTn; dkim-atps=neutral Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by legolas.ozlabs.org (Postfix) with ESMTP id 4PbBkF1FpFz1yWr for ; Tue, 14 Mar 2023 09:52:21 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229813AbjCMWwS (ORCPT ); Mon, 13 Mar 2023 18:52:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57294 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230137AbjCMWwO (ORCPT ); Mon, 13 Mar 2023 18:52:14 -0400 Received: from post.baikalelectronics.com (post.baikalelectronics.com [213.79.110.86]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1A65F49F0; Mon, 13 Mar 2023 15:51:51 -0700 (PDT) Received: from post.baikalelectronics.com (localhost.localdomain [127.0.0.1]) by post.baikalelectronics.com (Proxmox) with ESMTP id DDD01E0EB4; Tue, 14 Mar 2023 01:51:10 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= baikalelectronics.ru; h=cc:cc:content-transfer-encoding :content-type:content-type:date:from:from:in-reply-to:message-id :mime-version:references:reply-to:subject:subject:to:to; s=post; bh=VFkPUzOm4WO2kZ00mW10/1EQVEqfv291U9mtDB6u7+g=; b=nsN4DFTnkKHe c+gHezWyGZF/KYPFyUOHVDz/QIMSOZVaFSlsGE0XK+k7ULDofcqyuFEcqSOPQuSQ +F5qVSEO+Z57uioppuZwpAifeBYkXttIYY4raz4DwYvlix/4nEQCHI6sWOmDsPHZ XWA10Gc9VYZl/KqllKOVK4Ms9CedCtk= Received: from mail.baikal.int (mail.baikal.int [192.168.51.25]) by post.baikalelectronics.com (Proxmox) with ESMTP id CD137E0E6A; Tue, 14 Mar 2023 01:51:10 +0300 (MSK) Received: from localhost (10.8.30.10) by mail (192.168.51.25) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 14 Mar 2023 01:51:10 +0300 From: Serge Semin To: Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Rob Herring , Krzysztof Kozlowski CC: Serge Semin , Serge Semin , Alexey Malahov , Pavel Parkhomenko , Christian Marangi , Richard Cochran , Biao Huang , Yang Yingliang , , , , , , Rob Herring Subject: [PATCH net-next 03/16] dt-bindings: net: dwmac: Fix the TSO property declaration Date: Tue, 14 Mar 2023 01:50:50 +0300 Message-ID: <20230313225103.30512-4-Sergey.Semin@baikalelectronics.ru> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230313225103.30512-1-Sergey.Semin@baikalelectronics.ru> References: <20230313225103.30512-1-Sergey.Semin@baikalelectronics.ru> MIME-Version: 1.0 X-Originating-IP: [10.8.30.10] X-ClientProxiedBy: MAIL.baikal.int (192.168.51.25) To mail (192.168.51.25) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,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: X-Mailing-List: devicetree@vger.kernel.org Indeed the STMMAC driver doesn't take the vendor-specific compatible string into account to parse the "snps,tso" boolean property. It just makes sure the node is compatible with DW MAC 4.x, 5.x and DW xGMAC IP-cores. The original allwinner sunXi bindings file also didn't have the TSO-related property declared. Neither Ingenic nor Loongson LLD drivers activate the GMAC4/5/etc-specific core code. Taking all of that into account fix the conditional statement so the TSO-property would be evaluated for the compatibles having the corresponding IP-core version by dropping all of the vendor-specific compatibles from the property conditional statement. Signed-off-by: Serge Semin Reviewed-by: Rob Herring --- Note this won't break the bindings description, since the "snps,tso" property isn't parsed by the denoted glue drivers, but only by the generic platform DT-parser. Changelog v1: - Use correct syntax of the JSON pointers, so the later would begin with a '/' after the '#'. --- .../devicetree/bindings/net/snps,dwmac.yaml | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml index fb9b8506a48f..92feed3c29bc 100644 --- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml +++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml @@ -590,27 +590,12 @@ allOf: compatible: contains: enum: - - allwinner,sun7i-a20-gmac - - allwinner,sun8i-a83t-emac - - allwinner,sun8i-h3-emac - - allwinner,sun8i-r40-gmac - - allwinner,sun8i-v3s-emac - - allwinner,sun50i-a64-emac - - loongson,ls2k-dwmac - - loongson,ls7a-dwmac - - ingenic,jz4775-mac - - ingenic,x1000-mac - - ingenic,x1600-mac - - ingenic,x1830-mac - - ingenic,x2000-mac - snps,dwmac-4.00 - snps,dwmac-4.10a - snps,dwmac-4.20a - snps,dwmac-5.10a - snps,dwxgmac - snps,dwxgmac-2.10 - - st,spear600-gmac - then: properties: snps,tso: From patchwork Mon Mar 13 22:50:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Serge Semin X-Patchwork-Id: 1756618 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2620:137:e000::1:20; helo=out1.vger.email; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=baikalelectronics.ru header.i=@baikalelectronics.ru header.a=rsa-sha256 header.s=post header.b=Cutu09l6; dkim-atps=neutral Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by legolas.ozlabs.org (Postfix) with ESMTP id 4PbBw25WlBz246l for ; Tue, 14 Mar 2023 10:00:50 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229578AbjCMXAr (ORCPT ); Mon, 13 Mar 2023 19:00:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46768 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230139AbjCMXA2 (ORCPT ); Mon, 13 Mar 2023 19:00:28 -0400 Received: from post.baikalelectronics.com (post.baikalelectronics.com [213.79.110.86]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id BB5381ACDB; Mon, 13 Mar 2023 15:59:52 -0700 (PDT) Received: from post.baikalelectronics.com (localhost.localdomain [127.0.0.1]) by post.baikalelectronics.com (Proxmox) with ESMTP id 07D5DE0EB5; Tue, 14 Mar 2023 01:51:13 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= baikalelectronics.ru; h=cc:cc:content-transfer-encoding :content-type:content-type:date:from:from:in-reply-to:message-id :mime-version:references:reply-to:subject:subject:to:to; s=post; bh=N0KiAqfklGN/cwCh1WSz63GI/ELUsm0TaCCC6dXn1zo=; b=Cutu09l6xqVa xaIMw0AweMsGMt5BY9x/9+9ek4fvOhE7Ts9ep06UTS//PC4Dlt1rZSyCML3eGOyh K0pYECLmBYunXE3ZM7AdY1AipxLYhsix1sfDMNujRnKh+BMen0GhBAfomsPUfgkQ bNads3d2gLSiBgcK6OM6aqCwn7bTk/g= Received: from mail.baikal.int (mail.baikal.int [192.168.51.25]) by post.baikalelectronics.com (Proxmox) with ESMTP id E7733E0E6A; Tue, 14 Mar 2023 01:51:12 +0300 (MSK) Received: from localhost (10.8.30.10) by mail (192.168.51.25) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 14 Mar 2023 01:51:12 +0300 From: Serge Semin To: Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Rob Herring , Krzysztof Kozlowski CC: Serge Semin , Serge Semin , Alexey Malahov , Pavel Parkhomenko , Christian Marangi , Richard Cochran , Biao Huang , Yang Yingliang , , , , , , Rob Herring , Alexandre Torgue Subject: [PATCH net-next 04/16] dt-bindings: net: dwmac: Detach Generic DW MAC bindings Date: Tue, 14 Mar 2023 01:50:51 +0300 Message-ID: <20230313225103.30512-5-Sergey.Semin@baikalelectronics.ru> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230313225103.30512-1-Sergey.Semin@baikalelectronics.ru> References: <20230313225103.30512-1-Sergey.Semin@baikalelectronics.ru> MIME-Version: 1.0 X-Originating-IP: [10.8.30.10] X-ClientProxiedBy: MAIL.baikal.int (192.168.51.25) To mail (192.168.51.25) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,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: X-Mailing-List: devicetree@vger.kernel.org Currently the snps,dwmac.yaml DT bindings file is used for both DT nodes describing generic DW MAC devices and as DT schema with common properties to be evaluated against a vendor-specific DW MAC IP-cores. Due to such dual-purpose design the "compatible" property of the common DW MAC schema needs to contain the vendor-specific strings to successfully pass the schema evaluation in case if it's referenced from the vendor-specific DT bindings. That's a bad design from maintainability point of view, since adding/removing any DW MAC-based device bindings requires the common schema modification. In order to fix that let's detach the schema which provides the generic DW MAC DT nodes evaluation into a dedicated DT bindings file preserving the common DW MAC properties declaration in the snps,dwmac.yaml file. By doing so we'll still provide a common properties evaluation for each vendor-specific MAC bindings which refer to the common bindings file, while the generic DW MAC DT nodes will be checked against the new snps,dwmac-generic.yaml DT schema. While at it extend the DW GMAC and xGMAC compatibles set with known to be released DW GMAC v3.72a, 3.73a, 3.74a and DW xGMAC v2.11a IP-cores. Signed-off-by: Serge Semin Reviewed-by: Rob Herring --- Changelog v1: - Add a note to the snps,dwmac-generic.yaml bindings file description of a requirement to create a new DT bindings file for the vendor-specific versions of the DW MAC. Link: https://lore.kernel.org/linux-arm-kernel/20210208135609.7685-8-Sergey.Semin@baikalelectronics.ru Changelog v2: - Replace double quotes with single ones in the select pattern strings. After doing so we can discard escaping the backslash in the regexpes. - Add DW GMAC v3.72a, 3.73a, 3.74a and DW xGMAC v2.11a compatibles. --- .../bindings/net/snps,dwmac-generic.yaml | 155 ++++++++++++++++++ .../devicetree/bindings/net/snps,dwmac.yaml | 149 +---------------- MAINTAINERS | 1 + 3 files changed, 158 insertions(+), 147 deletions(-) create mode 100644 Documentation/devicetree/bindings/net/snps,dwmac-generic.yaml diff --git a/Documentation/devicetree/bindings/net/snps,dwmac-generic.yaml b/Documentation/devicetree/bindings/net/snps,dwmac-generic.yaml new file mode 100644 index 000000000000..ae740a1ab213 --- /dev/null +++ b/Documentation/devicetree/bindings/net/snps,dwmac-generic.yaml @@ -0,0 +1,155 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/snps,dwmac-generic.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Synopsys DesignWare Generic MAC Device Tree Bindings + +maintainers: + - Alexandre Torgue + - Giuseppe Cavallaro + - Jose Abreu + +description: + The primary purpose of this bindings file is to validate the Generic + Synopsys Desginware MAC DT nodes defined in accordance with the select + schema. All new vendor-specific versions of the DW *MAC IP-cores must + be described in a dedicated DT bindings file. + +# Select the DT nodes, which have got compatible strings either as just a +# single string with IP-core name optionally followed by the IP version or +# two strings: one with IP-core name plus the IP version, another as just +# the IP-core name. +select: + properties: + compatible: + oneOf: + - items: + - pattern: '^snps,dw(xg)+mac(-[0-9]+\.[0-9]+a?)?$' + - items: + - pattern: '^snps,dwmac-[0-9]+\.[0-9]+a?$' + - const: snps,dwmac + - items: + - pattern: '^snps,dwxgmac-[0-9]+\.[0-9]+a?$' + - const: snps,dwxgmac + + required: + - compatible + +allOf: + - $ref: snps,dwmac.yaml# + +properties: + compatible: + oneOf: + - description: Generic Synopsys DW MAC + oneOf: + - items: + - enum: + - snps,dwmac-3.40a + - snps,dwmac-3.50a + - snps,dwmac-3.610 + - snps,dwmac-3.70a + - snps,dwmac-3.710 + - snps,dwmac-3.72a + - snps,dwmac-3.73a + - snps,dwmac-3.74a + - snps,dwmac-4.00 + - snps,dwmac-4.10a + - snps,dwmac-4.20a + - const: snps,dwmac + - const: snps,dwmac + - description: Generic Synopsys DW xGMAC + oneOf: + - items: + - enum: + - snps,dwxgmac-2.10 + - snps,dwxgmac-2.11a + - const: snps,dwxgmac + - const: snps,dwxgmac + - description: ST SPEAr SoC Family GMAC + deprecated: true + const: st,spear600-gmac + + reg: + maxItems: 1 + +unevaluatedProperties: false + +examples: + - | + ethernet@e0800000 { + compatible = "snps,dwxgmac-2.10", "snps,dwxgmac"; + reg = <0xe0800000 0x8000>; + + interrupt-parent = <&vic1>; + interrupts = <24 23 22>; + interrupt-names = "macirq", "eth_wake_irq", "eth_lpi"; + + mac-address = [000000000000]; /* Filled in by U-Boot */ + max-frame-size = <3800>; + + snps,multicast-filter-bins = <256>; + snps,perfect-filter-entries = <128>; + + rx-fifo-depth = <16384>; + tx-fifo-depth = <16384>; + + clocks = <&clock>; + clock-names = "stmmaceth"; + + phy-mode = "gmii"; + + snps,axi-config = <&stmmac_axi_setup>; + snps,mtl-rx-config = <&mtl_rx_setup>; + snps,mtl-tx-config = <&mtl_tx_setup>; + + stmmac_axi_setup: stmmac-axi-config { + snps,wr_osr_lmt = <0xf>; + snps,rd_osr_lmt = <0xf>; + snps,blen = <256 128 64 32 0 0 0>; + }; + + mtl_rx_setup: rx-queues-config { + snps,rx-queues-to-use = <1>; + snps,rx-sched-sp; + + queue0 { + snps,dcb-algorithm; + snps,map-to-dma-channel = <0x0>; + snps,priority = <0x0>; + }; + }; + + mtl_tx_setup: tx-queues-config { + snps,tx-queues-to-use = <2>; + snps,tx-sched-wrr; + + queue0 { + snps,weight = <0x10>; + snps,dcb-algorithm; + snps,priority = <0x0>; + }; + + queue1 { + snps,avb-algorithm; + snps,send_slope = <0x1000>; + snps,idle_slope = <0x1000>; + snps,high_credit = <0x3E800>; + snps,low_credit = <0xFFC18000>; + snps,priority = <0x1>; + }; + }; + + mdio { + compatible = "snps,dwmac-mdio"; + #address-cells = <1>; + #size-cells = <0>; + + phy0: ethernet-phy@0 { + reg = <0>; + }; + }; + }; +... diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml index 92feed3c29bc..224f8f70db85 100644 --- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml +++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml @@ -11,85 +11,9 @@ maintainers: - Giuseppe Cavallaro - Jose Abreu -# Select every compatible, including the deprecated ones. This way, we -# will be able to report a warning when we have that compatible, since -# we will validate the node thanks to the select, but won't report it -# as a valid value in the compatible property description -select: - properties: - compatible: - contains: - enum: - - snps,dwmac - - snps,dwmac-3.40a - - snps,dwmac-3.50a - - snps,dwmac-3.610 - - snps,dwmac-3.70a - - snps,dwmac-3.710 - - snps,dwmac-4.00 - - snps,dwmac-4.10a - - snps,dwmac-4.20a - - snps,dwmac-5.10a - - snps,dwxgmac - - snps,dwxgmac-2.10 - - # Deprecated - - st,spear600-gmac - - required: - - compatible +select: false properties: - - # We need to include all the compatibles from schemas that will - # include that schemas, otherwise compatible won't validate for - # those. - compatible: - contains: - enum: - - allwinner,sun7i-a20-gmac - - allwinner,sun8i-a83t-emac - - allwinner,sun8i-h3-emac - - allwinner,sun8i-r40-gmac - - allwinner,sun8i-v3s-emac - - allwinner,sun50i-a64-emac - - amlogic,meson6-dwmac - - amlogic,meson8b-dwmac - - amlogic,meson8m2-dwmac - - amlogic,meson-gxbb-dwmac - - amlogic,meson-axg-dwmac - - ingenic,jz4775-mac - - ingenic,x1000-mac - - ingenic,x1600-mac - - ingenic,x1830-mac - - ingenic,x2000-mac - - loongson,ls2k-dwmac - - loongson,ls7a-dwmac - - renesas,r9a06g032-gmac - - renesas,rzn1-gmac - - rockchip,px30-gmac - - rockchip,rk3128-gmac - - rockchip,rk3228-gmac - - rockchip,rk3288-gmac - - rockchip,rk3328-gmac - - rockchip,rk3366-gmac - - rockchip,rk3368-gmac - - rockchip,rk3588-gmac - - rockchip,rk3399-gmac - - rockchip,rv1108-gmac - - snps,dwmac - - snps,dwmac-3.40a - - snps,dwmac-3.50a - - snps,dwmac-3.610 - - snps,dwmac-3.70a - - snps,dwmac-3.710 - - snps,dwmac-4.00 - - snps,dwmac-4.10a - - snps,dwmac-4.20a - - snps,dwmac-5.10a - - snps,dwxgmac - - snps,dwxgmac-2.10 - reg: minItems: 1 maxItems: 2 @@ -596,6 +520,7 @@ allOf: - snps,dwmac-5.10a - snps,dwxgmac - snps,dwxgmac-2.10 + - snps,dwxgmac-2.11a then: properties: snps,tso: @@ -606,74 +531,4 @@ allOf: additionalProperties: true -examples: - - | - gmac0: ethernet@e0800000 { - compatible = "snps,dwxgmac-2.10", "snps,dwxgmac"; - reg = <0xe0800000 0x8000>; - interrupt-parent = <&vic1>; - interrupts = <24 23 22>; - interrupt-names = "macirq", "eth_wake_irq", "eth_lpi"; - mac-address = [000000000000]; /* Filled in by U-Boot */ - max-frame-size = <3800>; - phy-mode = "gmii"; - snps,multicast-filter-bins = <256>; - snps,perfect-filter-entries = <128>; - rx-fifo-depth = <16384>; - tx-fifo-depth = <16384>; - clocks = <&clock>; - clock-names = "stmmaceth"; - snps,axi-config = <&stmmac_axi_setup>; - snps,mtl-rx-config = <&mtl_rx_setup>; - snps,mtl-tx-config = <&mtl_tx_setup>; - - stmmac_axi_setup: stmmac-axi-config { - snps,wr_osr_lmt = <0xf>; - snps,rd_osr_lmt = <0xf>; - snps,blen = <256 128 64 32 0 0 0>; - }; - - mtl_rx_setup: rx-queues-config { - snps,rx-queues-to-use = <1>; - snps,rx-sched-sp; - queue0 { - snps,dcb-algorithm; - snps,map-to-dma-channel = <0x0>; - snps,priority = <0x0>; - }; - }; - - mtl_tx_setup: tx-queues-config { - snps,tx-queues-to-use = <2>; - snps,tx-sched-wrr; - queue0 { - snps,weight = <0x10>; - snps,dcb-algorithm; - snps,priority = <0x0>; - }; - - queue1 { - snps,avb-algorithm; - snps,send_slope = <0x1000>; - snps,idle_slope = <0x1000>; - snps,high_credit = <0x3E800>; - snps,low_credit = <0xFFC18000>; - snps,priority = <0x1>; - }; - }; - - mdio0 { - #address-cells = <1>; - #size-cells = <0>; - compatible = "snps,dwmac-mdio"; - phy1: ethernet-phy@0 { - reg = <0>; - }; - }; - }; - -# FIXME: We should set it, but it would report all the generic -# properties as additional properties. -# additionalProperties: false - ... diff --git a/MAINTAINERS b/MAINTAINERS index ec57c42ed544..30d90d9daa9c 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -20017,6 +20017,7 @@ M: Jose Abreu L: netdev@vger.kernel.org S: Supported W: http://www.stlinux.com +F: Documentation/devicetree/bindings/net/snps,dwmac*.yaml F: Documentation/networking/device_drivers/ethernet/stmicro/ F: drivers/net/ethernet/stmicro/stmmac/ From patchwork Mon Mar 13 22:50:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Serge Semin X-Patchwork-Id: 1756606 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2620:137:e000::1:20; helo=out1.vger.email; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=baikalelectronics.ru header.i=@baikalelectronics.ru header.a=rsa-sha256 header.s=post header.b=AEiiwI5J; dkim-atps=neutral Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by legolas.ozlabs.org (Postfix) with ESMTP id 4PbBl56Yb9z1yWr for ; Tue, 14 Mar 2023 09:53:05 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230186AbjCMWxD (ORCPT ); Mon, 13 Mar 2023 18:53:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58632 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230234AbjCMWwx (ORCPT ); Mon, 13 Mar 2023 18:52:53 -0400 Received: from post.baikalelectronics.com (post.baikalelectronics.com [213.79.110.86]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 872208C0DA; Mon, 13 Mar 2023 15:52:15 -0700 (PDT) Received: from post.baikalelectronics.com (localhost.localdomain [127.0.0.1]) by post.baikalelectronics.com (Proxmox) with ESMTP id 79972E0EB6; Tue, 14 Mar 2023 01:51:14 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= baikalelectronics.ru; h=cc:cc:content-transfer-encoding :content-type:content-type:date:from:from:in-reply-to:message-id :mime-version:references:reply-to:subject:subject:to:to; s=post; bh=kB5Ypu9uI3/FVnScRsT5+ZCB/6/xGkijVX1+bsbiHl8=; b=AEiiwI5J1GW3 D/CidPHbAkj76a8RRcOgx654EoNK2OStvsjMtS4MEDlWxcM8AZMYkpHGHJ26Jleb 5WRkgKgzT+IEOYdGquZxV0kmd/1GbW/hVCKvLrBwTDIRFXbVpulymvcCiMjCF3DP LQeGU7zYIPNRS5PWZ1Qo2az1Js2YFX0= Received: from mail.baikal.int (mail.baikal.int [192.168.51.25]) by post.baikalelectronics.com (Proxmox) with ESMTP id 63DCDE0E6A; Tue, 14 Mar 2023 01:51:14 +0300 (MSK) Received: from localhost (10.8.30.10) by mail (192.168.51.25) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 14 Mar 2023 01:51:13 +0300 From: Serge Semin To: Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Rob Herring , Krzysztof Kozlowski CC: Serge Semin , Serge Semin , Alexey Malahov , Pavel Parkhomenko , Christian Marangi , Richard Cochran , Biao Huang , Yang Yingliang , , , , , Subject: [PATCH net-next 05/16] dt-bindings: net: dwmac: Elaborate snps,clk-csr description Date: Tue, 14 Mar 2023 01:50:52 +0300 Message-ID: <20230313225103.30512-6-Sergey.Semin@baikalelectronics.ru> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230313225103.30512-1-Sergey.Semin@baikalelectronics.ru> References: <20230313225103.30512-1-Sergey.Semin@baikalelectronics.ru> MIME-Version: 1.0 X-Originating-IP: [10.8.30.10] X-ClientProxiedBy: MAIL.baikal.int (192.168.51.25) To mail (192.168.51.25) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,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: X-Mailing-List: devicetree@vger.kernel.org The property is utilized to set the CSR-MDC clock selector in the STMMAC driver. The specified value is used instead of auto-detecting the CSR/application clocks divider based on the reference clock rate. Let's add a more detailed description to clarify the property purpose and permitted values. In the later case the constraints are specified based on the DW *MAC CR registers permitted values. Signed-off-by: Serge Semin Acked-by: Krzysztof Kozlowski --- Documentation/devicetree/bindings/net/snps,dwmac.yaml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml index 224f8f70db85..edef405766e4 100644 --- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml +++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml @@ -427,7 +427,15 @@ properties: snps,clk-csr: $ref: /schemas/types.yaml#/definitions/uint32 description: - Frequency division factor for MDC clock. + CSR-MDC clock selector. It sets up a divider of the CSR/application + clock to create an MDC signal with desired frequency. Note the + property value doesn't specify the divider itself by encodes the + corresponding divider value specific to the IP-core. + DW GMAC 0 - 42, 1 - 62, 2 - 16, 3 - 26, 4 - 102, 5 - 124, 8 - 4, + 9 - 6, 10 - 8, 11 - 10, 12 - 12, 13 - 14, 14 - 16, 15 - 18. + DW xGMAC 0 - 62, 1 - 102, 2 - 122, 3 - 142, 4 - 162, 5 - 202. + minimum: 0 + maximum: 15 mdio: $ref: mdio.yaml# From patchwork Mon Mar 13 22:50:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Serge Semin X-Patchwork-Id: 1756608 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2620:137:e000::1:20; helo=out1.vger.email; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=baikalelectronics.ru header.i=@baikalelectronics.ru header.a=rsa-sha256 header.s=post header.b=iNRjn9CH; dkim-atps=neutral Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by legolas.ozlabs.org (Postfix) with ESMTP id 4PbBl65lCDz1yWr for ; Tue, 14 Mar 2023 09:53:06 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229519AbjCMWxF (ORCPT ); Mon, 13 Mar 2023 18:53:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57294 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230240AbjCMWwy (ORCPT ); Mon, 13 Mar 2023 18:52:54 -0400 Received: from post.baikalelectronics.com (post.baikalelectronics.com [213.79.110.86]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 85E938B064; Mon, 13 Mar 2023 15:52:15 -0700 (PDT) Received: from post.baikalelectronics.com (localhost.localdomain [127.0.0.1]) by post.baikalelectronics.com (Proxmox) with ESMTP id 0903DE0EB7; Tue, 14 Mar 2023 01:51:16 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= baikalelectronics.ru; h=cc:cc:content-transfer-encoding :content-type:content-type:date:from:from:in-reply-to:message-id :mime-version:references:reply-to:subject:subject:to:to; s=post; bh=oyRmDVoN+2lAomqaOYUxFd6Rs2QRCU3KaCv853AjErI=; b=iNRjn9CHeGAW ovD3bq746Zx0qmkDhXjwwClvb6q8j+ts/mn6WBauv2l4//vaxR8YwoXDnoqYDsM/ kWLtXoKfBn0fZfJXfzzjY0A34xL9wCEV7bGpCavA6gXGsyXh91rOGpHB/Y+NmZcA Wmh0L1vlts+pO3pgU4LkvFBZgxUFFIk= Received: from mail.baikal.int (mail.baikal.int [192.168.51.25]) by post.baikalelectronics.com (Proxmox) with ESMTP id D28EDE0E6A; Tue, 14 Mar 2023 01:51:15 +0300 (MSK) Received: from localhost (10.8.30.10) by mail (192.168.51.25) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 14 Mar 2023 01:51:15 +0300 From: Serge Semin To: Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Rob Herring , Krzysztof Kozlowski CC: Serge Semin , Serge Semin , Alexey Malahov , Pavel Parkhomenko , Christian Marangi , Richard Cochran , Biao Huang , Yang Yingliang , , , , , , Rob Herring Subject: [PATCH net-next 06/16] dt-bindings: net: dwmac: Elaborate stmmaceth/pclk clocks description Date: Tue, 14 Mar 2023 01:50:53 +0300 Message-ID: <20230313225103.30512-7-Sergey.Semin@baikalelectronics.ru> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230313225103.30512-1-Sergey.Semin@baikalelectronics.ru> References: <20230313225103.30512-1-Sergey.Semin@baikalelectronics.ru> MIME-Version: 1.0 X-Originating-IP: [10.8.30.10] X-ClientProxiedBy: MAIL.baikal.int (192.168.51.25) To mail (192.168.51.25) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,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: X-Mailing-List: devicetree@vger.kernel.org Current clocks description doesn't provide a comprehensive notion about what "stmmaceth" and "pclk" actually represent from the IP-core manual point of view. The bindings file states: stmmaceth - "GMAC main clock", apb - "Peripheral registers interface clock". It isn't that easy to understand what they actually mean especially seeing the DW *MAC manual operates with clock definitions like Application, System, Host, CSR, Transmit, Receive, etc clocks. Moreover the clocks usage in the driver doesn't shade a full light on their essence. What inferred from there is that the "stmmaceth" name has been assigned to the common clock, which feeds both system and CSR interfaces. But what about "apb"? The bindings defines it as the clock for "peripheral registers interface". So it's close to the CSR clock in the IP-core manual notation. If so then when "apb" clock is specified aside with the "stmmaceth", it represents a case when the DW *MAC is synthesized with CSR_SLV_CLK=y (separate system and CSR clocks). But even though the "apb" clock is requested in the MAC driver, the driver doesn't actually use it as a separate CSR clock where the IP-core manual requires. All of that makes me thinking that the case of separate system and CSR clocks isn't correctly implemented in the driver. Let's start with elaborating the clocks description so anyone reading the DW *MAC bindings file would understand that "stmmaceth" is the system clock and "pclk" is actually the CSR clock. Indeed in accordance with sheets depicted in [1]: system/application clock can be either of: hclk_i, aclk_i, clk_app_i; CSR clock can be either of: hclk_i, aclk_i, clk_app_i, clk_csr_i. (Similar definitions present in the others IP-core manuals.) So the CSR clock can be tied to the application clock considering the later as the main clock, but not the other way around. In case if there is only "stmmaceth" clock specified in a DT node, then it will be considered as a source of clock signal for both application and CSR. But if "pclk" is also specified in the list of the device clocks, then it will be perceived as the separate CSR clock. [1] DesignWare Cores Ethernet MAC Universal Databook, Revision 3.73a, October 2013, p. 564. Signed-off-by: Serge Semin Reviewed-by: Rob Herring --- .../devicetree/bindings/net/snps,dwmac.yaml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml index edef405766e4..3e3fbc1dfafa 100644 --- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml +++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml @@ -37,8 +37,16 @@ properties: maxItems: 8 additionalItems: true items: - - description: GMAC main clock - - description: Peripheral registers interface clock + - description: + GMAC main clock, also called as system/application clock. + This clock is used to provide a periodic signal for the DMA/MTL + interface and optionally for CSR, if the later isn't separately + clocked. + - description: + Peripheral registers interface clock, also called as CSR clock. + MCI, CSR and SMA interfaces run on this clock. If it's omitted, + the CSR interfaces are considered as synchronous to the system + clock domain. - description: PTP reference clock. This clock is used for programming the Timestamp Addend Register. If not passed then the system From patchwork Mon Mar 13 22:50:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Serge Semin X-Patchwork-Id: 1756607 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2620:137:e000::1:20; helo=out1.vger.email; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=baikalelectronics.ru header.i=@baikalelectronics.ru header.a=rsa-sha256 header.s=post header.b=VwmsGuVU; dkim-atps=neutral Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by legolas.ozlabs.org (Postfix) with ESMTP id 4PbBl62SXBz246l for ; Tue, 14 Mar 2023 09:53:06 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230212AbjCMWxE (ORCPT ); Mon, 13 Mar 2023 18:53:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58644 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230239AbjCMWwx (ORCPT ); Mon, 13 Mar 2023 18:52:53 -0400 Received: from post.baikalelectronics.com (post.baikalelectronics.com [213.79.110.86]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id AB5FF92272; Mon, 13 Mar 2023 15:52:15 -0700 (PDT) Received: from post.baikalelectronics.com (localhost.localdomain [127.0.0.1]) by post.baikalelectronics.com (Proxmox) with ESMTP id 6A534E0EB9; Tue, 14 Mar 2023 01:51:17 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= baikalelectronics.ru; h=cc:cc:content-transfer-encoding :content-type:content-type:date:from:from:in-reply-to:message-id :mime-version:references:reply-to:subject:subject:to:to; s=post; bh=t+BAksoLBvMdwjNyusiVd/cmC45uPfYJG0wpU1gUAzE=; b=VwmsGuVUNydU G1jwN8znsKEGQL7LviWXUesb9dR4Mcm2/X5qs2TvvH3QffaRl+yD14Nzmc5OZFwt 5bgKDRCopxdaAs2Fs5XZ0ay/GbC/ub03giIsaBK09s4pS1Uk7YGtJoV3QNXvvqE/ +tHOJr3agN5ynKCmYHGY22s2mVLpvc8= Received: from mail.baikal.int (mail.baikal.int [192.168.51.25]) by post.baikalelectronics.com (Proxmox) with ESMTP id 4DF0EE0E6A; Tue, 14 Mar 2023 01:51:17 +0300 (MSK) Received: from localhost (10.8.30.10) by mail (192.168.51.25) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 14 Mar 2023 01:51:16 +0300 From: Serge Semin To: Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Rob Herring , Krzysztof Kozlowski CC: Serge Semin , Serge Semin , Alexey Malahov , Pavel Parkhomenko , Christian Marangi , Richard Cochran , Biao Huang , Yang Yingliang , , , , , , Rob Herring Subject: [PATCH net-next 07/16] dt-bindings: net: dwmac: Add Tx/Rx clock sources Date: Tue, 14 Mar 2023 01:50:54 +0300 Message-ID: <20230313225103.30512-8-Sergey.Semin@baikalelectronics.ru> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230313225103.30512-1-Sergey.Semin@baikalelectronics.ru> References: <20230313225103.30512-1-Sergey.Semin@baikalelectronics.ru> MIME-Version: 1.0 X-Originating-IP: [10.8.30.10] X-ClientProxiedBy: MAIL.baikal.int (192.168.51.25) To mail (192.168.51.25) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,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: X-Mailing-List: devicetree@vger.kernel.org Generic DW *MAC can be connected to an external Transmit and Receive clock generators. Add the corresponding clocks description and clock-names to the generic bindings schema so new DW *MAC-based bindings wouldn't declare its own names of the same clocks. Signed-off-by: Serge Semin Reviewed-by: Rob Herring --- .../devicetree/bindings/net/snps,dwmac.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml index 3e3fbc1dfafa..01f385867c3a 100644 --- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml +++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml @@ -47,6 +47,18 @@ properties: MCI, CSR and SMA interfaces run on this clock. If it's omitted, the CSR interfaces are considered as synchronous to the system clock domain. + - description: + GMAC Tx clock or so called Transmit clock. The clock is supplied + by an external with respect to the DW MAC clock generator. + The clock source and its frequency depends on the DW MAC xMII mode. + In case if it's supplied by PHY/SerDes this property can be + omitted. + - description: + GMAC Rx clock or so called Receive clock. The clock is supplied + by an external with respect to the DW MAC clock generator. + The clock source and its frequency depends on the DW MAC xMII mode. + In case if it's supplied by PHY/SerDes or it's synchronous to + the Tx clock this property can be omitted. - description: PTP reference clock. This clock is used for programming the Timestamp Addend Register. If not passed then the system @@ -60,6 +72,8 @@ properties: enum: - stmmaceth - pclk + - tx + - rx - ptp_ref resets: From patchwork Mon Mar 13 22:50:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Serge Semin X-Patchwork-Id: 1756609 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2620:137:e000::1:20; helo=out1.vger.email; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=baikalelectronics.ru header.i=@baikalelectronics.ru header.a=rsa-sha256 header.s=post header.b=TYulQ7oy; dkim-atps=neutral Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by legolas.ozlabs.org (Postfix) with ESMTP id 4PbBlQ04Sxz1yWr for ; Tue, 14 Mar 2023 09:53:22 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230038AbjCMWxS (ORCPT ); Mon, 13 Mar 2023 18:53:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58332 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230028AbjCMWxC (ORCPT ); Mon, 13 Mar 2023 18:53:02 -0400 Received: from post.baikalelectronics.com (post.baikalelectronics.com [213.79.110.86]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4DC321F91E; Mon, 13 Mar 2023 15:52:18 -0700 (PDT) Received: from post.baikalelectronics.com (localhost.localdomain [127.0.0.1]) by post.baikalelectronics.com (Proxmox) with ESMTP id 400C2E0EBA; Tue, 14 Mar 2023 01:51:19 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= baikalelectronics.ru; h=cc:cc:content-transfer-encoding :content-type:content-type:date:from:from:in-reply-to:message-id :mime-version:references:reply-to:subject:subject:to:to; s=post; bh=PASsM/qfytAun14hsPY6sUMJYcEqmLZqm6dqWbnuxRA=; b=TYulQ7oyCxwP l8kO9WtAJOQtyUQbXYI5ug1OyfFfbKc8kdd2sW63nLwgtUQMhLdfXklH3Hkl1u2W fgFpp+5LmNn3Pk8DLmUcG6CknbLkCM64WrO1izL+BuMToAp7kYHPYURWbEjaVi/M TCatUUJUHhwO/Lu+B9F/ebAdo9H2pEQ= Received: from mail.baikal.int (mail.baikal.int [192.168.51.25]) by post.baikalelectronics.com (Proxmox) with ESMTP id C1FC6E0E6A; Tue, 14 Mar 2023 01:51:18 +0300 (MSK) Received: from localhost (10.8.30.10) by mail (192.168.51.25) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 14 Mar 2023 01:51:18 +0300 From: Serge Semin To: Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Rob Herring , Krzysztof Kozlowski CC: Serge Semin , Serge Semin , Alexey Malahov , Pavel Parkhomenko , Christian Marangi , Richard Cochran , Biao Huang , Yang Yingliang , , , , , Subject: [PATCH net-next 08/16] dt-bindings: net: dwmac: Drop prop names from snps,axi-config description Date: Tue, 14 Mar 2023 01:50:55 +0300 Message-ID: <20230313225103.30512-9-Sergey.Semin@baikalelectronics.ru> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230313225103.30512-1-Sergey.Semin@baikalelectronics.ru> References: <20230313225103.30512-1-Sergey.Semin@baikalelectronics.ru> MIME-Version: 1.0 X-Originating-IP: [10.8.30.10] X-ClientProxiedBy: MAIL.baikal.int (192.168.51.25) To mail (192.168.51.25) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,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: X-Mailing-List: devicetree@vger.kernel.org The property is supposed to contain a phandle reference to the DT-node with the AXI-bus parameters. Such DT-node is described in the same DT-bindings schema by means of the sub-node with the name "stmmac-axi-config". Similarly to MTL Tx/Rx config phandle properties let's drop the target DT-node properties list from the "snps,axi-config" property description since having that duplicate is not only pointless, but also worsens the bindings maintainability by causing a need to support the two identical lists. Instead the reference to the target DT-node is added to the description. Signed-off-by: Serge Semin Acked-by: Krzysztof Kozlowski --- .../devicetree/bindings/net/snps,dwmac.yaml | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml index 01f385867c3a..89be67e55c3e 100644 --- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml +++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml @@ -98,17 +98,9 @@ properties: snps,axi-config: $ref: /schemas/types.yaml#/definitions/phandle description: - AXI BUS Mode parameters. Phandle to a node that can contain the - following properties - * snps,lpi_en, enable Low Power Interface - * snps,xit_frm, unlock on WoL - * snps,wr_osr_lmt, max write outstanding req. limit - * snps,rd_osr_lmt, max read outstanding req. limit - * snps,kbbe, do not cross 1KiB boundary. - * snps,blen, this is a vector of supported burst length. - * snps,fb, fixed-burst - * snps,mb, mixed-burst - * snps,rb, rebuild INCRx Burst + AXI BUS Mode parameters. Phandle to a node that + implements the 'stmmac-axi-config' object described in + this binding. snps,mtl-rx-config: $ref: /schemas/types.yaml#/definitions/phandle From patchwork Mon Mar 13 22:50:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Serge Semin X-Patchwork-Id: 1756610 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2620:137:e000::1:20; helo=out1.vger.email; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=baikalelectronics.ru header.i=@baikalelectronics.ru header.a=rsa-sha256 header.s=post header.b=SKtYgXiu; dkim-atps=neutral Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by legolas.ozlabs.org (Postfix) with ESMTP id 4PbBld5n5Jz1yWr for ; Tue, 14 Mar 2023 09:53:33 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230092AbjCMWxb (ORCPT ); Mon, 13 Mar 2023 18:53:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58574 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230111AbjCMWxD (ORCPT ); Mon, 13 Mar 2023 18:53:03 -0400 Received: from post.baikalelectronics.com (post.baikalelectronics.com [213.79.110.86]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4D96672BB; Mon, 13 Mar 2023 15:52:18 -0700 (PDT) Received: from post.baikalelectronics.com (localhost.localdomain [127.0.0.1]) by post.baikalelectronics.com (Proxmox) with ESMTP id 2E4DEE0EBC; Tue, 14 Mar 2023 01:51:21 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= baikalelectronics.ru; h=cc:cc:content-transfer-encoding :content-type:content-type:date:from:from:in-reply-to:message-id :mime-version:references:reply-to:subject:subject:to:to; s=post; bh=Y6oIna2GYsMa/tMSylL09FYzZvzOQ9lU2CFxdQGOfk0=; b=SKtYgXiuZg8S apeiyaaMAoOItS4nHGsGT8jBPqU1dYK1JbgTyXFxti7Ojg7do32VL0YqEt4XFiK2 pfM82JbaZ0/G9zbTCQXLz06JusQB2qt1BNst8Aubak4/rko4X7Jvu77e2LUs6WPB mwRvjSNsFz50lqF06FtsQrT3c8Dsi5Y= Received: from mail.baikal.int (mail.baikal.int [192.168.51.25]) by post.baikalelectronics.com (Proxmox) with ESMTP id A1151E0EBB; Tue, 14 Mar 2023 01:51:20 +0300 (MSK) Received: from localhost (10.8.30.10) by mail (192.168.51.25) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 14 Mar 2023 01:51:19 +0300 From: Serge Semin To: Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Rob Herring , Krzysztof Kozlowski CC: Serge Semin , Serge Semin , Alexey Malahov , Pavel Parkhomenko , Christian Marangi , Richard Cochran , Biao Huang , Yang Yingliang , , , , , Subject: [PATCH net-next 09/16] dt-bindings: net: dwmac: Prohibit additional props in AXI-config Date: Tue, 14 Mar 2023 01:50:56 +0300 Message-ID: <20230313225103.30512-10-Sergey.Semin@baikalelectronics.ru> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230313225103.30512-1-Sergey.Semin@baikalelectronics.ru> References: <20230313225103.30512-1-Sergey.Semin@baikalelectronics.ru> MIME-Version: 1.0 X-Originating-IP: [10.8.30.10] X-ClientProxiedBy: MAIL.baikal.int (192.168.51.25) To mail (192.168.51.25) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,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: X-Mailing-List: devicetree@vger.kernel.org Currently DT-schema of the AXI-bus config sub-node prohibits to have unknown properties by using the unevaluatedProperties property. It's overkill for the sub-node which doesn't use any combining schemas keywords (allOf, anyOf, etc). Instead more natural is to use additionalProperties to prohibit for that. Signed-off-by: Serge Semin --- Documentation/devicetree/bindings/net/snps,dwmac.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml index 89be67e55c3e..d1b2910b799b 100644 --- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml +++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml @@ -466,7 +466,6 @@ properties: stmmac-axi-config: type: object - unevaluatedProperties: false description: AXI BUS Mode parameters. @@ -518,6 +517,8 @@ properties: description: rebuild INCRx Burst + additionalProperties: false + required: - compatible - reg From patchwork Mon Mar 13 22:50:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Serge Semin X-Patchwork-Id: 1756612 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2620:137:e000::1:20; helo=out1.vger.email; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=baikalelectronics.ru header.i=@baikalelectronics.ru header.a=rsa-sha256 header.s=post header.b=ZuW2NnJX; dkim-atps=neutral Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by legolas.ozlabs.org (Postfix) with ESMTP id 4PbBll1fjzz1yWr for ; Tue, 14 Mar 2023 09:53:39 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229757AbjCMWxh (ORCPT ); Mon, 13 Mar 2023 18:53:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58996 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229612AbjCMWxH (ORCPT ); Mon, 13 Mar 2023 18:53:07 -0400 Received: from post.baikalelectronics.com (post.baikalelectronics.com [213.79.110.86]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 77A8792726; Mon, 13 Mar 2023 15:52:27 -0700 (PDT) Received: from post.baikalelectronics.com (localhost.localdomain [127.0.0.1]) by post.baikalelectronics.com (Proxmox) with ESMTP id 5CF5CE0EBB; Tue, 14 Mar 2023 01:51:22 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= baikalelectronics.ru; h=cc:cc:content-transfer-encoding :content-type:content-type:date:from:from:in-reply-to:message-id :mime-version:references:reply-to:subject:subject:to:to; s=post; bh=/8CHQKcSQNOd84jUFb0GyleIApZIHIOE6ipgEgcboPQ=; b=ZuW2NnJXGaCa c8rmEbdZS4jhKDKbFuLmgLUJ+xIQ3xyiHEkmBOC7PdC6lZ7b+c5VFWNEbQPmZX/r BJAccZwbsCKjZvg5sCodLLvxDU7/kYeB0NoZnb+fLzdRMC1+gNOzYG+fYnWWmvKc TVssdaQGDKLUn6Eam7qkE2qryHILJKM= Received: from mail.baikal.int (mail.baikal.int [192.168.51.25]) by post.baikalelectronics.com (Proxmox) with ESMTP id 3DF24E0E6A; Tue, 14 Mar 2023 01:51:22 +0300 (MSK) Received: from localhost (10.8.30.10) by mail (192.168.51.25) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 14 Mar 2023 01:51:21 +0300 From: Serge Semin To: Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Rob Herring , Krzysztof Kozlowski CC: Serge Semin , Serge Semin , Alexey Malahov , Pavel Parkhomenko , Christian Marangi , Richard Cochran , Biao Huang , Yang Yingliang , , , , , Subject: [PATCH net-next 10/16] dt-bindings: net: dwmac: Add AXI-bus properties constraints Date: Tue, 14 Mar 2023 01:50:57 +0300 Message-ID: <20230313225103.30512-11-Sergey.Semin@baikalelectronics.ru> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230313225103.30512-1-Sergey.Semin@baikalelectronics.ru> References: <20230313225103.30512-1-Sergey.Semin@baikalelectronics.ru> MIME-Version: 1.0 X-Originating-IP: [10.8.30.10] X-ClientProxiedBy: MAIL.baikal.int (192.168.51.25) To mail (192.168.51.25) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,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: X-Mailing-List: devicetree@vger.kernel.org Currently none of the AXI-bus non-boolean DT-properties have constraints defined meanwhile they can be specified at least based on the corresponding device configs. Let's do that: + snps,wr_osr_lm/snps,rd_osr_lmt - maximum number of outstanding AXI-bus read/write requests is limited with the IP-core synthesize parameter AXI_MAX_{RD,WR}_REQ. DW MAC/GMAC: <= 16, DW Eth QoS: <= 32, DW xGMAC: <= 64. The least restrictive constraint is defined since the DT-schema is common for all IP-cores. + snps,blen - array of the burst lengths supported by the AXI-bus. Values are limited by the AXI3/4 bus standard, available AXI/System bus CSR flags and the AXI-bus IP-core synthesize config . All DW *MACs support setting the burst length within the set: 4, 8, 16, 32, 64, 128, 256. If some burst length is unsupported a zero value can be specified instead in the array. Signed-off-by: Serge Semin --- Documentation/devicetree/bindings/net/snps,dwmac.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml index d1b2910b799b..f24718a8d184 100644 --- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml +++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml @@ -484,11 +484,17 @@ properties: $ref: /schemas/types.yaml#/definitions/uint32 description: max write outstanding req. limit + default: 1 + minimum: 1 + maximum: 64 snps,rd_osr_lmt: $ref: /schemas/types.yaml#/definitions/uint32 description: max read outstanding req. limit + default: 1 + minimum: 1 + maximum: 64 snps,kbbe: $ref: /schemas/types.yaml#/definitions/uint32 @@ -501,6 +507,8 @@ properties: this is a vector of supported burst length. minItems: 7 maxItems: 7 + items: + enum: [256, 128, 64, 32, 16, 8, 4, 0] snps,fb: $ref: /schemas/types.yaml#/definitions/flag From patchwork Mon Mar 13 22:50:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Serge Semin X-Patchwork-Id: 1756611 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2620:137:e000::1:20; helo=out1.vger.email; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=baikalelectronics.ru header.i=@baikalelectronics.ru header.a=rsa-sha256 header.s=post header.b=mogFCfYv; dkim-atps=neutral Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by legolas.ozlabs.org (Postfix) with ESMTP id 4PbBlh37JWz1yWr for ; Tue, 14 Mar 2023 09:53:36 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230370AbjCMWxd (ORCPT ); Mon, 13 Mar 2023 18:53:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58634 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230232AbjCMWxF (ORCPT ); Mon, 13 Mar 2023 18:53:05 -0400 Received: from post.baikalelectronics.com (post.baikalelectronics.com [213.79.110.86]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id EBB9C92700; Mon, 13 Mar 2023 15:52:22 -0700 (PDT) Received: from post.baikalelectronics.com (localhost.localdomain [127.0.0.1]) by post.baikalelectronics.com (Proxmox) with ESMTP id 481C7E0EBD; Tue, 14 Mar 2023 01:51:24 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= baikalelectronics.ru; h=cc:cc:content-transfer-encoding :content-type:content-type:date:from:from:in-reply-to:message-id :mime-version:references:reply-to:subject:subject:to:to; s=post; bh=+OS7gKmNrCQi7J6HvsjQM8Wy5XPVxZEjlX8wgOsbMHA=; b=mogFCfYvuc56 kfRSaRAV+ww3e+h3XSTnsXj6z9p27ZhEZU5QmlFLM9dZLWFMbsJD/A3xjpoGcjc/ CiA47wdQWh/sbBxzNJDbCm7JrShd6jlLALTI9cQ3mQ4jTmt3sueHpo3fnkYI6C0R SOl+sO6oJEfs2qfK8C9sN2YOFqhK+RE= Received: from mail.baikal.int (mail.baikal.int [192.168.51.25]) by post.baikalelectronics.com (Proxmox) with ESMTP id EF31AE0E6A; Tue, 14 Mar 2023 01:51:23 +0300 (MSK) Received: from localhost (10.8.30.10) by mail (192.168.51.25) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 14 Mar 2023 01:51:23 +0300 From: Serge Semin To: Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Rob Herring , Krzysztof Kozlowski CC: Serge Semin , Serge Semin , Alexey Malahov , Pavel Parkhomenko , Christian Marangi , Richard Cochran , Biao Huang , Yang Yingliang , , , , , Subject: [PATCH net-next 11/16] dt-bindings: net: dwmac: Add MTL Rx Queue properties constraints Date: Tue, 14 Mar 2023 01:50:58 +0300 Message-ID: <20230313225103.30512-12-Sergey.Semin@baikalelectronics.ru> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230313225103.30512-1-Sergey.Semin@baikalelectronics.ru> References: <20230313225103.30512-1-Sergey.Semin@baikalelectronics.ru> MIME-Version: 1.0 X-Originating-IP: [10.8.30.10] X-ClientProxiedBy: MAIL.baikal.int (192.168.51.25) To mail (192.168.51.25) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,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: X-Mailing-List: devicetree@vger.kernel.org Currently none of the MTL Rx Queues QoS-related DT-properties have been equipped with the proper constraints. Meanwhile they can be specified at least based on the corresponding CSR field sizes or the DW (x|xG)MAC IP-core synthesize parameter constraints. Let's do that: + snps,rx-queues-to-use - number of Rx queues to utilise is limited with a number of available queues. DW MAC/GMAC: no queues, DW Eth QoS: <= 8, DW xGMAC: <= 12. + snps,map-to-dma-channel - DMA channel ID is limited with a number of available DMA-channels. DW MAC/GMAC: <= 3, DW Eth QoS: <= 8, DW xGMAC: <= 16. + snps,priority - bitfield of the USP (user Priority) values of the tagged packets is limited with the corresponding CSR field width or a maximum possible VLAN tag PRI field value (it's 7). DW MAC/GMAC: no queues, DW Eth QoS: 0xff, DW xGMAC: 0xff. Since the constraints vary for different IP-cores and the DT-schema is common for all of them the least restrictive values are chosen. The info above can be used for the IP-core specific DT-schemas if anybody ever is bothered with one to create. Signed-off-by: Serge Semin Acked-by: Krzysztof Kozlowski --- .../devicetree/bindings/net/snps,dwmac.yaml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml index f24718a8d184..e5662b1498b7 100644 --- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml +++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml @@ -115,6 +115,10 @@ properties: snps,rx-queues-to-use: $ref: /schemas/types.yaml#/definitions/uint32 description: number of RX queues to be used in the driver + default: 1 + minimum: 1 + maximum: 12 + snps,rx-sched-sp: type: boolean description: Strict priority @@ -135,7 +139,7 @@ properties: properties: snps,rx-sched-sp: false patternProperties: - "^queue[0-9]$": + "^queue([0-9]|1[0-1])$": description: Each subnode represents a queue. type: object properties: @@ -148,6 +152,9 @@ properties: snps,map-to-dma-channel: $ref: /schemas/types.yaml#/definitions/uint32 description: DMA channel id to map + minimum: 0 + maximum: 15 + snps,route-avcp: type: boolean description: AV Untagged Control packets @@ -166,6 +173,9 @@ properties: snps,priority: $ref: /schemas/types.yaml#/definitions/uint32 description: Bitmask of the tagged frames priorities assigned to the queue + minimum: 0 + maximum: 0xFF + allOf: - if: required: From patchwork Mon Mar 13 22:50:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Serge Semin X-Patchwork-Id: 1756617 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2620:137:e000::1:20; helo=out1.vger.email; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=baikalelectronics.ru header.i=@baikalelectronics.ru header.a=rsa-sha256 header.s=post header.b=RzpF8eyD; dkim-atps=neutral Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by legolas.ozlabs.org (Postfix) with ESMTP id 4PbBvz71Nyz246l for ; Tue, 14 Mar 2023 10:00:47 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229482AbjCMXA0 (ORCPT ); Mon, 13 Mar 2023 19:00:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46526 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229957AbjCMXAW (ORCPT ); Mon, 13 Mar 2023 19:00:22 -0400 Received: from post.baikalelectronics.com (post.baikalelectronics.com [213.79.110.86]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E40658691; Mon, 13 Mar 2023 15:59:48 -0700 (PDT) Received: from post.baikalelectronics.com (localhost.localdomain [127.0.0.1]) by post.baikalelectronics.com (Proxmox) with ESMTP id 231BCE0EBE; Tue, 14 Mar 2023 01:51:26 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= baikalelectronics.ru; h=cc:cc:content-transfer-encoding :content-type:content-type:date:from:from:in-reply-to:message-id :mime-version:references:reply-to:subject:subject:to:to; s=post; bh=7MVrtnm6qrHIhyMF9F8ZCjZqai+ZJoeGYKX8whtHDxE=; b=RzpF8eyD0bFT LpgQVaXR27miDGoRlb2j8Q2Ima/XWvMj0j2Ovxl2X9H9aHQYRms2xMlDqYPDOcL6 /DVYsVbbfKl1LruGW7wf+dkXssg99k8UDCidTJAURYjXXpHNkJgLvSBg/pRK4JFm aI9ZkSDZ5DX4fmfbZsUsSYYYNZiAxqs= Received: from mail.baikal.int (mail.baikal.int [192.168.51.25]) by post.baikalelectronics.com (Proxmox) with ESMTP id 00EF5E0E6A; Tue, 14 Mar 2023 01:51:26 +0300 (MSK) Received: from localhost (10.8.30.10) by mail (192.168.51.25) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 14 Mar 2023 01:51:25 +0300 From: Serge Semin To: Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Rob Herring , Krzysztof Kozlowski CC: Serge Semin , Serge Semin , Alexey Malahov , Pavel Parkhomenko , Christian Marangi , Richard Cochran , Biao Huang , Yang Yingliang , , , , , , Alexandre Torgue Subject: [PATCH net-next 12/16] dt-bindings: net: dwmac: Add MTL Tx Queue properties constraints Date: Tue, 14 Mar 2023 01:50:59 +0300 Message-ID: <20230313225103.30512-13-Sergey.Semin@baikalelectronics.ru> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230313225103.30512-1-Sergey.Semin@baikalelectronics.ru> References: <20230313225103.30512-1-Sergey.Semin@baikalelectronics.ru> MIME-Version: 1.0 X-Originating-IP: [10.8.30.10] X-ClientProxiedBy: MAIL.baikal.int (192.168.51.25) To mail (192.168.51.25) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,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: X-Mailing-List: devicetree@vger.kernel.org Currently none of the MTL Tx Queues QoS-related DT-properties have been equipped with the proper constraints meanwhile they can be specified at least based on the corresponding CSR field sizes or the DW (x|xG)MAC IP-core synthesize parameter constraints. Let's do that: + snps,tx-queues-to-use - number of Tx queues to utilise is limited with a number of available queues. DW MAC/GMAC: no queues, DW Eth QoS: <= 8, DW xGMAC: <= 16. + snps,weight - Tx Queue/Traffic Class quantum/weight utilised depending on enabled algorithm for the Data Center Bridging feature: DWRR (up to 0x1312D0 bytes to add to credit) or WFQ (up to 0x3FFF - least bandwidth) or WFQ (up to 0x64). DW MAC/GMAC: no queues, DW Eth QoS: <= 0x1312D0, DW xGMAC: <= 0x1312D0. + snps,send_slope - Tx Queue/Traffic Class Send-Slope credit value subtracted from the accumulated credit for the Audio/Video bridging feature (CBS algorithm, bits per cycle scaled up by 1,024). DW MAC/GMAC: no queues, DW Eth QoS: <= 0x2000, DW xGMAC: <= 0x3FFF. + snps,idle_slope - same meaning as snps,send_slope except it's determines the Idle-Slope credit of CBS algorithm. DW MAC/GMAC: no queues, DW Eth QoS: <= 0x2000, DW xGMAC: <= 0x8000. + snps,high_credit/snps,low_credit - maximum and minimum values accumulated in the credit for the Audio/Video bridging feature (CBS algorithm, bits scaled up by 1,024). DW MAC/GMAC: no queues, DW Eth QoS: <= 0x1FFFFFFF, DW xGMAC: <= 0x1FFFFFFF. + snps,priority - Tx Queue/Traffic Class priority (enabled by the PFC-packets) limits determined by the VLAN tag PRI field width (it's 7). DW MAC/GMAC: no queues, DW Eth QoS: 0xff, DW xGMAC: 0xff. Since the constraints vary for different IP-cores and the DT-schema is common for all of them the least restrictive values are chosen. The info above can be used for the IP-core specific DT-schemas if anybody ever is bothered with one to create. Signed-off-by: Serge Semin --- .../bindings/net/snps,dwmac-generic.yaml | 2 +- .../devicetree/bindings/net/snps,dwmac.yaml | 24 ++++++++++++++++++- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/net/snps,dwmac-generic.yaml b/Documentation/devicetree/bindings/net/snps,dwmac-generic.yaml index ae740a1ab213..2974af79511d 100644 --- a/Documentation/devicetree/bindings/net/snps,dwmac-generic.yaml +++ b/Documentation/devicetree/bindings/net/snps,dwmac-generic.yaml @@ -137,7 +137,7 @@ examples: snps,send_slope = <0x1000>; snps,idle_slope = <0x1000>; snps,high_credit = <0x3E800>; - snps,low_credit = <0xFFC18000>; + snps,low_credit = <0x1FC18000>; snps,priority = <0x1>; }; }; diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml index e5662b1498b7..2ebf7995426b 100644 --- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml +++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml @@ -250,6 +250,10 @@ properties: snps,tx-queues-to-use: $ref: /schemas/types.yaml#/definitions/uint32 description: number of TX queues to be used in the driver + default: 1 + minimum: 1 + maximum: 16 + snps,tx-sched-wrr: type: boolean description: Weighted Round Robin @@ -296,13 +300,16 @@ properties: snps,tx-sched-wfq: false snps,tx-sched-dwrr: false patternProperties: - "^queue[0-9]$": + "^queue([0-9]|1[0-5])$": description: Each subnode represents a queue. type: object properties: snps,weight: $ref: /schemas/types.yaml#/definitions/uint32 description: TX queue weight (if using a DCB weight algorithm) + minimum: 0 + maximum: 0x1312D0 + snps,dcb-algorithm: type: boolean description: TX queue will be working in DCB @@ -315,15 +322,27 @@ properties: snps,send_slope: $ref: /schemas/types.yaml#/definitions/uint32 description: enable Low Power Interface + minimum: 0 + maximum: 0x3FFF + snps,idle_slope: $ref: /schemas/types.yaml#/definitions/uint32 description: unlock on WoL + minimum: 0 + maximum: 0x8000 + snps,high_credit: $ref: /schemas/types.yaml#/definitions/uint32 description: max write outstanding req. limit + minimum: 0 + maximum: 0x1FFFFFFF + snps,low_credit: $ref: /schemas/types.yaml#/definitions/uint32 description: max read outstanding req. limit + minimum: 0 + maximum: 0x1FFFFFFF + snps,priority: $ref: /schemas/types.yaml#/definitions/uint32 description: @@ -331,6 +350,9 @@ properties: When a PFC frame is received with priorities matching the bitmask, the queue is blocked from transmitting for the pause time specified in the PFC frame. + minimum: 0 + maximum: 0xFF + allOf: - if: required: From patchwork Mon Mar 13 22:51:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Serge Semin X-Patchwork-Id: 1756613 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2620:137:e000::1:20; helo=out1.vger.email; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=baikalelectronics.ru header.i=@baikalelectronics.ru header.a=rsa-sha256 header.s=post header.b=rsHkLLEA; dkim-atps=neutral Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by legolas.ozlabs.org (Postfix) with ESMTP id 4PbBmK3BzWz1yWr for ; Tue, 14 Mar 2023 09:54:09 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230353AbjCMWyH (ORCPT ); Mon, 13 Mar 2023 18:54:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59918 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230368AbjCMWxd (ORCPT ); Mon, 13 Mar 2023 18:53:33 -0400 Received: from post.baikalelectronics.com (post.baikalelectronics.com [213.79.110.86]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id DF39592F2C; Mon, 13 Mar 2023 15:52:53 -0700 (PDT) Received: from post.baikalelectronics.com (localhost.localdomain [127.0.0.1]) by post.baikalelectronics.com (Proxmox) with ESMTP id 50FC9E0EBF; Tue, 14 Mar 2023 01:51:28 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= baikalelectronics.ru; h=cc:cc:content-transfer-encoding :content-type:content-type:date:from:from:in-reply-to:message-id :mime-version:references:reply-to:subject:subject:to:to; s=post; bh=KQsws9NtBO6QlsruSY3+0FhvjbX+2h0WTEcfdAMql2o=; b=rsHkLLEACOd4 MLMrh1uCsrIY/0keomOkDe34risa0j+VGgK0mFNltJnIQ2RNaDlyf3jHNG1GxRWV 5Is6De4IdjTJkSxBjP4OuW1NdPtcpiBer0uz6ngIRdKEY9ypUW1D1LIAYIxXgh9S voPHE4s6yX7qOx+EheLu5ZNtdKtBNJo= Received: from mail.baikal.int (mail.baikal.int [192.168.51.25]) by post.baikalelectronics.com (Proxmox) with ESMTP id 0FADBE0E6A; Tue, 14 Mar 2023 01:51:28 +0300 (MSK) Received: from localhost (10.8.30.10) by mail (192.168.51.25) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 14 Mar 2023 01:51:27 +0300 From: Serge Semin To: Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Rob Herring , Krzysztof Kozlowski , Joao Pinto CC: Serge Semin , Serge Semin , Alexey Malahov , Pavel Parkhomenko , Christian Marangi , Richard Cochran , Biao Huang , Yang Yingliang , , , , , Subject: [PATCH net-next 13/16] dt-bindings: net: dwmac: Fix MTL Tx Queue props description Date: Tue, 14 Mar 2023 01:51:00 +0300 Message-ID: <20230313225103.30512-14-Sergey.Semin@baikalelectronics.ru> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230313225103.30512-1-Sergey.Semin@baikalelectronics.ru> References: <20230313225103.30512-1-Sergey.Semin@baikalelectronics.ru> MIME-Version: 1.0 X-Originating-IP: [10.8.30.10] X-ClientProxiedBy: MAIL.baikal.int (192.168.51.25) To mail (192.168.51.25) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,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: X-Mailing-List: devicetree@vger.kernel.org Invalid MTL Tx Queues DT-properties description was added right at the initial DCB/AVB features patch. Most likely due to copy-paste mistake the text currently matches to what is specified for the AXI-bus config properties. Let's fix that by providing correct descriptions for MTL Tx Queue DT-properties utilized for the AVB feature (CBS algorithm) tuning. Fixes: 19d918731797 ("net: stmmac: configuration of CBS in case of a TX AVB queue") Signed-off-by: Serge Semin --- .../devicetree/bindings/net/snps,dwmac.yaml | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml index 2ebf7995426b..69be39d55403 100644 --- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml +++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml @@ -321,25 +321,37 @@ properties: available in this queue. snps,send_slope: $ref: /schemas/types.yaml#/definitions/uint32 - description: enable Low Power Interface + description: + Send-Slope credit value subtracted from the accumulated credit + in the Queue for the Audio/Video bridging traffic. This is the + rate of the credit change in bits per cycle (40 ns, 8 ns and + 3.2 ns for 100 Mbps, 1000 Mbps and 2.5/10 Gbps respectively). minimum: 0 maximum: 0x3FFF snps,idle_slope: $ref: /schemas/types.yaml#/definitions/uint32 - description: unlock on WoL + description: + Idle-Slope credit value added to the accumulated credit in the + Queue with the Audio/Video bridging enabled. This is the + rate of the credit change in bits per cycle (40 ns, 8 ns and + 3.2 ns for 100 Mbps, 1000 Mbps and 2.5/10 Gbps respectively). minimum: 0 maximum: 0x8000 snps,high_credit: $ref: /schemas/types.yaml#/definitions/uint32 - description: max write outstanding req. limit + description: + Maximum value accumulated in the credit parameter for the + Audio/Video bridging feature (specified in bits scaled by 1,024). minimum: 0 maximum: 0x1FFFFFFF snps,low_credit: $ref: /schemas/types.yaml#/definitions/uint32 - description: max read outstanding req. limit + description: + Minimum value accumulated in the credit parameter for the + Audio/Video bridging feature (specified in bits scaled by 1,024). minimum: 0 maximum: 0x1FFFFFFF From patchwork Mon Mar 13 22:51:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Serge Semin X-Patchwork-Id: 1756614 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2620:137:e000::1:20; helo=out1.vger.email; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=baikalelectronics.ru header.i=@baikalelectronics.ru header.a=rsa-sha256 header.s=post header.b=KMRYLuxU; dkim-atps=neutral Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by legolas.ozlabs.org (Postfix) with ESMTP id 4PbBmL0ylpz1yWr for ; Tue, 14 Mar 2023 09:54:10 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230375AbjCMWyI (ORCPT ); Mon, 13 Mar 2023 18:54:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230371AbjCMWxe (ORCPT ); Mon, 13 Mar 2023 18:53:34 -0400 Received: from post.baikalelectronics.com (post.baikalelectronics.com [213.79.110.86]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 61FC392F30; Mon, 13 Mar 2023 15:52:54 -0700 (PDT) Received: from post.baikalelectronics.com (localhost.localdomain [127.0.0.1]) by post.baikalelectronics.com (Proxmox) with ESMTP id A5BB5E0EC0; Tue, 14 Mar 2023 01:51:29 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= baikalelectronics.ru; h=cc:cc:content-transfer-encoding :content-type:content-type:date:from:from:in-reply-to:message-id :mime-version:references:reply-to:subject:subject:to:to; s=post; bh=6xrFxVFBCRoCwxV5M3KY75YLEifw9tZ9oXtCfQTCeVs=; b=KMRYLuxUvxwE kwtRfkaJKPlM5KUepPRKyA5TfFU7uP5VUadRQWnfhFfx5HdNeTL2phNG7hF1bIim r8XK0Lf2AslW63hVY3Io0uz2uNSzMYvsArsFflyTdipDptWQgujEkPosznPVTHW3 O/Kk6PLGGD7P4j7yMIf0zAGOhSATCSQ= Received: from mail.baikal.int (mail.baikal.int [192.168.51.25]) by post.baikalelectronics.com (Proxmox) with ESMTP id 87853E0E6A; Tue, 14 Mar 2023 01:51:29 +0300 (MSK) Received: from localhost (10.8.30.10) by mail (192.168.51.25) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 14 Mar 2023 01:51:28 +0300 From: Serge Semin To: Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Rob Herring , Krzysztof Kozlowski CC: Serge Semin , Serge Semin , Alexey Malahov , Pavel Parkhomenko , Christian Marangi , Richard Cochran , Biao Huang , Yang Yingliang , , , , , Subject: [PATCH net-next 14/16] dt-bindings: net: dwmac: Use flag definition instead of booleans Date: Tue, 14 Mar 2023 01:51:01 +0300 Message-ID: <20230313225103.30512-15-Sergey.Semin@baikalelectronics.ru> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230313225103.30512-1-Sergey.Semin@baikalelectronics.ru> References: <20230313225103.30512-1-Sergey.Semin@baikalelectronics.ru> MIME-Version: 1.0 X-Originating-IP: [10.8.30.10] X-ClientProxiedBy: MAIL.baikal.int (192.168.51.25) To mail (192.168.51.25) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,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: X-Mailing-List: devicetree@vger.kernel.org Currently some of the boolean properties defined in the DT-schema are marked to have the basic boolean type meanwhile the rest referencing the /schemas/types.yaml#/definitions/flag schema. For the sake of unification let's convert the first group to referencing the pre-defined flag schema. Thus bindings will look a bit more coherent and the DT-bindings maintainers will have a better control over the booleans defined in the schema (if ever needed). Signed-off-by: Serge Semin --- .../devicetree/bindings/net/snps,dwmac.yaml | 45 ++++++++++++------- 1 file changed, 30 insertions(+), 15 deletions(-) diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml index 69be39d55403..a863b5860566 100644 --- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml +++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml @@ -120,11 +120,13 @@ properties: maximum: 12 snps,rx-sched-sp: - type: boolean + $ref: /schemas/types.yaml#/definitions/flag description: Strict priority + snps,rx-sched-wsp: - type: boolean + $ref: /schemas/types.yaml#/definitions/flag description: Weighted Strict priority + allOf: - if: required: @@ -144,11 +146,13 @@ properties: type: object properties: snps,dcb-algorithm: - type: boolean + $ref: /schemas/types.yaml#/definitions/flag description: Queue to be enabled as DCB + snps,avb-algorithm: - type: boolean + $ref: /schemas/types.yaml#/definitions/flag description: Queue to be enabled as AVB + snps,map-to-dma-channel: $ref: /schemas/types.yaml#/definitions/uint32 description: DMA channel id to map @@ -156,20 +160,25 @@ properties: maximum: 15 snps,route-avcp: - type: boolean + $ref: /schemas/types.yaml#/definitions/flag description: AV Untagged Control packets + snps,route-ptp: - type: boolean + $ref: /schemas/types.yaml#/definitions/flag description: PTP Packets + snps,route-dcbcp: - type: boolean + $ref: /schemas/types.yaml#/definitions/flag description: DCB Control Packets + snps,route-up: - type: boolean + $ref: /schemas/types.yaml#/definitions/flag description: Untagged Packets + snps,route-multi-broad: - type: boolean + $ref: /schemas/types.yaml#/definitions/flag description: Multicast & Broadcast Packets + snps,priority: $ref: /schemas/types.yaml#/definitions/uint32 description: Bitmask of the tagged frames priorities assigned to the queue @@ -255,17 +264,21 @@ properties: maximum: 16 snps,tx-sched-wrr: - type: boolean + $ref: /schemas/types.yaml#/definitions/flag description: Weighted Round Robin + snps,tx-sched-wfq: - type: boolean + $ref: /schemas/types.yaml#/definitions/flag description: Weighted Fair Queuing + snps,tx-sched-dwrr: - type: boolean + $ref: /schemas/types.yaml#/definitions/flag description: Deficit Weighted Round Robin + snps,tx-sched-sp: - type: boolean + $ref: /schemas/types.yaml#/definitions/flag description: Strict priority + allOf: - if: required: @@ -311,14 +324,16 @@ properties: maximum: 0x1312D0 snps,dcb-algorithm: - type: boolean + $ref: /schemas/types.yaml#/definitions/flag description: TX queue will be working in DCB + snps,avb-algorithm: - type: boolean + $ref: /schemas/types.yaml#/definitions/flag description: TX queue will be working in AVB. Queue 0 is reserved for legacy traffic and so no AVB is available in this queue. + snps,send_slope: $ref: /schemas/types.yaml#/definitions/uint32 description: From patchwork Mon Mar 13 22:51:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Serge Semin X-Patchwork-Id: 1756616 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2620:137:e000::1:20; helo=out1.vger.email; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=baikalelectronics.ru header.i=@baikalelectronics.ru header.a=rsa-sha256 header.s=post header.b=Su5mxlbV; dkim-atps=neutral Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by legolas.ozlabs.org (Postfix) with ESMTP id 4PbBvd1XVrz246l for ; Tue, 14 Mar 2023 10:00:29 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229682AbjCMXAZ (ORCPT ); Mon, 13 Mar 2023 19:00:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46480 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229872AbjCMXAV (ORCPT ); Mon, 13 Mar 2023 19:00:21 -0400 Received: from post.baikalelectronics.com (post.baikalelectronics.com [213.79.110.86]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id CE20783FF; Mon, 13 Mar 2023 15:59:48 -0700 (PDT) Received: from post.baikalelectronics.com (localhost.localdomain [127.0.0.1]) by post.baikalelectronics.com (Proxmox) with ESMTP id 3F5A0E0EC1; Tue, 14 Mar 2023 01:51:31 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= baikalelectronics.ru; h=cc:cc:content-transfer-encoding :content-type:content-type:date:from:from:in-reply-to:message-id :mime-version:references:reply-to:subject:subject:to:to; s=post; bh=GDWLCKbTjZjHBGbg9BZjPvJY7ns7quDEaw1d5obfFoI=; b=Su5mxlbVtf7o HyrJOJcxzszhKpQ6kT8G485hALnO3itaeV7HwX6WS1qCTYw/blglbHawXh2+wssm Oeve5lvR0oImztmoDy88paEtRG0KeZc0fJBGTupcoKoJmClWy0JNd/ASS5/tg+Ln rrPM41V8hbhipuR7e48Ul7M4eS3qW5Q= Received: from mail.baikal.int (mail.baikal.int [192.168.51.25]) by post.baikalelectronics.com (Proxmox) with ESMTP id 2827BE0E6A; Tue, 14 Mar 2023 01:51:31 +0300 (MSK) Received: from localhost (10.8.30.10) by mail (192.168.51.25) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 14 Mar 2023 01:51:30 +0300 From: Serge Semin To: Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Rob Herring , Krzysztof Kozlowski CC: Serge Semin , Serge Semin , Alexey Malahov , Pavel Parkhomenko , Christian Marangi , Richard Cochran , Biao Huang , Yang Yingliang , , , , , Subject: [PATCH net-next 15/16] dt-bindings: net: dwmac: Simplify MTL queue props dependencies Date: Tue, 14 Mar 2023 01:51:02 +0300 Message-ID: <20230313225103.30512-16-Sergey.Semin@baikalelectronics.ru> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230313225103.30512-1-Sergey.Semin@baikalelectronics.ru> References: <20230313225103.30512-1-Sergey.Semin@baikalelectronics.ru> MIME-Version: 1.0 X-Originating-IP: [10.8.30.10] X-ClientProxiedBy: MAIL.baikal.int (192.168.51.25) To mail (192.168.51.25) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,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: X-Mailing-List: devicetree@vger.kernel.org Currently the Tx/Rx queues properties interdependencies are described by means of the pattern: "if: required: X, then: properties: Y: false, Z: false, etc". Due to very unfortunate MTL Tx/Rx queue DT-node design the resultant sub-nodes schemas look very bulky and thus hard to read. The situation can be improved by using the "allOf:/oneOf: required: X, required: Y, etc" pattern instead thus getting shorter and a bit easier to comprehend constructions. Signed-off-by: Serge Semin Reviewed-by: Rob Herring --- Note the solution can be shortened out a bit further by replacing the single-entry allOf statements with just the "not: required: etc" pattern. But in order to do that the DT-schema validation tool must be fixed like this: --- a/meta-schemas/nodes.yaml 2021-02-08 14:20:56.732447780 +0300 +++ b/meta-schemas/nodes.yaml 2021-02-08 14:21:00.736492245 +0300 @@ -22,6 +22,7 @@ - unevaluatedProperties - deprecated - required + - not - allOf - anyOf - oneOf Thus all the patterns like allOf: - not: required: - X could be replaced with just not: required: - X --- .../devicetree/bindings/net/snps,dwmac.yaml | 175 +++++++----------- 1 file changed, 63 insertions(+), 112 deletions(-) diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml index a863b5860566..9df301cf674e 100644 --- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml +++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml @@ -127,19 +127,6 @@ properties: $ref: /schemas/types.yaml#/definitions/flag description: Weighted Strict priority - allOf: - - if: - required: - - snps,rx-sched-sp - then: - properties: - snps,rx-sched-wsp: false - - if: - required: - - snps,rx-sched-wsp - then: - properties: - snps,rx-sched-sp: false patternProperties: "^queue([0-9]|1[0-1])$": description: Each subnode represents a queue. @@ -185,67 +172,46 @@ properties: minimum: 0 maximum: 0xFF + additionalProperties: false + + # Choose only one of the bridging algorithm and the packets routing allOf: - - if: + - not: required: - snps,dcb-algorithm - then: - properties: - snps,avb-algorithm: false - - if: - required: - snps,avb-algorithm - then: - properties: - snps,dcb-algorithm: false - - if: - required: - - snps,route-avcp - then: - properties: - snps,route-ptp: false - snps,route-dcbcp: false - snps,route-up: false - snps,route-multi-broad: false - - if: - required: - - snps,route-ptp - then: - properties: - snps,route-avcp: false - snps,route-dcbcp: false - snps,route-up: false - snps,route-multi-broad: false - - if: - required: - - snps,route-dcbcp - then: - properties: - snps,route-avcp: false - snps,route-ptp: false - snps,route-up: false - snps,route-multi-broad: false - - if: - required: - - snps,route-up - then: - properties: - snps,route-avcp: false - snps,route-ptp: false - snps,route-dcbcp: false - snps,route-multi-broad: false - - if: - required: - - snps,route-multi-broad - then: - properties: - snps,route-avcp: false - snps,route-ptp: false - snps,route-dcbcp: false - snps,route-up: false - additionalProperties: false + - oneOf: + - required: + - snps,route-avcp + - required: + - snps,route-ptp + - required: + - snps,route-dcbcp + - required: + - snps,route-up + - required: + - snps,route-multi-broad + - not: + anyOf: + - required: + - snps,route-avcp + - required: + - snps,route-ptp + - required: + - snps,route-dcbcp + - required: + - snps,route-up + - required: + - snps,route-multi-broad + additionalProperties: false + allOf: + - not: + required: + - snps,rx-sched-sp + - snps,rx-sched-wsp + snps,mtl-tx-config: $ref: /schemas/types.yaml#/definitions/phandle description: @@ -279,39 +245,6 @@ properties: $ref: /schemas/types.yaml#/definitions/flag description: Strict priority - allOf: - - if: - required: - - snps,tx-sched-wrr - then: - properties: - snps,tx-sched-wfq: false - snps,tx-sched-dwrr: false - snps,tx-sched-sp: false - - if: - required: - - snps,tx-sched-wfq - then: - properties: - snps,tx-sched-wrr: false - snps,tx-sched-dwrr: false - snps,tx-sched-sp: false - - if: - required: - - snps,tx-sched-dwrr - then: - properties: - snps,tx-sched-wrr: false - snps,tx-sched-wfq: false - snps,tx-sched-sp: false - - if: - required: - - snps,tx-sched-sp - then: - properties: - snps,tx-sched-wrr: false - snps,tx-sched-wfq: false - snps,tx-sched-dwrr: false patternProperties: "^queue([0-9]|1[0-5])$": description: Each subnode represents a queue. @@ -380,23 +313,41 @@ properties: minimum: 0 maximum: 0xFF + additionalProperties: false + + # Choose only one of the Queue TC algo allOf: - - if: + - not: required: - snps,dcb-algorithm - then: - properties: - snps,avb-algorithm: false - - if: - required: - snps,avb-algorithm - then: - properties: - snps,dcb-algorithm: false - snps,weight: false - additionalProperties: false + + dependencies: + snps,weight: ["snps,dcb-algorithm"] + additionalProperties: false + # Choose one of the TX scheduling algorithms + oneOf: + - required: + - snps,tx-sched-wrr + - required: + - snps,tx-sched-wfq + - required: + - snps,tx-sched-dwrr + - required: + - snps,tx-sched-sp + - not: + anyOf: + - required: + - snps,tx-sched-wrr + - required: + - snps,tx-sched-wfq + - required: + - snps,tx-sched-dwrr + - required: + - snps,tx-sched-sp + snps,reset-gpio: deprecated: true maxItems: 1 From patchwork Mon Mar 13 22:51:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Serge Semin X-Patchwork-Id: 1756615 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2620:137:e000::1:20; helo=out1.vger.email; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=baikalelectronics.ru header.i=@baikalelectronics.ru header.a=rsa-sha256 header.s=post header.b=ZNmgJzn+; dkim-atps=neutral Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by legolas.ozlabs.org (Postfix) with ESMTP id 4PbBmM13pbz1yWr for ; Tue, 14 Mar 2023 09:54:11 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230417AbjCMWyJ (ORCPT ); Mon, 13 Mar 2023 18:54:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57832 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230372AbjCMWxe (ORCPT ); Mon, 13 Mar 2023 18:53:34 -0400 Received: from post.baikalelectronics.com (post.baikalelectronics.com [213.79.110.86]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A57DE92F33; Mon, 13 Mar 2023 15:52:54 -0700 (PDT) Received: from post.baikalelectronics.com (localhost.localdomain [127.0.0.1]) by post.baikalelectronics.com (Proxmox) with ESMTP id B9323E0EC2; Tue, 14 Mar 2023 01:51:32 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= baikalelectronics.ru; h=cc:cc:content-transfer-encoding :content-type:content-type:date:from:from:in-reply-to:message-id :mime-version:references:reply-to:subject:subject:to:to; s=post; bh=dfezP4zcrZzhxqOMad8JHgjSiIu+6lxYSINW/XAE6WA=; b=ZNmgJzn+mHG9 01RCJh4fggpLfrhJ6I6mCKxdAkKr2aQieuJAlDHX4FB2mpEWsBtbIdBnSO71vWrf s2XY4V5mHCMUynJ7Zrw9Csc4ffJb4cqPCMmfUqqcrddPXqDyK7wPgK0dcL4JMza8 6GehDc8puK0s+Lh2JMgxXd3WUutmb0k= Received: from mail.baikal.int (mail.baikal.int [192.168.51.25]) by post.baikalelectronics.com (Proxmox) with ESMTP id 8F729E0E6A; Tue, 14 Mar 2023 01:51:32 +0300 (MSK) Received: from localhost (10.8.30.10) by mail (192.168.51.25) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 14 Mar 2023 01:51:31 +0300 From: Serge Semin To: Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Rob Herring , Krzysztof Kozlowski CC: Serge Semin , Serge Semin , Alexey Malahov , Pavel Parkhomenko , Christian Marangi , Richard Cochran , Biao Huang , Yang Yingliang , , , , , Subject: [PATCH net-next 16/16] dt-bindings: net: dwmac: Add MTL Tx queue CBS-algo props dependencies Date: Tue, 14 Mar 2023 01:51:03 +0300 Message-ID: <20230313225103.30512-17-Sergey.Semin@baikalelectronics.ru> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230313225103.30512-1-Sergey.Semin@baikalelectronics.ru> References: <20230313225103.30512-1-Sergey.Semin@baikalelectronics.ru> MIME-Version: 1.0 X-Originating-IP: [10.8.30.10] X-ClientProxiedBy: MAIL.baikal.int (192.168.51.25) To mail (192.168.51.25) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,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: X-Mailing-List: devicetree@vger.kernel.org Currently the CBS algorithm specific properties could be used unconditionally in the MTL Tx queue sub-nodes. It's definitely wrong from the correct Tx queue description point of view. Let's fix that in a way so the "snps,send_slope", "snps,idle_slope", "snps,high_credit" and "snps,low_credit" properties would be allowed only if the CBS TC algorithm is enabled for the MTL Tx queue. Signed-off-by: Serge Semin Reviewed-by: Rob Herring --- Documentation/devicetree/bindings/net/snps,dwmac.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml index 9df301cf674e..c6a9b44650c3 100644 --- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml +++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml @@ -322,7 +322,12 @@ properties: - snps,dcb-algorithm - snps,avb-algorithm + # Credit Base Shaper is configurable for AVB algo only dependencies: + snps,send_slope: ["snps,avb-algorithm"] + snps,idle_slope: ["snps,avb-algorithm"] + snps,high_credit: ["snps,avb-algorithm"] + snps,low_credit: ["snps,avb-algorithm"] snps,weight: ["snps,dcb-algorithm"] additionalProperties: false