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: 13173440 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E2EB6C6FD1D for ; Mon, 13 Mar 2023 22:53:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=JY59ox0hCsduqtfWqbBeqAK5Eox1bCv05AK4+sDxL0U=; b=u91VfN9wlNJ9lM Bu310IxGyMhe9yh97G9LGk0IFNWWPDx6mCpmgx0ZthRmSx64MtpsG6ZcJNGwKEivC8d8mbJ/w2joe LPcDDRaXx7jypLlDwEybPpR0YgSe3M4vSUDenJHHpP67KYh0HhlIHVVoNbmIGlRrsifatgx60DlOm kyIu5A62plnTWnQNZCW+f/WHRRGYrfcuyCz0BgNSbi1tov492xJNGiVvPeatahTFeONDT0UGpSxGz 6+45TB+po42al1Xn2SyTGW3NpQuxo1kwAxp1jFr2vqUawP2KHSFhDszEPWB36HxkEZ1w+uhrwRySv AqGAUxhBrYceC0wfzdrA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbr1K-008Aao-Fe; Mon, 13 Mar 2023 22:51:59 +0000 Received: from post.baikalelectronics.com ([213.79.110.86]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbr0X-008AHc-4t for linux-arm-kernel@lists.infradead.org; Mon, 13 Mar 2023 22:51:12 +0000 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230313_155109_432047_2AA06F05 X-CRM114-Status: GOOD ( 10.40 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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: 13173448 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C9504C6FD19 for ; Mon, 13 Mar 2023 22:53:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=IF1SabWT5kq0MRjLvgYo1mnEVjwGy62vcQPywPWB1lk=; b=PnAzehViyyhvqb TAgNQdO8JSSkdu57m0j03b2gjs4vkwV1To06vnWOdy1xljZnt18ZqfYv3YDriRatSMlZ4RuZgphze 78/f57kOIzx37ssOH76NiM9gl+OlVJOmCIvGmsMHSXyi4G7kqQXFhoVSHla0kiq1hu+dg5ism/NQ7 hO/NMNHpKoAAjajJ8gEZ5Bne1KNQpwARHxKqJcUDZm47u3QHFcYa3I4XW7mVmi0idoPJ1MFKsVjEx VXDH/6IHKHHoWEcsra6595PUvbvlQYH/STRe62P0YYxn4ND/wMbMuKhIQM9DkQzXYvJpQJrpMflzL EbOjn5zCbohMI+EfOr1g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbr25-008AtE-Jf; Mon, 13 Mar 2023 22:52:46 +0000 Received: from post.baikalelectronics.com ([213.79.110.86]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbr0Y-008AII-LS for linux-arm-kernel@lists.infradead.org; Mon, 13 Mar 2023 22:51:12 +0000 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230313_155110_922936_DF48334E X-CRM114-Status: GOOD ( 11.00 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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: 13173449 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 44EEDC61DA4 for ; Mon, 13 Mar 2023 22:54:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=vGeJi29YktzBQ6S023U2ixk9EGJ9J9qak8qWlYVao8w=; b=3A2ByunY0bpYg8 kh1iw2Yzgs4F7clNUJiBclEVNRhJhRQf6dRebpVg0CDUuacf7OYe941Tnp73gR4OFNjOROtkXCHrc f9uRW14pA1OKBNjenyAK6nmZUU3w8MgHoOQFOZ9WXH08HuEBqfpwpGPF8HcMZYDNfJw1K6MvaNC8C 0XIQKc1Ltub7rq3O/EeU/8WwRZMRYw1/ms7PP1TGfH8UaRS8HSbRsbJY0CvhtH1v6qGZW3zkWJTtM ONv4TERaIofDNjfJi557SMb0acqCt3efAaB6V6ZdY5H82OpDMhphpAcFO6+Y0+XrtXH29BCP9TeZg 7P2i+LAXkFnPmssDyOiw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbr2S-008B45-Cv; Mon, 13 Mar 2023 22:53:08 +0000 Received: from post.baikalelectronics.com ([213.79.110.86]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbr0a-008AJQ-Up for linux-arm-kernel@lists.infradead.org; Mon, 13 Mar 2023 22:51:14 +0000 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230313_155113_252978_D890BA4F X-CRM114-Status: UNSURE ( 9.61 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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: 13173451 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 64F3FC6FD19 for ; Mon, 13 Mar 2023 22:55:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=t0m13cEasS5mX9E8vdb8Sx1KMDMGLYM1govNVtSK5/E=; b=PrUyvVJmGSkLc/ 9dRTX7qhCKIoFdf2NFJIvVfphvKMOtAoLiV0TrK0xBKUtm9Qhb9JNzuqBWBvIFI8FU+xrz9fHOZIv ZGwmYLGJyzb9GrwfUBEjrGstnzo3n+pdWokWQU14aN1SSEwiZ2tC2sPzrNfDFxwg6Jpv/zF3tJPa5 /yxPURtTiWv+aIbDZYDe330dss3qWkOZVCfStcLP+tDyTj0z80Olrpa7ULWnZMnB3HwKnUbS52Q8m eiK2/Mo4fHCZ5B3Lr2Y8IbjsqpE6MSf9y2jo8XOeaCWl+rJFZbwekljbkdUzBvfTdglDS/ajuUzpZ +w67uqnZCFP+ZRZydlQA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbr3O-008BWT-1u; Mon, 13 Mar 2023 22:54:06 +0000 Received: from post.baikalelectronics.com ([213.79.110.86]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbr0c-008AJw-3R for linux-arm-kernel@lists.infradead.org; Mon, 13 Mar 2023 22:51:17 +0000 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230313_155114_702583_4CF687ED X-CRM114-Status: GOOD ( 23.72 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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: 13173450 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2F4BDC6FD19 for ; Mon, 13 Mar 2023 22:54:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=H12CnGHPDN/gNz1ELoEdLtNtOi6x8sMJ6J8Eq4NC7sg=; b=0d584truZRbR5m FlW9BSBqaXKtMe/tmkxLxWvk/4XPmTOw+SCDOcY/kgNB8Yr7x0A33+FX17du8XXWmlTip9vi2RqdU nSZFF5sPvQ+9ruDDdGnK+hSM/IR6AMJQ/Jtv4gbW46o6xgB+h19VTojhx0tFjRmcuJmUXriwuCXeZ QMr0fXeBYfPtRd7nugeqGiB+CBE4hEEdzYb9zIvRrt8FTSPFn4tfXUtHAajr7J++QILTZ9wuz9kAF QnKb6e3a9oIHnwTUe6Kvd6aJGyLeZmce/+aqWrH2w2HtXXvmVaQMivb8chIDweX7HY+i/PtqTuYim d3im79IgRGJp+QBtiVEg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbr30-008BLD-Sg; Mon, 13 Mar 2023 22:53:43 +0000 Received: from post.baikalelectronics.com ([213.79.110.86]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbr0d-008AKK-GM for linux-arm-kernel@lists.infradead.org; Mon, 13 Mar 2023 22:51:17 +0000 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230313_155115_850452_5A22F0AE X-CRM114-Status: GOOD ( 11.11 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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: 13173452 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 41AD3C6FD19 for ; Mon, 13 Mar 2023 22:55:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=st3pUSuuA3dbXAcGzE3B2nntMPJMyoXxxt94/Gnkbeg=; b=2BMB03WC23lyFH YG3uNAydd6Rl2XLwhV+maH/2oN707b3ljwHaEuWbDQ+CHzXqI6P0fwXaRqfom5O56jJT9+er2brim ooj5NCds00+B7iya9+vC64aRUT7ZRg30fGOUXp0qlOJ0Ow6aLTvHJlC27a4z1q5xUl+rXE9X8naEm DivWOsiwwumcQvBFcIBv5MnqzFr/y+ELuZmzq3FxjHE/Hnh6TipDggfgGs5eN3mRzpB1IHJqoiYl/ VV2q/lH4DG5MpciPi6yJu5OkOvBLM3vVOZAliEwbJFlAFBZeEipeX7+ItRPVgM3iSUD/mfXsk2O0D wJ/rXbzWEmcpFXeH4ffA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbr3l-008Bik-L4; Mon, 13 Mar 2023 22:54:30 +0000 Received: from post.baikalelectronics.com ([213.79.110.86]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbr0e-008AJQ-Ny for linux-arm-kernel@lists.infradead.org; Mon, 13 Mar 2023 22:51:18 +0000 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230313_155117_020351_259AE566 X-CRM114-Status: GOOD ( 20.86 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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: 13173453 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 17AA5C6FD19 for ; Mon, 13 Mar 2023 22:56:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ergpE0h6QuMEVPD90DneD9kDS5RBJ6eAADTC9OoR0RE=; b=XYyonG1ShqhK5J rmDFCon/Hm+NFiwDW/YnPbpborCrMk42PWed40WEUMvsSGimzF6xONCgzJ5ZmY4peRR1tgShgmP68 bJ/jXxpiL0gfL3B4Aro4vd7iMUrZ0Kl6i2kBqTo1/1M+hssRLmdVBI4DjEI/q7PNI4aws2zA6P+7q zAEj5KKlRqjzk54TqdEbd+tWdmAjiOHzTbblAzwC98bxwX+zN4oh6nVYIx1cOF56v2+D0sn52KgyK ubDYzq2xsFZcpIxxlGIpiJl+fsr38XmY0nQ1aDf2Wk0SoDAU+Sb1Xq/zRbAfkwJ0XhwbImEW/XMem o7K4CrGqJF5xC+9IvJeg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbr4B-008Bv9-71; Mon, 13 Mar 2023 22:54:55 +0000 Received: from post.baikalelectronics.com ([213.79.110.86]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbr0g-008ALO-G7 for linux-arm-kernel@lists.infradead.org; Mon, 13 Mar 2023 22:51:20 +0000 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230313_155118_770244_E144A545 X-CRM114-Status: GOOD ( 10.38 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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: 13173454 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4008CC6FD19 for ; Mon, 13 Mar 2023 22:56:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=qYcvy+9J7t1BAZ+2StNN7gYJwbn5VKI38LkJrnCuJoY=; b=MboeRq909q9lK9 Xb59tc1TsBUY2W5us7GoyCsQ5tj6S3kqexsZp4q1biT09GZOaEvdns0WfzXDVQPUvaq4Rrj3FJU5Z gyc4A7EK1AR2oVPx7/eqq1yox6W11gq157atHtIqsZSQ++627+B+GlfFppFk3QVxAgWOblfWA3NF3 E4KHhBepmTGdpReJhCcVSzKUbMXeJ7ShfDPEFy7t5eFvx4Mz258GfB3DvcxOfD/BJNzyE+YeFASP7 Br4PrOQf0fS0zIstlTi2jFWTterv/SZpyfJTLa/duab90YQz/rA/lv9F5U0DKwOlQufaFwOhyZcJp jF9KoBMqbNIzzCLwa86g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbr4d-008C8u-4e; Mon, 13 Mar 2023 22:55:23 +0000 Received: from post.baikalelectronics.com ([213.79.110.86]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbr0j-008AMl-To for linux-arm-kernel@lists.infradead.org; Mon, 13 Mar 2023 22:51:23 +0000 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230313_155122_200177_E3F25366 X-CRM114-Status: GOOD ( 12.05 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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: 13173455 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EBE9AC61DA4 for ; Mon, 13 Mar 2023 22:56:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=lKhBYQQqXYL1yjtupzN8ZTyjlCJ3pBRFktVViXMD24Y=; b=Rd0mLFgOpoVhVZ BMXQKhNxVJJoNhwFCSMviof0TtTZRxUOHY9q6ZrvOxUkYWyu3lfq2qXSI/5i2txV0fBB4vCaXhOE6 nyY26R9I7hix+s16kRm3ViLvQG/PDrculokrffZ2YXwUr4OKSxY1Swv7iIOu7fs/jGDV8V738MKtR RQT2tbqpcPIn4+sDwn+nC7xSm7jeNcUC6NVz14wYeEi8gs9W7QxGIvBi/nE+d5Y7+CEjYyA4BcmNf 6tapchn+nFHhGX6gzdVpGNU4fQwoAAptzfScrBBnqFT3IKxQDpCaBvSHjy7ZhAREBoTLWnlWN2QBt aw2QmJ+0M6qrQToLfdxg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbr4z-008CKo-Im; Mon, 13 Mar 2023 22:55:45 +0000 Received: from post.baikalelectronics.com ([213.79.110.86]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbr0k-008ANQ-LH for linux-arm-kernel@lists.infradead.org; Mon, 13 Mar 2023 22:51:24 +0000 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230313_155122_938716_18537403 X-CRM114-Status: UNSURE ( 9.64 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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: 13173456 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0445AC6FD19 for ; Mon, 13 Mar 2023 22:57:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=GMr92K41SWKrAikY9Jk4IJOpY2szWd2GRE3BhTpBtEI=; b=MOtL+Si/0F7UEZ k8kq4Duhf5I2/is1kEeEXEtljQOpoOVJDY120CjlvgRz6tL5+OiBFHEblQx0ld5B8Ly0+A+uJx6Xw QyuJQLk+eeOZbozzLkPf/KlgMNwmE6DZkdbCdyV9hFtyg5QCh7DzJRpiLQglMy5fw7p4fdd2A8jA1 nWw90lLbjGWKoaVH8vFdDDGGoFuMuFvWpiafy91shiGlsdAI88oa8A7XeRy8fqeAGA26SSd53Za7L 7BJgkUHGsHaGtcWj8Vn2EqgBIZ5+pa4XJRRjhC40wVoc71qthxWAz1jQ3G/iUDSj1+wEkmtpPzPAF 9JYjqA0P5SLjbY9E4O3g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbr5L-008CVP-CP; Mon, 13 Mar 2023 22:56:07 +0000 Received: from post.baikalelectronics.com ([213.79.110.86]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbr0l-008ANk-L1 for linux-arm-kernel@lists.infradead.org; Mon, 13 Mar 2023 22:51:25 +0000 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230313_155123_962014_60EDC74E X-CRM114-Status: GOOD ( 10.83 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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: 13173457 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7216FC61DA4 for ; Mon, 13 Mar 2023 22:57:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=faMrNByJbYX7Muw4+OhMQT1gVLezevt1R1d0DuZs56Y=; b=x/DytTXWomICeD 6Y4WSeRVfEv5hzKSSwhhHdr8qY2GcpmZopKs4zmjKawA5W71oioLu9V+zdty04x4n4Vur6OZNexve B+77Vxx2mpAO64/MQRdFlASWJgHg3jhtQC5AomEcqyxNV4ds/kkWExQkMNtk7ss/5ad8HWgZIgXBn /Rdb7MvnerMAOtIG52HY7rzfHQaJ/aIjdS+TXjH+A4gfVqSdJNN0mqVQu8Kx2bYxsnDLIAGHSH3Aj 8XGErDuIBe0tVPYrtX9fsjIY8YGfMIFXBJv1XFVagUSYKmJkQqGA1FbXw8/4PgCuouSijMeO8uvZK kiNFEzw9S5EDY8TCn4Aw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbr5o-008Cid-42; Mon, 13 Mar 2023 22:56:36 +0000 Received: from post.baikalelectronics.com ([213.79.110.86]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbr0n-008AOU-Ed for linux-arm-kernel@lists.infradead.org; Mon, 13 Mar 2023 22:51:27 +0000 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230313_155125_732949_E434BE27 X-CRM114-Status: GOOD ( 13.48 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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: 13173458 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A025FC61DA4 for ; Mon, 13 Mar 2023 22:58:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=i14r25yu4/ykajPNXBM91Zgc3BjoMkMu2oHPi+xQwH8=; b=R3lICF6IkNoXnC XEPegfwBUZ9bkhr9hmlJkXPS1+GGZmcnVvy3Ww4xvEdm4m2OnB/9ZOt3Na/Bvl1kTzo9KX17dVqpp gqXSXuIdDZgeJQsxGegw6qjEoMZJBjWSKUEhyz7t/BbrQ3tYoUjB0ApFTrDeR3eS1ggUypnBOgcC/ +YRKif/tbUT/VYxzw7U6r39Pev4cy2FTCY/fNgs/CAdgc9AJ50Oi3yBtNsp18YASjxMrgsAx2R2ju JhFHsXjTKjANG+JW36stCs9PT0wcX93yGrX+gOW1hm3P4mhJGEyBCaX9l8sNNxO5wkwbfU1jqEGUL 8QbW/nJGmIAvCdbZN/NA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbr6G-008CyJ-VA; Mon, 13 Mar 2023 22:57:06 +0000 Received: from post.baikalelectronics.com ([213.79.110.86]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbr0p-008APE-4s for linux-arm-kernel@lists.infradead.org; Mon, 13 Mar 2023 22:51:29 +0000 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230313_155127_427060_6432305B X-CRM114-Status: GOOD ( 15.82 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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: 13173462 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 99B3AC61DA4 for ; Mon, 13 Mar 2023 22:58:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=BLaav30VMe+M4Ck+6Boq/eujT9gFUd7hjz4nXy81WLY=; b=R0alqK1v1nGjej YM4ipQ/BoLqxy4tNjDDANbouE10bYtwWugoFp6i0Qy6P4b7stPoN0j+66O1m9b8ShHPrtE2SKQIaM lSQvltouhKxkDUTTS1RcDBw6dGKOMxZreWyErV1cTQJovD3n/6DH69KWg/pWoenf8aPiCnX0qvupf ggwAzJujgK44rEytcVT4YIcL++wvzUNYOF3prMHDU7fg/vWWYZwDq7yqTTgiAEvNob9FRi4PCcoPV 8DxZY9nAY/qTDFwVX1fKdwrdIt/uOJJXZ8aUSeAp3gUJ2X+NlDHjcxpQEzD1eyMYIPktHuee8pJTb EFKNRkmZUauER4LnfVdQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbr6y-008DJv-Sf; Mon, 13 Mar 2023 22:57:49 +0000 Received: from post.baikalelectronics.com ([213.79.110.86]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbr0q-008AOU-Rq for linux-arm-kernel@lists.infradead.org; Mon, 13 Mar 2023 22:51:30 +0000 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230313_155129_140174_AF514AEB X-CRM114-Status: GOOD ( 10.05 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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: 13173463 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 74DECC6FD19 for ; Mon, 13 Mar 2023 22:59:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=4y1sTaaHZO0qZ+iEQveYlTxYiZMpMo5tA4R6/OXRgzE=; b=NX7GTr0+gXUmjj tjUiBDo9gCQoMZEN2Pg5724Jc7zVyS2ZuU7xSk6CKtMNwsz9bcYdGdPe0Uv/qm3XKiNkQTejvMt9I q+XT0v4dtLQ4m0vbjfKkcBT+QNaUtJy3jrr8XJSebfupMaANAVETUX0t+A/EiwXwjSp5LZdQ/17dB Cj7TXWO4WUAlTzMJ1UtOunk+HMXw++GmSbOI3bD4fSY6K7HCTCXPvN9KiRl+zjn8cyjdnMspOwMMp 9S0KigMEC0pYVLnuP86enN9W51L7Dc5DfcSMEU2lgF/9cSgWl4OacHmTv/Hgh40AUF1e8Zr89g4vS 3efPyqJW8dh+EplhznhA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbr7V-008DYS-0V; Mon, 13 Mar 2023 22:58:21 +0000 Received: from post.baikalelectronics.com ([213.79.110.86]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbr0s-008APE-6V for linux-arm-kernel@lists.infradead.org; Mon, 13 Mar 2023 22:51:32 +0000 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230313_155130_519993_6DF50D76 X-CRM114-Status: UNSURE ( 9.85 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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: 13173464 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0E526C6FD19 for ; Mon, 13 Mar 2023 23:00:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=pY9FiqeqCyug4kkksFwtBaagtkcFHj0xrm+QF3nCFig=; b=fHdmUMvjr1Q/FF aoS8qrRAigEjGrnxG3lV2HdwtBN7rzzjKxwXJ9sz+eoqhyXjflB1Si6T0y/oMCiwpBXmTPMxWbSZ+ CKXXMZHpJjXjYY2lQdIN8luXtMXwX0jBnHU3y/x9Z1mt2PBqENaAW1YlmuMj5U3EYygbDoGgSzny6 k1Qjvgx5GmGVbTm1I+8YgXRWopXKGyxBONXnR1J6gSfJciEXp9G9f5j8kXrF64fP6VbZFfypusw3T iv5xonXwXaHqK6+VeqV3leXCq2xYa9en3goRyxKyfABLEhQgvRT93APjNPpdPkWACA+7PaLroQMXW P9UGl8vJEBRVLXAZeFxw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbr8B-008Dqt-Ki; Mon, 13 Mar 2023 22:59:03 +0000 Received: from post.baikalelectronics.com ([213.79.110.86]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbr0t-008AOU-Od for linux-arm-kernel@lists.infradead.org; Mon, 13 Mar 2023 22:51:33 +0000 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230313_155132_085311_DBC2DF2D X-CRM114-Status: GOOD ( 11.23 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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: 13173465 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 25017C61DA4 for ; Mon, 13 Mar 2023 23:01:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=yqebQF0dKxb08vHca8jVJ91AUj17OkBeTnK65wdKW7o=; b=dX4cscNSgPO/dM kBMSZOHRDwLCSJAbs71hFltJAycEAhdCmqI6rXc+ibSTwyWfwrgIGpcGRGMGZLSA/FQ9sByeIXnkk jCyn8S5IaNNnlm+MRIR/20ebjNvfW5cepGWdkgB14xXbvFStDPiXSQ1oU7u/j+FJyhIYGgJwhZJbB TvXZMMEK0BLUfA6KCa6n2LTLg2JuoL5XKy9dq4FWTgRNC7WsLRuReW59sItxfP1qEADE/uth3D9Vi vTN3BVwZfGTo8cC68fx6fYTq8Zstr+MkAITYRssgTra2dubkiVKkWdPWTWqCMfpGFeKlxlmlUCstw uRK5Jcetm0326HFpQ9Jw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbr9B-008EGh-Ha; Mon, 13 Mar 2023 23:00:06 +0000 Received: from post.baikalelectronics.com ([213.79.110.86]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbr0v-008APE-Bg for linux-arm-kernel@lists.infradead.org; Mon, 13 Mar 2023 22:51:35 +0000 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230313_155133_629552_9FA8CFBF X-CRM114-Status: UNSURE ( 9.87 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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