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: