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=-9.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, 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 9664DC433E7 for ; Tue, 13 Oct 2020 15:50:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 35F7B25205 for ; Tue, 13 Oct 2020 15:50:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729332AbgJMPu2 (ORCPT ); Tue, 13 Oct 2020 11:50:28 -0400 Received: from mail.baikalelectronics.com ([87.245.175.226]:41584 "EHLO mail.baikalelectronics.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728336AbgJMPu2 (ORCPT ); Tue, 13 Oct 2020 11:50:28 -0400 Received: from localhost (unknown [127.0.0.1]) by mail.baikalelectronics.ru (Postfix) with ESMTP id BDADD8030865; Tue, 13 Oct 2020 15:50:22 +0000 (UTC) X-Virus-Scanned: amavisd-new at baikalelectronics.ru Received: from mail.baikalelectronics.ru ([127.0.0.1]) by localhost (mail.baikalelectronics.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WSgFyl4htUsp; Tue, 13 Oct 2020 18:50:21 +0300 (MSK) Date: Tue, 13 Oct 2020 18:50:20 +0300 From: Serge Semin To: Rob Herring CC: Serge Semin , Mathias Nyman , Felipe Balbi , Greg Kroah-Hartman , Kevin Hilman , Neil Armstrong , Jerome Brunet , Martin Blumenstingl , Alexey Malahov , Pavel Parkhomenko , Andy Gross , Bjorn Andersson , Manu Gautam , Roger Quadros , Lad Prabhakar , Yoshihiro Shimoda , , , , , Subject: Re: [PATCH 16/18] dt-bindings: usb: meson-g12a-usb: Validate DWC2/DWC3 sub-nodes Message-ID: <20201013155020.l7uqti25kk3mhdmy@mobilestation> References: <20201010224121.12672-1-Sergey.Semin@baikalelectronics.ru> <20201010224121.12672-17-Sergey.Semin@baikalelectronics.ru> <20201013124203.GE3269269@bogus> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20201013124203.GE3269269@bogus> X-ClientProxiedBy: MAIL.baikal.int (192.168.51.25) To mail (192.168.51.25) Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org On Tue, Oct 13, 2020 at 07:42:03AM -0500, Rob Herring wrote: > On Sun, Oct 11, 2020 at 01:41:19AM +0300, Serge Semin wrote: > > Amlogic G12A USB DT sub-nodes are supposed to be compatible with the > > generic DWC USB2 and USB3 devices. Since now we've got DT schemas for > > both of the later IP cores let's make sure that the Amlogic G12A USB > > DT nodes are fully evaluated including the DWC sub-nodes. > > > > Signed-off-by: Serge Semin > > --- > > .../bindings/usb/amlogic,meson-g12a-usb-ctrl.yaml | 15 ++++++++++++++- > > 1 file changed, 14 insertions(+), 1 deletion(-) > > > > diff --git a/Documentation/devicetree/bindings/usb/amlogic,meson-g12a-usb-ctrl.yaml b/Documentation/devicetree/bindings/usb/amlogic,meson-g12a-usb-ctrl.yaml > > index 88184d7e26cc..3e8ac0ff90de 100644 > > --- a/Documentation/devicetree/bindings/usb/amlogic,meson-g12a-usb-ctrl.yaml > > +++ b/Documentation/devicetree/bindings/usb/amlogic,meson-g12a-usb-ctrl.yaml > > @@ -78,7 +78,20 @@ properties: > > > > patternProperties: > > "^usb@[0-9a-f]+$": > > - type: object > > + allOf: > > + - if: > > + properties: > > + compatible: > > + contains: > > + const: snps,dwc2 > > + then: > > + $ref: dwc2.yaml# > > + - if: > > + properties: > > + compatible: > > + const: snps,dwc3 > > + then: > > + $ref: snps,dwc3.yaml# > > It should be enough to do just: > > oneOf: > - $ref: dwc2.yaml# > - $ref: snps,dwc3.yaml# Ah, good point! Thanks. -Sergey