Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp4014940pxb; Mon, 8 Feb 2021 06:05:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJwcrSydzYNem9WbULTzoVeoxIjPebslYUS8kDh++sgnajdlYoDQnCoUN7e96cNKZlleTsXr X-Received: by 2002:a17:906:12d2:: with SMTP id l18mr6845116ejb.308.1612793137760; Mon, 08 Feb 2021 06:05:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612793137; cv=none; d=google.com; s=arc-20160816; b=tP/hM0/1T0cPzBzfH0kYyD7DIAiYWwxC2+xUZzdKGPqF/Pj1xTIVcASaCXeaQPepZt Vy4SviYcIK1UQDtz3mElaWthlad5JK8Pugs9SiizojLr8KYkGuvrbsq0A4Ad5ENRhKQd tLEhKo7cLNyLbHcfcymQB3RedJwAf12S4cowbEAmnNjw766CWKSF7mrdXefmI2Axob7O msllz1Wdv+uCaJBIv4A1rFsIVLGE+enghg7EoqGgSgkTuJ11D/uFJ6jrbOOkAMeFFVux y+40/cLy3uzAPm6pe16fupidw80N5i6FQdl+gW6dh13rastXY/WgeO/076ctdV4huHh+ KgOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=SoW0lyeldK2djzisnT7/YqxLd3y/6uNASPYi8YvdMzE=; b=m65qB4jhk/ix2U0fQmb/Hl7b/nwZrV4vu3IhfXmKzi47jUgJhE5xF4Vq9GaQzTUfnT N8VL+heo5Exjp2kJXU869zvs9k1W4oJctMPwyoobY0CjM9LU5QBCbNJVo8hGbHfxORI9 g8ghpyvEaUfHvexFzsIcnCJDQOId/5V03pKPBiA0Nd81+M5cEVdnfescWEj2DmOLG4iD nuLNZs1LD2tG7ci4Qob1vQeevU0nRTAjBdsceHQWhvAtQZEQ+65a+i4ocIoq09j/zT6Y uCwowXOv73b5Dyl8Y6HW4ZSF+V061z6B4JAgWIQbXplYOWD6dfWMzRvAUEkWIG43iNdF ewlw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a42si13990281edf.287.2021.02.08.06.04.57; Mon, 08 Feb 2021 06:05:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231734AbhBHOCm (ORCPT + 99 others); Mon, 8 Feb 2021 09:02:42 -0500 Received: from mail.baikalelectronics.com ([87.245.175.226]:56740 "EHLO mail.baikalelectronics.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231773AbhBHN45 (ORCPT ); Mon, 8 Feb 2021 08:56:57 -0500 From: Serge Semin To: Rob Herring , Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S. Miller" , Jakub Kicinski , Johan Hovold , Maxime Ripard , Joao Pinto , Lars Persson CC: Serge Semin , Serge Semin , Alexey Malahov , Pavel Parkhomenko , Vyacheslav Mitrofanov , Maxime Coquelin , , , , , , Rob Herring Subject: [PATCH v2 01/24] dt-bindings: net: dwmac: Validate PBL for all IP-cores Date: Mon, 8 Feb 2021 16:55:45 +0300 Message-ID: <20210208135609.7685-2-Sergey.Semin@baikalelectronics.ru> In-Reply-To: <20210208135609.7685-1-Sergey.Semin@baikalelectronics.ru> References: <20210208135609.7685-1-Sergey.Semin@baikalelectronics.ru> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-ClientProxiedBy: MAIL.baikal.int (192.168.51.25) To mail (192.168.51.25) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Indeed the maximum DMA burst length can be programmed not only for DW xGMACs, Allwinner EMACs and Spear SoC GMAC, but in accordance with [1] for Generic DW *MAC IP-cores. Moreover the STMMAC set of drivers parse the property and then apply the configuration for all supported DW MAC devices. All of that makes the property being available for all IP-cores the bindings supports. Let's make sure the PBL-related properties are validated for all of them by the common DW MAC DT schema. [1] DesignWare Cores Ethernet MAC Universal Databook, Revision 3.73a, October 2013, p. 380. Signed-off-by: Serge Semin Reviewed-by: Rob Herring --- Changelog v2: - Use correct syntax of the JSON pointers, so the later would begin with a '/' after the '#'. --- .../devicetree/bindings/net/snps,dwmac.yaml | 69 +++++++------------ 1 file changed, 26 insertions(+), 43 deletions(-) diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml index 0642b0f59491..40a002770441 100644 --- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml +++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml @@ -265,6 +265,32 @@ properties: is supported. For example, this is used in case of SGMII and MAC2MAC connection. + 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. + mdio: type: object description: @@ -290,49 +316,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-emac - - allwinner,sun8i-v3s-emac - - allwinner,sun50i-a64-emac - - 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: [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. - - if: properties: compatible: -- 2.29.2