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.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 C0DD5C433E6 for ; Wed, 10 Feb 2021 22:06:42 +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 8497364E08 for ; Wed, 10 Feb 2021 22:06:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8497364E08 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: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=l95ccAiW0/46r2XPgRsFVpZHQVRQ/8Iq5hfLUkQLJko=; b=dIm6+yazeFJPt2cNq4g1FD5up VIwrSag+xBUxhKozONtL7Sm4BeUdrJPHrfoCHdHFBbTC9CgIUAE6z1c7rUc5vupj3I/jjBCotUhNW AwMoHJaq8omK1tR2ev21DNI05i7RzUSOERbOxcWY2843P4qZRNj+ktCXILAyak9/1mO5vsk42Xo0T Hb5iSkY3qpBkPIv9eraaaAe245LwWPI8Pn98bx3WC1WFwnt2VudEaUUHbfyxoZYWbi/lL33FZMotr Ctshim1OEDhfa+SbphjQWfwkwKvyTLG1gEQ3OMGKJMZAEA29/+P02T2xDk0lSTwI1y9ykn4Cbmlja DpyI3sbpQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l9xbv-00027e-7C; Wed, 10 Feb 2021 22:05:23 +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 1l9xbs-00026z-Tq for linux-arm-kernel@lists.infradead.org; Wed, 10 Feb 2021 22:05:22 +0000 Date: Thu, 11 Feb 2021 01:05:18 +0300 From: Serge Semin To: Rob Herring Subject: Re: [PATCH v2 07/24] dt-bindings: net: dwmac: Detach Generic DW MAC bindings Message-ID: <20210210220518.nbzm6ux6pui2csbf@mobilestation> References: <20210208135609.7685-1-Sergey.Semin@baikalelectronics.ru> <20210208135609.7685-8-Sergey.Semin@baikalelectronics.ru> <20210209223258.GA328873@robh.at.kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210209223258.GA328873@robh.at.kernel.org> 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-20210210_170521_264303_78868B9E X-CRM114-Status: GOOD ( 25.40 ) 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 , Serge Semin , Alexey Malahov , Jose Abreu , Maxime Ripard , 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 Tue, Feb 09, 2021 at 04:32:58PM -0600, Rob Herring wrote: > 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 Got it. Thanks. -Sergey > > > + - 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