Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp855608pxb; Fri, 22 Apr 2022 12:43:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyoekSaeJbsxLPZ47fP7TMdkej+8hKAMnvh7mcDOWKcGLlHo71LEFUnb+EYreOQ/UAh/EcB X-Received: by 2002:a63:1325:0:b0:39d:8eaa:27f7 with SMTP id i37-20020a631325000000b0039d8eaa27f7mr5269388pgl.297.1650656584983; Fri, 22 Apr 2022 12:43:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650656584; cv=none; d=google.com; s=arc-20160816; b=JOnsctVIqNOPWBExYTNaWqv2OHcgyr3Nb3eakrSS5Q+gut/Oe0dORUG8CusP5hmPb3 bxq3AFoz79BQ1E75doCYlIrIJ2SagIutb/LHlSLSXncSjmRDIvjrGJNlAyDkf1O2vKmk N1dUVffQHMopbCPD7Nmvbf+6DMDZKCHpcSaaeVl+4K6vlXs5aDoUB7QCUAahsgFrNudY Xaxftw/U9rGvHxjjbmM0NFL+zVkZ6ePJNc+F+/xQ15zbufXT2Y4grST5ZiRW0YTIp1kC Dn5LBhzi4IOgvO1+FZI9uWzLTAAEKo5qcA5P+LGAeNJAz4v6WoglMMg5+k6l+W6qEQ6F UyBA== 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=Yuk0DkDPEInPbO2/7/mEfOaFgM8OSF6LY257uIAIVYU=; b=awyW2ctVHeq6OMGkOcAZWe6TxYNqTe74pAXDHkMRSzt7NzRJpaBJKzTsCBUAHLc2M2 rEzgPt3DF8A4de2dsGMNeeBgzWLMLxtFp6tx7edFusBM+0lMAUFibH+1mgyjY/gb325I m5+uOhrsPGT5FUPIU7dLafxeEQh8FudrJzV0mKtzhUNQEBTlJ7T7M8ftPVdVklZyOw3D FANWeIq+TE6A37sCqtEBiGAzRn2gAIidEZH6roRZQudC0cCEXDq7G0XCbhN5K0IMQwjf eJYRJHhhIFY26NqYCOhU0fieTKhKEMVjZ0ujgcIDwHSn83KJ+iBPTQatQq/xDfBwpGO9 /DOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=gVZD0Yq6; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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. [23.128.96.19]) by mx.google.com with ESMTPS id l189-20020a6388c6000000b0039cc85e85e9si9417132pgd.531.2022.04.22.12.43.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 12:43:04 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=gVZD0Yq6; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 5A8C6206C25; Fri, 22 Apr 2022 11:48:39 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352089AbiDTNK7 (ORCPT + 99 others); Wed, 20 Apr 2022 09:10:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235000AbiDTNK5 (ORCPT ); Wed, 20 Apr 2022 09:10:57 -0400 Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7D0831A3A7; Wed, 20 Apr 2022 06:08:03 -0700 (PDT) Received: (Authenticated sender: herve.codina@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 310E94000E; Wed, 20 Apr 2022 13:08:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1650460081; 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=Yuk0DkDPEInPbO2/7/mEfOaFgM8OSF6LY257uIAIVYU=; b=gVZD0Yq66dGtbd3tNLTW39EtL5QZSEA+tJfDOou3z24FIgHn7EWKkxiriGZLXKFlhJabzM LYKitguMS9+J49ShBJNH4gDXPKjmRJ5e41XKskhTGH0hoDuZnWF9swiLtyZTVKj8IQKv1H 0EWXxgla8Mrm/dHHaXQ70G65oCcNjSA3KFJLiH7jyAERAK8v1tnuHvEtL6Wyjv2X8PFVsy cQi88TkKlaTwTVHcot5kG/ti3/jJ2VvSB+j9BSKocIL43fubwY48Pn/WIhh2KS62dYpHNY zowk7iRgXtsIOv8ENuZm3bvAA4Y3tkJ3AvCh9gKD9u6fIh2AGxAR7zHFfnF9dw== Date: Wed, 20 Apr 2022 15:07:59 +0200 From: Herve Codina To: Geert Uytterhoeven Cc: Marek Vasut , Yoshihiro Shimoda , Bjorn Helgaas , Rob Herring , Krzysztof Kozlowski , Geert Uytterhoeven , Magnus Damm , Lorenzo Pieralisi , Krzysztof =?UTF-8?B?V2lsY3p5xYRza2k=?= , Rob Herring , 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: <20220420150759.713fcd02@bootlin.com> In-Reply-To: References: <20220414074011.500533-1-herve.codina@bootlin.com> <20220414074011.500533-4-herve.codina@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 Geert, Rob, On Thu, 14 Apr 2022 10:35:07 +0200 Geert Uytterhoeven wrote: > Hi Herv=C3=A9, >=20 > On Thu, Apr 14, 2022 at 9:40 AM Herve Codina w= rote: > > Define that multiple clocks can be present at clocks property. > > > > Signed-off-by: Herve Codina =20 >=20 > Thanks for your patch! >=20 > > --- a/Documentation/devicetree/bindings/pci/renesas,pci-usb.yaml > > +++ b/Documentation/devicetree/bindings/pci/renesas,pci-usb.yaml > > @@ -54,7 +54,8 @@ properties: > > Standard property that helps to define the interrupt mapping. > > > > clocks: > > - description: The reference to the device clock. > > + description: > > + The references to the device clocks (several clocks can be refer= enced). =20 >=20 > Please describe the clocks, and add the missing "clock-names" property. >=20 > > > > bus-range: > > description: | =20 >=20 > I think it would be better to combine this with [PATCH v2 4/8], as the > additional clocks are only present on RZ/N1. >=20 > Then you can easily add json-schema logic to enforce the correct > number of clocks, depending on the compatible value. Sure. Is there a way to have the clocks description depending on the compatible v= alue. I mean something like: --- 8< --- properties: clocks: maxItems: 1 if: properties: compatible: contains: enum: - renesas,pci-r9a06g032 - renesas,pci-rzn1 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 else: properties: items: - description: Device clock clocks: minItems: 1 maxItems: 1 --- 8< --- In fact, I would like to describe the 3 clocks only for the r9a06g032 SOC and the rzn1 family and have an other description for the other 'compatible= '. I cannot succeed to do it. The only thing I can do is to leave the description of the 3 clocks out of = the conditional part. This leads to : --- 8< --- properties: clocks: items: - description: Internal bus clock (AHB) for HOST - description: Internal bus clock (AHB) Power Management - description: PCI clock for USB subsystem minItems: 1 if: properties: compatible: contains: enum: - renesas,pci-r9a06g032 - renesas,pci-rzn1 then: properties: clocks: minItems: 3 maxItems: 3 else: properties: clocks: minItems: 1 maxItems: 1 --- 8< --- Also the clock-names items can be different depending on the compatible value. Regards, Herv=C3=A9 --=20 Herv=C3=A9 Codina, Bootlin Embedded Linux and Kernel engineering https://bootlin.com