Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp850994pxb; Fri, 22 Apr 2022 12:34:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwCDsO5WyumG9mJNGFE+JGMjGDGfhLL6jB98abwGJCRqNWXr5uIKQIGVtTYMqyHUokVm1lA X-Received: by 2002:a17:90b:4ad1:b0:1d1:41f9:6125 with SMTP id mh17-20020a17090b4ad100b001d141f96125mr17908377pjb.137.1650656090575; Fri, 22 Apr 2022 12:34:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650656090; cv=none; d=google.com; s=arc-20160816; b=np0yiDZPM4mLPFbE63l+pD/pJRECccyh+4zjI1DY9GHsmdOw1fy+XWpVDDZannKeRL Vj5C2w87kPv5AylqZ4XcDzNeH/npfdMLJm+mzgvPjK869WxdI/yBdHJrS7iRXi37C6vw 0eRExVXxjoGwq1tHzhAMJCXBqRW4Ya2NKDkSEbIBQbQnZx/Y50esB41nwaXaT8ONn5Ze dtD+EUKAJLL8YLeIqUpA4PXC2YMl5isuFp9To3RmRNLOopUm4pC2NTlbb3IJbESTWKN2 NiaU6dmDoX7pVQuscZJGLRulnVjpBXd0krUfakvP6R8paLLruhDStmNwkz4gR24lAnsx WvqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:dkim-signature; bh=ZVgjPq5JZ4rcIJX3ynCVhQsKPdWqJ0HNcrFRR2wNvvk=; b=GqmEAxvb3nzd/vWc89iTriewVDQUaEgIUXi+2/hoXNqMmPJsTXDfT9uCn2Lzd8z4vv XePuigDvxqPtWqbBxKPfpYylwa4cT+X30V0UklGqjODEoZy0ABE8j7vExe/9Tiht8+hN spK0lcHjz3BEg3qnaK6UwW+M3F1Tv/Rlun3MCsoCNYyCGneO2Z096gyZ01Zzjg/GRiCg 4GECiImCvBGiisnk15b6ehKnndu0OkvUPfjs74U9ehUPId+44nN6CM+jV8pMTIcsQNoW K3C42ypowv1sHuBBw2PlQC6VOaqpcG7wmi1VndMbqOkrsNV1nwQkniEC4xXM313g5Rse 4Rkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=HsoSB+te; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id j18-20020a056a00131200b004faa473dabcsi8677413pfu.301.2022.04.22.12.34.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 12:34:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=HsoSB+te; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 35C391E8A28; Fri, 22 Apr 2022 11:42:42 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379837AbiDTO6Z (ORCPT + 99 others); Wed, 20 Apr 2022 10:58:25 -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 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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