Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp4015811pxb; Mon, 8 Feb 2021 06:06:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJxV9oYxYPQYr5ePHUhvPxZfhwfll176gOTtu1u9TIf8uZq2zHqHJodYhlODABtdI/MXIMOg X-Received: by 2002:a17:906:4c90:: with SMTP id q16mr17484156eju.49.1612793197494; Mon, 08 Feb 2021 06:06:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612793197; cv=none; d=google.com; s=arc-20160816; b=iQiiBYPjnT+oibeUNGk/bdUNjp59g+nARg0CiuEDCriL4uDfowqgk7uSgGOmAWXPbP NlaS0mEhY3Q2MHnnxpO4EKkuFjNFk7s8JNmcdCYvpia6HGmw35tLGRfpdsTYT4l0ko6T gXD/g3tds5grKtuLDoFq8UtJSP1EsNk8V06SQekAzBbHmIQCbFtBT0V+TJDDQ4ARriNF +Ejn2WxCdCLcat/cA1+MhoZzmpGHBZcA+xT9NWkGMPPdtoCh9UTMWIGvVqItbA2pyeoU MeYY5k2uUbdO/d6e1TU6bp4thvRSqk2/x+knR2aNLojA5oZaYNpv90uGsmA0adqTfbEC J0Ng== 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=ZLPW6HJl3YoxEEisaER7ysA8+i05SLAZ3pUKdrKIL0Y=; b=r3tOz6dtFWZOcDp65Y7++s+hkfdwRpYSknYuM85cJnc30qdN473xx/IAggaxDkS0eb jumDAEH4W9ZE/8TavKjH0z3XccdiErMyrWnOr+UiGcVQ4t8b4wKljtyL7ATTJya9aYmy 1l9hLTopQlagBKsiyedCSra00qKctVvomETif1/Vk8epGT2oZYWayeKDCgqmokFzDn5W Ge+ZmubYF64ZfXmAn6ybViIM4g1ZEmoIilYTj+NbboO2utx8ljsjIVZjS8AEQNGfcQWr hwhQVR75OJov/qdQFMhukyYfb8aCOEvo5DFw8NfftLNvjObtVit+urYV2904+/snAJHq ELhg== 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 sa4si10907378ejb.288.2021.02.08.06.05.58; Mon, 08 Feb 2021 06:06: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 S232563AbhBHODn (ORCPT + 99 others); Mon, 8 Feb 2021 09:03:43 -0500 Received: from mail.baikalelectronics.com ([87.245.175.226]:56784 "EHLO mail.baikalelectronics.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231791AbhBHN5B (ORCPT ); Mon, 8 Feb 2021 08:57:01 -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 , , , , , 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 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 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 --- 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: -- 2.29.2