From mboxrd@z Thu Jan 1 00:00:00 1970 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.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 CCD20C4361B for ; Tue, 15 Dec 2020 17:24:00 +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 7CD32225A9 for ; Tue, 15 Dec 2020 17:24:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7CD32225A9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org 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:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=DHJXTokF9u9vJjrveDv+j3n1WsVFilWM0Buewo006mY=; b=V1PsG3FQkiC+lda2+fuDI2A2s I/kmbfBcKUlOwcpf+GBmduUiQQTdmMCSBRObHD17Hmekg4Nkt9SIEydCxQRkuRYboDf2D4l4lkdjI wgnFjT7cjOk4nqh1wxSfVamfcNRsY8BMogtJOuuu82MroOuHoUj3O7p5yhDx18nX8jy5Iap0M5CVx rzdtM9Ex+6PDE6Tv2ClZAOekgmWjCHQxy1cWZ0h+jQslvxs6vilxooea9aPZ1dkGbm2LmanJJx8WZ 6u1HsAMT+QzzhxiRTBNzrhcmnWxqM6+CMEDrjg6YPDDm8uADXPjo1iH5LiIcx6Yq0M7V/U69Xw5dQ H6CMucotg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kpE2C-0004vO-Qy; Tue, 15 Dec 2020 17:22:48 +0000 Received: from mail-ot1-f66.google.com ([209.85.210.66]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kpE27-0004t9-PE for linux-arm-kernel@lists.infradead.org; Tue, 15 Dec 2020 17:22:45 +0000 Received: by mail-ot1-f66.google.com with SMTP id 11so20118899oty.9 for ; Tue, 15 Dec 2020 09:22:43 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=TPedXdl2PY6JHGKX0f/qlnbwmUVBy3y2nBUN43lCo10=; b=k32DvJQXMufcauAGY4jRtbKZtTdPOsPmoNtU6EQnnop/YhvMYbucoMXXqsvE8GljjZ LiwpBFI+KvTl0SLsISE+kMEe0cdMLrk/AK8lbtszlZocsbSG6EXflHdsyoECXSPGQi2E wPUkPhQH9X9tIUEdLmLwZxKV3T3wmk6jOzDmkIC7hmVo364U3qQJ30XOzXlPVZAL07Qw BGAlp2Tuz8JAS45+ZDiON8BQnCdTPNQOV9JcXhKDiuTqfpfQOFAt8tisKYDycbGmcQ51 FFl+OZZh2zr512cjD7vyAKdKmKqFPey8b4IsvTgikIYwUcmei2tr9HEmi4806T3MurUD QkKg== X-Gm-Message-State: AOAM533EGgYHNDqWPtIyqWZ09McOIyKMcVdVAIkwc3UGjCYY8M56PzUJ lZH5Zgm5lPhf8y6oDGLndA== X-Google-Smtp-Source: ABdhPJzYe/1d+PtO64iiDzUljskow3Y88N+EV3ueO8nk0GUixOHeB/tzaf6tSb2hz8UTo5IMx0i3NA== X-Received: by 2002:a05:6830:159a:: with SMTP id i26mr23203338otr.315.1608052962799; Tue, 15 Dec 2020 09:22:42 -0800 (PST) Received: from xps15 (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.gmail.com with ESMTPSA id l132sm5125659oia.23.2020.12.15.09.22.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Dec 2020 09:22:42 -0800 (PST) Received: (nullmailer pid 4059538 invoked by uid 1000); Tue, 15 Dec 2020 17:22:40 -0000 Date: Tue, 15 Dec 2020 11:22:40 -0600 From: Rob Herring To: Serge Semin Subject: Re: [PATCH 03/25] dt-bindings: net: dwmac: Fix the TSO property declaration Message-ID: <20201215172240.GA4047815@robh.at.kernel.org> References: <20201214091616.13545-1-Sergey.Semin@baikalelectronics.ru> <20201214091616.13545-4-Sergey.Semin@baikalelectronics.ru> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201214091616.13545-4-Sergey.Semin@baikalelectronics.ru> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201215_122243_922870_B893C520 X-CRM114-Status: GOOD ( 22.36 ) 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, linux-kernel@vger.kernel.org, Alexandre Torgue , Joao Pinto , netdev@vger.kernel.org, Lars Persson , linux-stm32@st-md-mailman.stormreply.com, Johan Hovold , Maxime Ripard , Alexey Malahov , Jose Abreu , Serge Semin , Maxime Coquelin , Jakub Kicinski , Giuseppe Cavallaro , Vyacheslav Mitrofanov , "David S. Miller" , linux-arm-kernel@lists.infradead.org, Pavel Parkhomenko Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Dec 14, 2020 at 12:15:53PM +0300, Serge Semin wrote: > 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. 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. But still should be valid for Allwinner? > --- > .../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 e084fbbf976e..0dd543c6c08e 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. BTW, I prefer that properties are defined unconditionally, and then restricted in conditional schemas (or ones that include this schema). > + > properties: > > # We need to include all the compatibles from schemas that will > @@ -314,34 +338,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 This does not have a fallback, so snps,tso is no longer validated. I didn't check the rest. > - - 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 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel