From patchwork Fri Jun 28 15:45:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Serge Semin X-Patchwork-Id: 13716360 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 7D5C4C2BD09 for ; Fri, 28 Jun 2024 15:45:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=C5jYmtDyMsBks9HOK7YKwsTxAghw5ezyRltrHdspFHU=; b=gh9bQb8Pac4FBkVOyZfIEmmhBJ euw8VR2QtYDvpp8I5tyhmsdRS3oHUmtoamXLOrFL11nu4RUXOv8vXV9mKSfF9e/Zp+TVR/Vy45/X+ 7p6FDojbN2p44s+IOpDfAuxYzDsbNDv83wWKDErNOd8LBYL1zP8/A4RDTKobdrtkeIxggzxcIOJ+O hV7cR+lV/KpL8GyaJbbqSEvlmlFLoqrP1/U6fHWZJDL4gMech/jBin2xPQyZJrvLva3tR1g58uqJT ssG7YWiPblrDXuMkfKJcEEEtWT1I0kSTuOBMqXUQ3BIrBKaz+VwkmJx4vADQPgFVqLyHaftfadslO 6HQjmwIg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sNDn6-0000000EFcY-1i4C; Fri, 28 Jun 2024 15:45:36 +0000 Received: from mail-lf1-x12e.google.com ([2a00:1450:4864:20::12e]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sNDmx-0000000EFah-0Lkt for linux-arm-kernel@lists.infradead.org; Fri, 28 Jun 2024 15:45:28 +0000 Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-52cdb0d816bso779314e87.1 for ; Fri, 28 Jun 2024 08:45:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719589525; x=1720194325; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=C5jYmtDyMsBks9HOK7YKwsTxAghw5ezyRltrHdspFHU=; b=CpZe38MQU8A15829lOaJ/FJwct7vHV19I7tYYe0cchhYE1lW7e0MZvu/wt+2sMNzSb 5eNeOh16nskboLAAQWASu67NWIdov8PTg+vJql9poIODFkxAraqGXXK7ttyDGDN5d6BC E5pLvVqgb39heeAKD8GE7Y+HjXADEHM+WNg6oHQDd2+PFdhYEiGF5XZZkU3NGraa/YKe SyNEcfTAMTOIasHnREd9x4b3/e258hEhvaVNszhXk0JBq4T7kR7Dyy4tre9YGO9R6mBg QFwO9eLLHxGUCV8Gfe8ZURU/2i8cb3sgdX5pwXMh3a9OvirNAnn0VxgcWYx/OOMCrjPU Zg4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719589525; x=1720194325; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=C5jYmtDyMsBks9HOK7YKwsTxAghw5ezyRltrHdspFHU=; b=htZywFdjwt7sRGLhbiG9qNanIRMd2fbMeLxFtYsUtt+Ew3IZtZZWCntRaqpD7bcwxB ISHiUNPWcDLzFPGQHx/xEImHIz4hepYjV1tJCAhbwxxUXv6lXq0bN6B/9yKjPf4rXu6V DIUTRIQdj/XPaJaTj7C3a1KozxWiFTrnoHtzoe5yQkw0zYeL1Rma1tQm5TMJ3FqF727I 83Xk2o5ZxZEY9BczCQBrgPVWHKGohdfQ5yrzmGIYo/JwCxI3Jh462i5CYZxVxT9cVk3M 71I1uJuzZuRi9yVqBT8irA6c3zz8R6OO/GsF6E8xH8mCwyITvSOfLNMZMGnWn6q4Qjoc DuhQ== X-Forwarded-Encrypted: i=1; AJvYcCVVXDRTW1ClQGcw+yI2ySEZ09qpchvtQrGOqVIh4ZkZyHnDm4n7hLeoCgewNkIAwKDqmQLZnN0rKGtV57OUeyhfPW5wwlwzgEyk4nm7kTAqBIy2Yw4= X-Gm-Message-State: AOJu0YwPrPiRecUj5BHZxT0+Agoo2QeaV8EZ98hcPFd/+MV3oxj1CnpL XXsOwJslkDOjFPe+WOMvhk/6rvaiMVYK36r9NZZsNw1Dosv+QF7/n/Vn9bqe X-Google-Smtp-Source: AGHT+IFq7AQRfYM2GxU9KBwkSxdM7k+i3cYB+sSVbzdWG1Jpk+aL9Bk0vGy+BNtba4DsenjFUxqcmw== X-Received: by 2002:a05:6512:e9f:b0:52c:df96:1726 with SMTP id 2adb3069b0e04-52e7b8e033bmr898324e87.1.1719589524518; Fri, 28 Jun 2024 08:45:24 -0700 (PDT) Received: from localhost ([213.79.110.82]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-52e7ab27776sm304605e87.169.2024.06.28.08.45.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Jun 2024 08:45:24 -0700 (PDT) From: Serge Semin To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Alexandre Torgue , Jose Abreu , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Giuseppe Cavallaro Cc: netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next] dt-bindings: net: dwmac: Validate PBL for all IP-cores Date: Fri, 28 Jun 2024 18:45:12 +0300 Message-ID: <20240628154515.8783-1-fancer.lancer@gmail.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240628_084527_145701_64EEC7D8 X-CRM114-Status: GOOD ( 11.66 ) 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, 2, 3] for Generic DW *MAC IP-cores. Moreover the STMMAC driver parses 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.378. [2] DesignWare Cores Ethernet Quality-of-Service Databook, Revision 5.10a, December 2017, p.1223. [3] DesignWare Cores XGMAC - 10G Ethernet MAC Databook, Revision 2.11a, September 2015, p.469-473. Signed-off-by: Serge Semin Reviewed-by: Conor Dooley Reviewed-by: Rob Herring (Arm) --- The discussion where we agreed to submit this change: Link: https://lore.kernel.org/netdev/20240625215442.190557-2-robh@kernel.org --- .../devicetree/bindings/net/snps,dwmac.yaml | 80 ++++++------------- 1 file changed, 26 insertions(+), 54 deletions(-) diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml index 5a39d931e429..509086b76211 100644 --- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml +++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml @@ -447,6 +447,32 @@ properties: description: Use Address-Aligned Beats + 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. + snps,fixed-burst: $ref: /schemas/types.yaml#/definitions/flag description: @@ -577,60 +603,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 - - qcom,sa8775p-ethqos - - qcom,sc8280xp-ethqos - - snps,dwmac-3.50a - - snps,dwmac-4.10a - - snps,dwmac-4.20a - - snps,dwmac-5.20 - - 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: