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.6 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 9BA3FC433DB for ; Tue, 9 Feb 2021 22:34:35 +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 4D79A64DE7 for ; Tue, 9 Feb 2021 22:34:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4D79A64DE7 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=xVBaeC7OF0Ucig/Vz+Jf5iUiOP8jFh8nfWTalCln09o=; b=korQOspc2A2R25n5xXoOTm4sP Q0b/2R6+lnJFp/4CS2vRkv54II0+bTlmNTtg4X5tHUdTOlTG4zZYxw61odBbPD36li222vTRAajRv 8i0RgG1QrsET0R/0lmPgLAVZ38G+cvAfeWkHybKnuvaedbbUa3VjxLhj0hnjcYBmo0HEsNmKm7RPl DL/fqfNwcGezM0ZRrpcGG5Yjk6n0QWHBAh32p5u0O9E+53e/DyO5kqOLUot+OYOyLtjlC5h+00ElM ro8REMUj20tcbn04k5K8G3Nal53eqLmGBr/zKwr2kt/KUgB5NNy1w1NtlYr7OlepxmIkPjvPerUGK hCTmE9Vhg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l9bZB-0001SW-26; Tue, 09 Feb 2021 22:33:05 +0000 Received: from mail-oi1-f176.google.com ([209.85.167.176]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l9bZ8-0001Ry-6e for linux-arm-kernel@lists.infradead.org; Tue, 09 Feb 2021 22:33:03 +0000 Received: by mail-oi1-f176.google.com with SMTP id h6so21227833oie.5 for ; Tue, 09 Feb 2021 14:33:01 -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=/iX2s3bt8uDNQWgU3hcnj4j+Eer2ggS9c+8mDGZZ1Nw=; b=Bx9Sph4pbd5ocsqsvbIfB774bI8SxbpRFfqPnKvivbIlrLfwvyOyOcO/LOLjE+xM1U rjAF/pJCS4zqOgxrwm5kZ0Liiq2GrWOxXnLVVadrLQ1fQ3OlpEdHvyPm1dkQ3S/41Gcm Dj0YdyDontFE+mCsMcZVEFdZWuJhDeipjXU7FOhgBQw1kT6RFjRsqJYqjqyFQBBFfTwd ZwGRZHW6fAG5FmF338huFVFD3fFwcmGshjMkNRGdzF5jhl75nKpQD/tiQ13F81MyiihO JVIh6zcmL7tzDAJMuNLNUlIBnTOA8iqaG0zTj0veTT28DGWbQ5D0ijQSWyliI5rAbPWf jygQ== X-Gm-Message-State: AOAM5318eqPUJw7SJLR7XTSNeFL1JrF9kexnP5hJ93szj/K9wO1TthN6 gspRinTd28M8dVatf5EZcQ== X-Google-Smtp-Source: ABdhPJxAL4tl4M1dFOxdOSzVRHF28JqawikqUrbVHLugDyPi6f3KKRBBrFMRaXoAD21fp7uKiOdlUQ== X-Received: by 2002:aca:5f44:: with SMTP id t65mr13529oib.46.1612909981279; Tue, 09 Feb 2021 14:33:01 -0800 (PST) Received: from robh.at.kernel.org (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.gmail.com with ESMTPSA id p16sm26592oic.6.2021.02.09.14.32.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Feb 2021 14:33:00 -0800 (PST) Received: (nullmailer pid 337022 invoked by uid 1000); Tue, 09 Feb 2021 22:32:58 -0000 Date: Tue, 9 Feb 2021 16:32:58 -0600 From: Rob Herring To: Serge Semin Subject: Re: [PATCH v2 07/24] dt-bindings: net: dwmac: Detach Generic DW MAC bindings Message-ID: <20210209223258.GA328873@robh.at.kernel.org> References: <20210208135609.7685-1-Sergey.Semin@baikalelectronics.ru> <20210208135609.7685-8-Sergey.Semin@baikalelectronics.ru> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210208135609.7685-8-Sergey.Semin@baikalelectronics.ru> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210209_173302_318449_35E8CA98 X-CRM114-Status: GOOD ( 26.03 ) 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, Feb 08, 2021 at 04:55:51PM +0300, Serge Semin wrote: > Currently the snps,dwmac.yaml DT bindings file is used for both DT nodes > describing generic DW MAC devices and as DT schema with common properties > to be evaluated against a vendor-specific DW MAC IP-cores. Due to such > dual-purpose design the "compatible" property of the common DW MAC schema > needs to contain the vendor-specific strings to successfully pass the > schema evaluation in case if it's referenced from the vendor-specific DT > bindings. That's a bad design from maintainability point of view, since > adding/removing any DW MAC-based device bindings requires the common > schema modification. In order to fix that let's detach the schema which > provides the generic DW MAC DT nodes evaluation into a dedicated DT > bindings file preserving the common DW MAC properties declaration in the > snps,dwmac.yaml file. By doing so we'll still provide a common properties > evaluation for each vendor-specific MAC bindings which refer to the > common bindings file, while the generic DW MAC DT nodes will be checked > against the new snps,dwmac-generic.yaml DT schema. > > Signed-off-by: Serge Semin > > --- > > Changelog v2: > - Add a note to the snps,dwmac-generic.yaml bindings file description of > a requirement to create a new DT bindings file for the vendor-specific > versions of the DW MAC. > --- > .../bindings/net/snps,dwmac-generic.yaml | 154 ++++++++++++++++++ > .../devicetree/bindings/net/snps,dwmac.yaml | 139 +--------------- > 2 files changed, 155 insertions(+), 138 deletions(-) > create mode 100644 Documentation/devicetree/bindings/net/snps,dwmac-generic.yaml > > diff --git a/Documentation/devicetree/bindings/net/snps,dwmac-generic.yaml b/Documentation/devicetree/bindings/net/snps,dwmac-generic.yaml > new file mode 100644 > index 000000000000..6c3bf5b2f890 > --- /dev/null > +++ b/Documentation/devicetree/bindings/net/snps,dwmac-generic.yaml > @@ -0,0 +1,154 @@ > +# SPDX-License-Identifier: GPL-2.0 > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/net/snps,dwmac-generic.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Synopsys DesignWare Generic MAC Device Tree Bindings > + > +maintainers: > + - Alexandre Torgue > + - Giuseppe Cavallaro > + - Jose Abreu > + > +description: > + The primary purpose of this bindings file is to validate the Generic > + Synopsys Desginware MAC DT nodes defined in accordance with the select > + schema. All new vendor-specific versions of the DW *MAC IP-cores must > + be described in a dedicated DT bindings file. > + > +# Select the DT nodes, which have got compatible strings either as just a > +# single string with IP-core name optionally followed by the IP version or > +# two strings: one with IP-core name plus the IP version, another as just > +# the IP-core name. > +select: > + properties: > + compatible: > + oneOf: > + - items: > + - pattern: "^snps,dw(xg)+mac(-[0-9]+\\.[0-9]+a?)?$" Use '' instead of "" and you can skip the double \. With that, Reviewed-by: Rob Herring > + - items: > + - pattern: "^snps,dwmac-[0-9]+\\.[0-9]+a?$" > + - const: snps,dwmac > + - items: > + - pattern: "^snps,dwxgmac-[0-9]+\\.[0-9]+a?$" > + - const: snps,dwxgmac _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel