From patchwork Mon Feb 8 13:55:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Serge Semin X-Patchwork-Id: 12075663 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D1083C433E0 for ; Mon, 8 Feb 2021 14:17:02 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7342564E5A for ; Mon, 8 Feb 2021 14:17:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7342564E5A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=baikalelectronics.ru Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-ID:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ndYikYhnpHeCRA2gnXmdE5QBxUHE/LhcOIKeAjUydV8=; b=rHPtY2iWSh7kc9THATJY5/OeX ivFBOcLVDiiQbP6mxk1XIcaF+bzwiBDhKoi0TvhnI5dnntzAY4OGv+CWVT1nvW6XkF50zRsjY6EO2 /9XS/tMbLszCLdJJhMi8UXxKc2GJBEib2/Z3BEKm3hYQi+ACEJPLqKlPU6BNK10k41Tf+cInoWmHP 8xgmNHDbOlAhGRbRlCTcuHRYKCm44oYdiuKWfL6EcVAzKDAsnxqOtAxCOwRjWk8S9gOV5QIUigwUk 7RaXyoijy14fSfOgYqAkFLnYIO0cREuYCwegnj0e/fbzjypm+RH+WGvTLGed4IGTGIUUieuemrrye /IYJ9Dq9Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l97Jc-0000L9-0o; Mon, 08 Feb 2021 14:15:00 +0000 Received: from mail.baikalelectronics.com ([87.245.175.226] helo=mail.baikalelectronics.ru) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l97Au-00046t-BG for linux-arm-kernel@lists.infradead.org; Mon, 08 Feb 2021 14:06:07 +0000 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 Subject: [PATCH v2 03/24] dt-bindings: net: dwmac: Fix the TSO property declaration Date: Mon, 8 Feb 2021 16:55:47 +0300 Message-ID: <20210208135609.7685-4-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 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-20210208_090604_949082_B5B82B43 X-CRM114-Status: UNSURE ( 8.90 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Serge Semin , Alexey Malahov , Serge Semin , Vyacheslav Mitrofanov , Pavel Parkhomenko , Maxime Coquelin , linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org 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. 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. While at it move the whole allOf-block from the tail of the binding file to the head of it, as it's normally done in the most of the DT schemas. 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 Allwinner SunX GMAC glue driver, but only by the generic platform DT-parser. Changelog v2: - Use correct syntax of the JSON pointers, so the later would begin with a '/' after the '#'. --- .../devicetree/bindings/net/snps,dwmac.yaml | 52 +++++++++---------- 1 file changed, 24 insertions(+), 28 deletions(-) diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml index cb68a8dcafd7..03d58bf9965f 100644 --- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml +++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml @@ -37,6 +37,30 @@ select: required: - compatible +allOf: + - $ref: "ethernet-controller.yaml#" + - if: + properties: + compatible: + contains: + enum: + - snps,dwmac-4.00 + - snps,dwmac-4.10a + - snps,dwmac-4.20a + - snps,dwmac-5.10a + - snps,dwxgmac + - snps,dwxgmac-2.10 + + required: + - compatible + then: + properties: + snps,tso: + $ref: /schemas/types.yaml#/definitions/flag + description: + Enables the TSO feature otherwise it will be managed by + MAC HW capability register. + properties: # We need to include all the compatibles from schemas that will @@ -317,34 +341,6 @@ dependencies: snps,reset-active-low: ["snps,reset-gpio"] snps,reset-delay-us: ["snps,reset-gpio"] -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,dwmac-4.00 - - snps,dwmac-4.10a - - snps,dwmac-4.20a - - snps,dwxgmac - - snps,dwxgmac-2.10 - - st,spear600-gmac - - then: - properties: - snps,tso: - $ref: /schemas/types.yaml#/definitions/flag - description: - Enables the TSO feature otherwise it will be managed by - MAC HW capability register. - additionalProperties: true examples: