Message ID | 20230316030514.137427-4-xingyu.wu@starfivetech.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp257543wrt; Wed, 15 Mar 2023 20:10:59 -0700 (PDT) X-Google-Smtp-Source: AK7set/VrBOr286KjceZOZwj5Rv/FEE48SU8tgucqOLo1jrKBLUm6rW7Ek2WoCHOCQPcSzA0t9LV X-Received: by 2002:a05:6102:f86:b0:425:d18f:5771 with SMTP id e6-20020a0561020f8600b00425d18f5771mr2496301vsv.5.1678936259495; Wed, 15 Mar 2023 20:10:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678936259; cv=none; d=google.com; s=arc-20160816; b=OTJzsPLAmsL4f5aHZNOAcmU/QV7mZBY21aV/j/2gKWoGUgRfZZ0LGW/EbL401qV9zx CVvbPsdhBxrzqTBwuZUD3lnmW2Lz1DffGGWu0S2LrlzZwquL/GrLpoMJ23jLPMg75hUm sGvu4A6scYYvm7zoTOyNXxpd1B+3qTVizMLMVGBRztTQEzAoaXSdordvmcGAA/lgRfrd WORsj5xRzS5XJwsseAog81XGdHR44K3JlklrKYB1JwCfyoxtP8QMFP86YPnXDSbDX42s j/OKW03VQl9lD93Nfg7KqushBrmJQkPRATHo89AAdVD2xkyeCUFapNKXxYM0f+jRfswQ 0FrA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=l8zBD3HfHpO9b8ZvjnoF1WOvMpsxtV4xsTTqEgicbAY=; b=nvKnU9y/tIPB+gxLI8+tl3lefP0nOeHRIW6veGldQsTPFcDvo/w7Bym5/aszKYivAp 4G5j0olfyQ41KibH/e+Eg/8to+CC6xikCwrUge+hQh0VoOSfv5fxZHsKS879JkkXOYHi L07xeliakMDQ04zIAXIVgKphCW0R7+uoIXs5beVWr8gFM9t0+lUtyB/mwcJce+Xl6IG6 a6mlg4tGjrWBHV4igab3hCqGmxuW7n1NLvT/wrMSR2/FZPVoHd+A9Fyo1V2OITjZh25S RYz5wq/8yl1GfbxBFVyGVlQqTeOG0hxePrUqdkGyqHnIMmYZOApC8Kk6SoDL+XjoN2mV lr5w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p2-20020ab03b82000000b00753be25739fsi3350573uaw.32.2023.03.15.20.10.43; Wed, 15 Mar 2023 20:10:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229872AbjCPDFf convert rfc822-to-8bit (ORCPT <rfc822;ruipengqi7@gmail.com> + 99 others); Wed, 15 Mar 2023 23:05:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39190 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229816AbjCPDFW (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 15 Mar 2023 23:05:22 -0400 Received: from ex01.ufhost.com (ex01.ufhost.com [61.152.239.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 88B2640E6; Wed, 15 Mar 2023 20:05:20 -0700 (PDT) Received: from EXMBX166.cuchost.com (unknown [175.102.18.54]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "EXMBX166", Issuer "EXMBX166" (not verified)) by ex01.ufhost.com (Postfix) with ESMTP id 4142324E207; Thu, 16 Mar 2023 11:05:19 +0800 (CST) Received: from EXMBX061.cuchost.com (172.16.6.61) by EXMBX166.cuchost.com (172.16.6.76) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Thu, 16 Mar 2023 11:05:19 +0800 Received: from localhost.localdomain (113.72.145.194) by EXMBX061.cuchost.com (172.16.6.61) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Thu, 16 Mar 2023 11:05:17 +0800 From: Xingyu Wu <xingyu.wu@starfivetech.com> To: <linux-riscv@lists.infradead.org>, <devicetree@vger.kernel.org>, "Michael Turquette" <mturquette@baylibre.com>, Stephen Boyd <sboyd@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Philipp Zabel <p.zabel@pengutronix.de>, Conor Dooley <conor@kernel.org>, "Emil Renner Berthing" <kernel@esmil.dk> CC: Rob Herring <robh+dt@kernel.org>, Paul Walmsley <paul.walmsley@sifive.com>, Palmer Dabbelt <palmer@dabbelt.com>, Albert Ou <aou@eecs.berkeley.edu>, Hal Feng <hal.feng@starfivetech.com>, Xingyu Wu <xingyu.wu@starfivetech.com>, William Qiu <william.qiu@starfivetech.com>, <linux-kernel@vger.kernel.org>, <linux-clk@vger.kernel.org> Subject: [PATCH v2 3/6] dt-bindings: soc: starfive: syscon: Add optional patternProperties Date: Thu, 16 Mar 2023 11:05:11 +0800 Message-ID: <20230316030514.137427-4-xingyu.wu@starfivetech.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230316030514.137427-1-xingyu.wu@starfivetech.com> References: <20230316030514.137427-1-xingyu.wu@starfivetech.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [113.72.145.194] X-ClientProxiedBy: EXCAS064.cuchost.com (172.16.6.24) To EXMBX061.cuchost.com (172.16.6.61) X-YovoleRuleAgent: yovoleflag Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760492266812084519?= X-GMAIL-MSGID: =?utf-8?q?1760492266812084519?= |
Series |
Add PLL clocks driver for StarFive JH7110 SoC
|
|
Commit Message
Xingyu Wu
March 16, 2023, 3:05 a.m. UTC
Add optional compatible and patternProperties.
Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com>
---
.../soc/starfive/starfive,jh7110-syscon.yaml | 39 ++++++++++++++++---
1 file changed, 33 insertions(+), 6 deletions(-)
Comments
On 16/03/2023 04:05, Xingyu Wu wrote: > Add optional compatible and patternProperties. > > Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com> > --- > .../soc/starfive/starfive,jh7110-syscon.yaml | 39 ++++++++++++++++--- > 1 file changed, 33 insertions(+), 6 deletions(-) > > diff --git a/Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml b/Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml > index ae7f1d6916af..b61d8921ef42 100644 > --- a/Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml > +++ b/Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml > @@ -15,16 +15,31 @@ description: | > > properties: > compatible: > - items: > - - enum: > - - starfive,jh7110-aon-syscon > - - starfive,jh7110-stg-syscon > - - starfive,jh7110-sys-syscon > - - const: syscon > + oneOf: > + - items: > + - enum: > + - starfive,jh7110-aon-syscon > + - starfive,jh7110-stg-syscon > + - starfive,jh7110-sys-syscon > + - const: syscon > + - items: > + - enum: > + - starfive,jh7110-aon-syscon > + - starfive,jh7110-stg-syscon > + - starfive,jh7110-sys-syscon > + - const: syscon > + - const: simple-mfd > > reg: > maxItems: 1 > > +patternProperties: > + # Optional children > + "pll-clock-controller": It's not a pattern. Anyway should be clock-controller > + type: object > + $ref: /schemas/clock/starfive,jh7110-pll.yaml# > + description: Clock provider for PLL. > + You just added these bindings! So the initial submission was incomplete on purpose? No, add complete bindings. > required: > - compatible > - reg > @@ -38,4 +53,16 @@ examples: > reg = <0x10240000 0x1000>; > }; > > + - | > + syscon@13030000 { No need for new example... Just put it in existing one. Best regards, Krzysztof
On 2023/3/19 20:28, Krzysztof Kozlowski wrote: > On 16/03/2023 04:05, Xingyu Wu wrote: >> Add optional compatible and patternProperties. >> >> Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com> >> --- >> .../soc/starfive/starfive,jh7110-syscon.yaml | 39 ++++++++++++++++--- >> 1 file changed, 33 insertions(+), 6 deletions(-) >> >> diff --git a/Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml b/Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml >> index ae7f1d6916af..b61d8921ef42 100644 >> --- a/Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml >> +++ b/Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml >> @@ -15,16 +15,31 @@ description: | >> >> properties: >> compatible: >> - items: >> - - enum: >> - - starfive,jh7110-aon-syscon >> - - starfive,jh7110-stg-syscon >> - - starfive,jh7110-sys-syscon >> - - const: syscon >> + oneOf: >> + - items: >> + - enum: >> + - starfive,jh7110-aon-syscon >> + - starfive,jh7110-stg-syscon >> + - starfive,jh7110-sys-syscon >> + - const: syscon >> + - items: >> + - enum: >> + - starfive,jh7110-aon-syscon >> + - starfive,jh7110-stg-syscon >> + - starfive,jh7110-sys-syscon >> + - const: syscon >> + - const: simple-mfd >> >> reg: >> maxItems: 1 >> >> +patternProperties: >> + # Optional children >> + "pll-clock-controller": > > It's not a pattern. Does it use 'properties' instead of 'patternProperties'? > > Anyway should be clock-controller Will fix. > >> + type: object >> + $ref: /schemas/clock/starfive,jh7110-pll.yaml# >> + description: Clock provider for PLL. >> + > > You just added these bindings! So the initial submission was incomplete > on purpose? > > No, add complete bindings. Does you mean that it should drop the 'description', or add complete 'description', or add 'compatible', 'clocks' and 'clock-cells' of complete clock-controller bindings? > >> required: >> - compatible >> - reg >> @@ -38,4 +53,16 @@ examples: >> reg = <0x10240000 0x1000>; >> }; >> >> + - | >> + syscon@13030000 { > > No need for new example... Just put it in existing one. > Actually, the PLL clock-controller are just set in sys-syscon resgisters. The stg-syscon and aon-syscon don't need it. So PLL clock-controller node only is added in sys-syscon node. Best regards, Xingyu Wu
On 20/03/2023 04:54, Xingyu Wu wrote: > On 2023/3/19 20:28, Krzysztof Kozlowski wrote: >> On 16/03/2023 04:05, Xingyu Wu wrote: >>> Add optional compatible and patternProperties. >>> >>> Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com> >>> --- >>> .../soc/starfive/starfive,jh7110-syscon.yaml | 39 ++++++++++++++++--- >>> 1 file changed, 33 insertions(+), 6 deletions(-) >>> >>> diff --git a/Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml b/Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml >>> index ae7f1d6916af..b61d8921ef42 100644 >>> --- a/Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml >>> +++ b/Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml >>> @@ -15,16 +15,31 @@ description: | >>> >>> properties: >>> compatible: >>> - items: >>> - - enum: >>> - - starfive,jh7110-aon-syscon >>> - - starfive,jh7110-stg-syscon >>> - - starfive,jh7110-sys-syscon >>> - - const: syscon >>> + oneOf: >>> + - items: >>> + - enum: >>> + - starfive,jh7110-aon-syscon >>> + - starfive,jh7110-stg-syscon >>> + - starfive,jh7110-sys-syscon >>> + - const: syscon >>> + - items: >>> + - enum: >>> + - starfive,jh7110-aon-syscon >>> + - starfive,jh7110-stg-syscon >>> + - starfive,jh7110-sys-syscon >>> + - const: syscon >>> + - const: simple-mfd >>> >>> reg: >>> maxItems: 1 >>> >>> +patternProperties: >>> + # Optional children >>> + "pll-clock-controller": >> >> It's not a pattern. > > Does it use 'properties' instead of 'patternProperties'? Yes. > >> >> Anyway should be clock-controller > > Will fix. > >> >>> + type: object >>> + $ref: /schemas/clock/starfive,jh7110-pll.yaml# >>> + description: Clock provider for PLL. >>> + >> >> You just added these bindings! So the initial submission was incomplete >> on purpose? >> >> No, add complete bindings. > > Does you mean that it should drop the 'description', or add complete 'description', > or add 'compatible', 'clocks' and 'clock-cells' of complete clock-controller bindings? It means it should be squashed with the patch which adds it. > >> >>> required: >>> - compatible >>> - reg >>> @@ -38,4 +53,16 @@ examples: >>> reg = <0x10240000 0x1000>; >>> }; >>> >>> + - | >>> + syscon@13030000 { >> >> No need for new example... Just put it in existing one. >> > > Actually, the PLL clock-controller are just set in sys-syscon resgisters. The stg-syscon and > aon-syscon don't need it. So PLL clock-controller node only is added in sys-syscon node. So why having other examples if they are included here? Drop them. Best regards, Krzysztof
On 2023/3/20 14:37, Krzysztof Kozlowski wrote: > On 20/03/2023 04:54, Xingyu Wu wrote: >> On 2023/3/19 20:28, Krzysztof Kozlowski wrote: >>> On 16/03/2023 04:05, Xingyu Wu wrote: >>>> Add optional compatible and patternProperties. >>>> >>>> Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com> >>>> --- >>>> .../soc/starfive/starfive,jh7110-syscon.yaml | 39 ++++++++++++++++--- >>>> 1 file changed, 33 insertions(+), 6 deletions(-) >>>> >>>> diff --git a/Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml b/Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml >>>> index ae7f1d6916af..b61d8921ef42 100644 >>>> --- a/Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml >>>> +++ b/Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml >>>> @@ -15,16 +15,31 @@ description: | >>>> >>>> properties: >>>> compatible: >>>> - items: >>>> - - enum: >>>> - - starfive,jh7110-aon-syscon >>>> - - starfive,jh7110-stg-syscon >>>> - - starfive,jh7110-sys-syscon >>>> - - const: syscon >>>> + oneOf: >>>> + - items: >>>> + - enum: >>>> + - starfive,jh7110-aon-syscon >>>> + - starfive,jh7110-stg-syscon >>>> + - starfive,jh7110-sys-syscon >>>> + - const: syscon >>>> + - items: >>>> + - enum: >>>> + - starfive,jh7110-aon-syscon >>>> + - starfive,jh7110-stg-syscon >>>> + - starfive,jh7110-sys-syscon >>>> + - const: syscon >>>> + - const: simple-mfd >>>> >>>> reg: >>>> maxItems: 1 >>>> >>>> +patternProperties: >>>> + # Optional children >>>> + "pll-clock-controller": >>> >>> It's not a pattern. >> >> Does it use 'properties' instead of 'patternProperties'? > > Yes. > >> >>> >>> Anyway should be clock-controller >> >> Will fix. >> >>> >>>> + type: object >>>> + $ref: /schemas/clock/starfive,jh7110-pll.yaml# >>>> + description: Clock provider for PLL. >>>> + >>> >>> You just added these bindings! So the initial submission was incomplete >>> on purpose? >>> >>> No, add complete bindings. >> >> Does you mean that it should drop the 'description', or add complete 'description', >> or add 'compatible', 'clocks' and 'clock-cells' of complete clock-controller bindings? > > It means it should be squashed with the patch which adds it. Should I drop the 'decription' here and keep the 'decription' in patch1? > >> >>> >>>> required: >>>> - compatible >>>> - reg >>>> @@ -38,4 +53,16 @@ examples: >>>> reg = <0x10240000 0x1000>; >>>> }; >>>> >>>> + - | >>>> + syscon@13030000 { >>> >>> No need for new example... Just put it in existing one. >>> >> >> Actually, the PLL clock-controller are just set in sys-syscon resgisters. The stg-syscon and >> aon-syscon don't need it. So PLL clock-controller node only is added in sys-syscon node. > > So why having other examples if they are included here? Drop them. > Should I drop the old example of stg-syscon and add a new example of sys-syscon which include clock-controller child node? Best regards, Xingyu Wu
On 20/03/2023 08:29, Xingyu Wu wrote: > On 2023/3/20 14:37, Krzysztof Kozlowski wrote: >> On 20/03/2023 04:54, Xingyu Wu wrote: >>> On 2023/3/19 20:28, Krzysztof Kozlowski wrote: >>>> On 16/03/2023 04:05, Xingyu Wu wrote: >>>>> Add optional compatible and patternProperties. >>>>> >>>>> Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com> >>>>> --- >>>>> .../soc/starfive/starfive,jh7110-syscon.yaml | 39 ++++++++++++++++--- >>>>> 1 file changed, 33 insertions(+), 6 deletions(-) >>>>> >>>>> diff --git a/Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml b/Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml >>>>> index ae7f1d6916af..b61d8921ef42 100644 >>>>> --- a/Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml >>>>> +++ b/Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml >>>>> @@ -15,16 +15,31 @@ description: | >>>>> >>>>> properties: >>>>> compatible: >>>>> - items: >>>>> - - enum: >>>>> - - starfive,jh7110-aon-syscon >>>>> - - starfive,jh7110-stg-syscon >>>>> - - starfive,jh7110-sys-syscon >>>>> - - const: syscon >>>>> + oneOf: >>>>> + - items: >>>>> + - enum: >>>>> + - starfive,jh7110-aon-syscon >>>>> + - starfive,jh7110-stg-syscon >>>>> + - starfive,jh7110-sys-syscon >>>>> + - const: syscon >>>>> + - items: >>>>> + - enum: >>>>> + - starfive,jh7110-aon-syscon >>>>> + - starfive,jh7110-stg-syscon >>>>> + - starfive,jh7110-sys-syscon >>>>> + - const: syscon >>>>> + - const: simple-mfd BTW, this also looks wrong. You just said that clock controller exists only in few variants. Also, why sometimes the same device goes with simple-mfd and sometimies without? It's the same device. >>>>> >>>>> reg: >>>>> maxItems: 1 >>>>> >>>>> +patternProperties: >>>>> + # Optional children >>>>> + "pll-clock-controller": >>>> >>>> It's not a pattern. >>> >>> Does it use 'properties' instead of 'patternProperties'? >> >> Yes. >> >>> >>>> >>>> Anyway should be clock-controller >>> >>> Will fix. >>> >>>> >>>>> + type: object >>>>> + $ref: /schemas/clock/starfive,jh7110-pll.yaml# >>>>> + description: Clock provider for PLL. >>>>> + >>>> >>>> You just added these bindings! So the initial submission was incomplete >>>> on purpose? >>>> >>>> No, add complete bindings. >>> >>> Does you mean that it should drop the 'description', or add complete 'description', >>> or add 'compatible', 'clocks' and 'clock-cells' of complete clock-controller bindings? >> >> It means it should be squashed with the patch which adds it. > > Should I drop the 'decription' here and keep the 'decription' in patch1? There should be no this patch at all. However I do not understand what you want to do with description. What's wrong with description? > >> >>> >>>> >>>>> required: >>>>> - compatible >>>>> - reg >>>>> @@ -38,4 +53,16 @@ examples: >>>>> reg = <0x10240000 0x1000>; >>>>> }; >>>>> >>>>> + - | >>>>> + syscon@13030000 { >>>> >>>> No need for new example... Just put it in existing one. >>>> >>> >>> Actually, the PLL clock-controller are just set in sys-syscon resgisters. The stg-syscon and >>> aon-syscon don't need it. So PLL clock-controller node only is added in sys-syscon node. >> >> So why having other examples if they are included here? Drop them. >> > > Should I drop the old example of stg-syscon and add a new example of sys-syscon which > include clock-controller child node? No, there should be no stg-syscon example, it's useless. Best regards, Krzysztof
On 2023/3/20 15:40, Krzysztof Kozlowski wrote: > On 20/03/2023 08:29, Xingyu Wu wrote: >> On 2023/3/20 14:37, Krzysztof Kozlowski wrote: >>> On 20/03/2023 04:54, Xingyu Wu wrote: >>>> On 2023/3/19 20:28, Krzysztof Kozlowski wrote: >>>>> On 16/03/2023 04:05, Xingyu Wu wrote: >>>>>> Add optional compatible and patternProperties. >>>>>> >>>>>> Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com> >>>>>> --- >>>>>> .../soc/starfive/starfive,jh7110-syscon.yaml | 39 ++++++++++++++++--- >>>>>> 1 file changed, 33 insertions(+), 6 deletions(-) >>>>>> >>>>>> diff --git a/Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml b/Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml >>>>>> index ae7f1d6916af..b61d8921ef42 100644 >>>>>> --- a/Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml >>>>>> +++ b/Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml >>>>>> @@ -15,16 +15,31 @@ description: | >>>>>> >>>>>> properties: >>>>>> compatible: >>>>>> - items: >>>>>> - - enum: >>>>>> - - starfive,jh7110-aon-syscon >>>>>> - - starfive,jh7110-stg-syscon >>>>>> - - starfive,jh7110-sys-syscon >>>>>> - - const: syscon >>>>>> + oneOf: >>>>>> + - items: >>>>>> + - enum: >>>>>> + - starfive,jh7110-aon-syscon >>>>>> + - starfive,jh7110-stg-syscon >>>>>> + - starfive,jh7110-sys-syscon >>>>>> + - const: syscon >>>>>> + - items: >>>>>> + - enum: >>>>>> + - starfive,jh7110-aon-syscon >>>>>> + - starfive,jh7110-stg-syscon >>>>>> + - starfive,jh7110-sys-syscon >>>>>> + - const: syscon >>>>>> + - const: simple-mfd > > BTW, this also looks wrong. You just said that clock controller exists > only in few variants. Also, why sometimes the same device goes with > simple-mfd and sometimies without? It's the same device. Oh yes, If modified to: oneOf: - items: - enum: - starfive,jh7110-aon-syscon - starfive,jh7110-stg-syscon - const: syscon - items: - const: starfive,jh7110-sys-syscon - const: syscon - const: simple-mfd Or: - minItems: 2 items: - enum: - starfive,jh7110-aon-syscon - starfive,jh7110-stg-syscon - starfive,jh7110-sys-syscon - const: syscon - const: simple-mfd Which one is better? > >>>>>> >>>>>> reg: >>>>>> maxItems: 1 >>>>>> >>>>>> +patternProperties: >>>>>> + # Optional children >>>>>> + "pll-clock-controller": >>>>> >>>>> It's not a pattern. >>>> >>>> Does it use 'properties' instead of 'patternProperties'? >>> >>> Yes. >>> >>>> >>>>> >>>>> Anyway should be clock-controller >>>> >>>> Will fix. >>>> >>>>> >>>>>> + type: object >>>>>> + $ref: /schemas/clock/starfive,jh7110-pll.yaml# >>>>>> + description: Clock provider for PLL. >>>>>> + >>>>> >>>>> You just added these bindings! So the initial submission was incomplete >>>>> on purpose? >>>>> >>>>> No, add complete bindings. >>>> >>>> Does you mean that it should drop the 'description', or add complete 'description', >>>> or add 'compatible', 'clocks' and 'clock-cells' of complete clock-controller bindings? >>> >>> It means it should be squashed with the patch which adds it. >> >> Should I drop the 'decription' here and keep the 'decription' in patch1? > > There should be no this patch at all. However I do not understand what > you want to do with description. What's wrong with description? I thought you were commenting under description, saying a conflict with pll dtbindings' description. Is that mean I should add it in the syscon patch fo william not this patchset? >> >>> >>>> >>>>> >>>>>> required: >>>>>> - compatible >>>>>> - reg >>>>>> @@ -38,4 +53,16 @@ examples: >>>>>> reg = <0x10240000 0x1000>; >>>>>> }; >>>>>> >>>>>> + - | >>>>>> + syscon@13030000 { >>>>> >>>>> No need for new example... Just put it in existing one. >>>>> >>>> >>>> Actually, the PLL clock-controller are just set in sys-syscon resgisters. The stg-syscon and >>>> aon-syscon don't need it. So PLL clock-controller node only is added in sys-syscon node. >>> >>> So why having other examples if they are included here? Drop them. >>> >> >> Should I drop the old example of stg-syscon and add a new example of sys-syscon which >> include clock-controller child node? > > No, there should be no stg-syscon example, it's useless. > Thanks. I will remind william to use sys-syscon example instead. Best regards, Xingyu Wu
On 20/03/2023 09:26, Xingyu Wu wrote: > On 2023/3/20 15:40, Krzysztof Kozlowski wrote: >> On 20/03/2023 08:29, Xingyu Wu wrote: >>> On 2023/3/20 14:37, Krzysztof Kozlowski wrote: >>>> On 20/03/2023 04:54, Xingyu Wu wrote: >>>>> On 2023/3/19 20:28, Krzysztof Kozlowski wrote: >>>>>> On 16/03/2023 04:05, Xingyu Wu wrote: >>>>>>> Add optional compatible and patternProperties. >>>>>>> >>>>>>> Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com> >>>>>>> --- >>>>>>> .../soc/starfive/starfive,jh7110-syscon.yaml | 39 ++++++++++++++++--- >>>>>>> 1 file changed, 33 insertions(+), 6 deletions(-) >>>>>>> >>>>>>> diff --git a/Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml b/Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml >>>>>>> index ae7f1d6916af..b61d8921ef42 100644 >>>>>>> --- a/Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml >>>>>>> +++ b/Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml >>>>>>> @@ -15,16 +15,31 @@ description: | >>>>>>> >>>>>>> properties: >>>>>>> compatible: >>>>>>> - items: >>>>>>> - - enum: >>>>>>> - - starfive,jh7110-aon-syscon >>>>>>> - - starfive,jh7110-stg-syscon >>>>>>> - - starfive,jh7110-sys-syscon >>>>>>> - - const: syscon >>>>>>> + oneOf: >>>>>>> + - items: >>>>>>> + - enum: >>>>>>> + - starfive,jh7110-aon-syscon >>>>>>> + - starfive,jh7110-stg-syscon >>>>>>> + - starfive,jh7110-sys-syscon >>>>>>> + - const: syscon >>>>>>> + - items: >>>>>>> + - enum: >>>>>>> + - starfive,jh7110-aon-syscon >>>>>>> + - starfive,jh7110-stg-syscon >>>>>>> + - starfive,jh7110-sys-syscon >>>>>>> + - const: syscon >>>>>>> + - const: simple-mfd >> >> BTW, this also looks wrong. You just said that clock controller exists >> only in few variants. Also, why sometimes the same device goes with >> simple-mfd and sometimies without? It's the same device. > > Oh yes, If modified to: > > oneOf: > - items: > - enum: > - starfive,jh7110-aon-syscon > - starfive,jh7110-stg-syscon > - const: syscon > - items: > - const: starfive,jh7110-sys-syscon > - const: syscon > - const: simple-mfd > > Or: > > - minItems: 2 > items: > - enum: > - starfive,jh7110-aon-syscon > - starfive,jh7110-stg-syscon > - starfive,jh7110-sys-syscon > - const: syscon > - const: simple-mfd > > > Which one is better? If aon and stg are not supposed to have children, then only the first is correct. It's not which is better, the second is not really correct in such case. Best regards, Krzysztof
On 2023/3/20 16:36, Krzysztof Kozlowski wrote: > On 20/03/2023 09:26, Xingyu Wu wrote: >> On 2023/3/20 15:40, Krzysztof Kozlowski wrote: >>> On 20/03/2023 08:29, Xingyu Wu wrote: >>>> On 2023/3/20 14:37, Krzysztof Kozlowski wrote: >>>>> On 20/03/2023 04:54, Xingyu Wu wrote: >>>>>> On 2023/3/19 20:28, Krzysztof Kozlowski wrote: >>>>>>> On 16/03/2023 04:05, Xingyu Wu wrote: >>>>>>>> Add optional compatible and patternProperties. >>>>>>>> >>>>>>>> Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com> >>>>>>>> --- >>>>>>>> .../soc/starfive/starfive,jh7110-syscon.yaml | 39 ++++++++++++++++--- >>>>>>>> 1 file changed, 33 insertions(+), 6 deletions(-) >>>>>>>> >>>>>>>> diff --git a/Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml b/Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml >>>>>>>> index ae7f1d6916af..b61d8921ef42 100644 >>>>>>>> --- a/Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml >>>>>>>> +++ b/Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml >>>>>>>> @@ -15,16 +15,31 @@ description: | >>>>>>>> >>>>>>>> properties: >>>>>>>> compatible: >>>>>>>> - items: >>>>>>>> - - enum: >>>>>>>> - - starfive,jh7110-aon-syscon >>>>>>>> - - starfive,jh7110-stg-syscon >>>>>>>> - - starfive,jh7110-sys-syscon >>>>>>>> - - const: syscon >>>>>>>> + oneOf: >>>>>>>> + - items: >>>>>>>> + - enum: >>>>>>>> + - starfive,jh7110-aon-syscon >>>>>>>> + - starfive,jh7110-stg-syscon >>>>>>>> + - starfive,jh7110-sys-syscon >>>>>>>> + - const: syscon >>>>>>>> + - items: >>>>>>>> + - enum: >>>>>>>> + - starfive,jh7110-aon-syscon >>>>>>>> + - starfive,jh7110-stg-syscon >>>>>>>> + - starfive,jh7110-sys-syscon >>>>>>>> + - const: syscon >>>>>>>> + - const: simple-mfd >>> >>> BTW, this also looks wrong. You just said that clock controller exists >>> only in few variants. Also, why sometimes the same device goes with >>> simple-mfd and sometimies without? It's the same device. >> >> Oh yes, If modified to: >> >> oneOf: >> - items: >> - enum: >> - starfive,jh7110-aon-syscon >> - starfive,jh7110-stg-syscon >> - const: syscon >> - items: >> - const: starfive,jh7110-sys-syscon >> - const: syscon >> - const: simple-mfd >> >> Or: >> >> - minItems: 2 >> items: >> - enum: >> - starfive,jh7110-aon-syscon >> - starfive,jh7110-stg-syscon >> - starfive,jh7110-sys-syscon >> - const: syscon >> - const: simple-mfd >> >> >> Which one is better? > > If aon and stg are not supposed to have children, then only the first is > correct. It's not which is better, the second is not really correct in > such case. > OK, will modify it in next version. Thanks. Best regards, Xingyu Wu
diff --git a/Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml b/Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml index ae7f1d6916af..b61d8921ef42 100644 --- a/Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml +++ b/Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml @@ -15,16 +15,31 @@ description: | properties: compatible: - items: - - enum: - - starfive,jh7110-aon-syscon - - starfive,jh7110-stg-syscon - - starfive,jh7110-sys-syscon - - const: syscon + oneOf: + - items: + - enum: + - starfive,jh7110-aon-syscon + - starfive,jh7110-stg-syscon + - starfive,jh7110-sys-syscon + - const: syscon + - items: + - enum: + - starfive,jh7110-aon-syscon + - starfive,jh7110-stg-syscon + - starfive,jh7110-sys-syscon + - const: syscon + - const: simple-mfd reg: maxItems: 1 +patternProperties: + # Optional children + "pll-clock-controller": + type: object + $ref: /schemas/clock/starfive,jh7110-pll.yaml# + description: Clock provider for PLL. + required: - compatible - reg @@ -38,4 +53,16 @@ examples: reg = <0x10240000 0x1000>; }; + - | + syscon@13030000 { + compatible = "starfive,jh7110-sys-syscon", "syscon", "simple-mfd"; + reg = <0x13030000 0x1000>; + + pll-clock-controller { + compatible = "starfive,jh7110-pll"; + clocks = <&osc>; + #clock-cells = <1>; + }; + }; + ...