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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9CE9DC433FE for ; Wed, 20 Apr 2022 14:55:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379831AbiDTO6V (ORCPT ); Wed, 20 Apr 2022 10:58:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56274 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236824AbiDTO6T (ORCPT ); Wed, 20 Apr 2022 10:58:19 -0400 Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::223]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7116B39BA5; Wed, 20 Apr 2022 07:55:31 -0700 (PDT) Received: (Authenticated sender: herve.codina@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id A175960003; Wed, 20 Apr 2022 14:55:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1650466529; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZVgjPq5JZ4rcIJX3ynCVhQsKPdWqJ0HNcrFRR2wNvvk=; b=HsoSB+ten91/hASrq8lR1vSpTAxXN6F4pVHyx+SiQjVrYcRbi6BwDOwy9uj1yE20k6A563 vczW119JS8rBNb7uHViCRzQ43kXst8p8e/hGtAjJoUzURIghd/3cMHWXOA+Q5xsmImOSSV UCFMyUsEnX0DhSMGqLHn8NNrWI8Cq/YS1rdTT/cA+OA+ZEGXeYa2MxLBIpPPtxO+Vtlkrw AzhmDwgQW5ViWLiIVg0caMR0k6i8FCy2SmZzzrhgKm0rJG5+6rZiZgTKKqOAl3iWmiBDa0 dislRePaa44xQh7BZGJs9agNWPfww/Q7V0k0jmdzGa9DE7jOg9Ad73KePgu6/Q== Date: Wed, 20 Apr 2022 16:55:26 +0200 From: Herve Codina To: Rob Herring Cc: Geert Uytterhoeven , Marek Vasut , Yoshihiro Shimoda , Bjorn Helgaas , Krzysztof Kozlowski , Geert Uytterhoeven , Magnus Damm , Lorenzo Pieralisi , Krzysztof =?UTF-8?B?V2lsY3p5xYRz?= =?UTF-8?B?a2k=?= , linux-pci , Linux-Renesas , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Linux Kernel Mailing List , Sergey Shtylyov , Thomas Petazzoni , Clement Leger , Miquel Raynal Subject: Re: [PATCH v2 3/8] dt-bindings: PCI: renesas-pci-usb: Allow multiple clocks Message-ID: <20220420165526.2ee3704d@bootlin.com> In-Reply-To: References: <20220414074011.500533-1-herve.codina@bootlin.com> <20220414074011.500533-4-herve.codina@bootlin.com> <20220420150759.713fcd02@bootlin.com> Organization: Bootlin X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.31; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org Hi Rob, Geert, On Wed, 20 Apr 2022 08:24:59 -0500 Rob Herring wrote: ... > > Is there a way to have the clocks description depending on the compatib= le value. > > I mean something like: > > --- 8< --- > > properties: > > clocks: > > maxItems: 1 =20 >=20 > This would need to cover both cases: >=20 > minItems: 1 > maxItems: 3 >=20 > >=20 > > if: > > properties: > > compatible: > > contains: > > enum: > > - renesas,pci-r9a06g032 > > - renesas,pci-rzn1 > >=20 > > then: > > properties: > > clocks: > > items: > > - description: Internal bus clock (AHB) for HOST > > - description: Internal bus clock (AHB) Power Management > > - description: PCI clock for USB subsystem > > minItems: 3 > > maxItems: 3 =20 >=20 > Don't need minItems or maxItems here. 3 is the default size based on=20 > 'items' length. >=20 > >=20 > > else: > > properties: > > items: =20 >=20 > I think you meant for this to be under 'clocks'. >=20 > > - description: Device clock > > clocks: > > minItems: 1 > > maxItems: 1 =20 >=20 > Just 'maxItems' is enough. >=20 > > --- 8< --- > >=20 Thanks to your details and Geert's binding examples, I have the clocks description and clock-names set depending on compatible value. This will be present in v3 series. Regards, Herv=C3=A9 --=20 Herv=C3=A9 Codina, Bootlin Embedded Linux and Kernel engineering https://bootlin.com