Message ID | 20230619083517.415597-2-william.qiu@starfivetech.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp2857702vqr; Mon, 19 Jun 2023 01:54:27 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5MBvIfL+iuZ74xAqPPViLg4fn/QilQv92FfWI85vFS9X04P2M2h3huka2nicJ6qgVa24oE X-Received: by 2002:a17:90a:1f82:b0:250:6c76:fd9b with SMTP id x2-20020a17090a1f8200b002506c76fd9bmr4485876pja.38.1687164867409; Mon, 19 Jun 2023 01:54:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687164867; cv=none; d=google.com; s=arc-20160816; b=nwol2B1LiEMNSn2c8Vo07GCxNYQq2RJv+mtMM5vTY/GQ2VgxYLwPWnGQ7y9SfE9Qz6 DmZ4UIBieWwRs2X3rVhVD+kecKlFkXBG4EkAkNZ6/p2vtB/TaH/Zj3ue6ioQAFTOk5UX u81fYkdtl4U1a60LC8pTLkZm1S8ma+YmmNKAVnTSez858oDFsOMmSCftHZ8vkpIM6weC eZ/Hj+zhuaQNd+JiPWaqNem+n4jW1kOxFhE+grFA4piUP3JAzVUatSUz3RzwtaU8pygv CdZ4YjqOA1rI+eT6hALx9KicSUAGBiwdzd9x/bLduOHTsWktQIum5JNCTX49Q8XWNXPD CAEg== 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=njOiDHKfItv3SKxReRsg1d1cR6/mw8YB6g5TwSxcPxc=; b=rQRf5Z9NGg2dOYDMAVf9RIqR/QgbtxKAec/yUSrpZ4HF0ch1sl6HZcoVFFmN9WOBql zqbm+x0D9GizqfIEV5nPQ+y2wiQXiwogXTUX2wmyRSyKi7Hin5YI5/SdxSFBpNOp4mgL pvFJ0AAYq+phmMUZKEGTxfYnsWUZIkKjLD1HrEu+UPhVk0YinHZdqIAH/PSW6sfOxP3D BzNsj64gQlsAp1FzUF/ZVR4X7tQNjSh+ZStwqxl90w44qR7vmMor+C1ox/SLI0HBf247 kfdPhirADpzsi8ZPovhk7pplg2OpQD/HBJvDH/LrmjsEcGdnqD1E6SxKGzqE12GfRUja Jf4A== 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 p10-20020a17090a4f0a00b002565804077bsi7136642pjh.32.2023.06.19.01.54.14; Mon, 19 Jun 2023 01:54:27 -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 S230480AbjFSIsW convert rfc822-to-8bit (ORCPT <rfc822;duw91626@gmail.com> + 99 others); Mon, 19 Jun 2023 04:48:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47658 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231322AbjFSIr7 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 19 Jun 2023 04:47:59 -0400 Received: from fd01.gateway.ufhost.com (fd01.gateway.ufhost.com [61.152.239.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1524610C0; Mon, 19 Jun 2023 01:46:19 -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 fd01.gateway.ufhost.com (Postfix) with ESMTP id 6561C8480; Mon, 19 Jun 2023 16:35:19 +0800 (CST) Received: from EXMBX068.cuchost.com (172.16.6.68) by EXMBX166.cuchost.com (172.16.6.76) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Mon, 19 Jun 2023 16:35:19 +0800 Received: from williamqiu-virtual-machine.starfivetech.com (171.223.208.138) by EXMBX068.cuchost.com (172.16.6.68) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Mon, 19 Jun 2023 16:35:18 +0800 From: William Qiu <william.qiu@starfivetech.com> To: <devicetree@vger.kernel.org>, <linux-spi@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <linux-riscv@lists.infradead.org> CC: Mark Brown <broonie@kernel.org>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org>, Emil Renner Berthing <kernel@esmil.dk>, Ziv Xu <ziv.xu@starfivetech.com>, William Qiu <william.qiu@starfivetech.com> Subject: [PATCH v3 1/3] dt-bindings: qspi: cdns,qspi-nor: Add clocks for StarFive JH7110 SoC Date: Mon, 19 Jun 2023 16:35:15 +0800 Message-ID: <20230619083517.415597-2-william.qiu@starfivetech.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230619083517.415597-1-william.qiu@starfivetech.com> References: <20230619083517.415597-1-william.qiu@starfivetech.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [171.223.208.138] X-ClientProxiedBy: EXCAS062.cuchost.com (172.16.6.22) To EXMBX068.cuchost.com (172.16.6.68) X-YovoleRuleAgent: yovoleflag Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE 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?1769120587714527954?= X-GMAIL-MSGID: =?utf-8?q?1769120587714527954?= |
Series |
Add initialization of clock for StarFive JH7110 SoC
|
|
Commit Message
William Qiu
June 19, 2023, 8:35 a.m. UTC
The QSPI controller needs three clock items to work properly on StarFive JH7110 SoC, so there is need to change the maxItems's value to 3. Other platforms do not have this constraint. Signed-off-by: William Qiu <william.qiu@starfivetech.com> Reviewed-by: Hal Feng <hal.feng@starfivetech.com> Reviewed-by: Conor Dooley <conor.dooley@microchip.com> --- .../bindings/spi/cdns,qspi-nor.yaml | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-)
Comments
On Mon, 19 Jun 2023 16:35:15 +0800, William Qiu wrote: > The QSPI controller needs three clock items to work properly on StarFive > JH7110 SoC, so there is need to change the maxItems's value to 3. Other > platforms do not have this constraint. > > Signed-off-by: William Qiu <william.qiu@starfivetech.com> > Reviewed-by: Hal Feng <hal.feng@starfivetech.com> > Reviewed-by: Conor Dooley <conor.dooley@microchip.com> > --- > .../bindings/spi/cdns,qspi-nor.yaml | 20 ++++++++++++++++++- > 1 file changed, 19 insertions(+), 1 deletion(-) > My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' on your patch (DT_CHECKER_FLAGS is new in v5.13): yamllint warnings/errors: dtschema/dtc warnings/errors: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/spi/cdns,qspi-nor.example.dtb: spi@ff705000: clocks: [[4294967295]] is too short from schema $id: http://devicetree.org/schemas/spi/cdns,qspi-nor.yaml# doc reference errors (make refcheckdocs): See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20230619083517.415597-2-william.qiu@starfivetech.com The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch. If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date: pip3 install dtschema --upgrade Please check and re-submit after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema.
On 19/06/2023 10:35, William Qiu wrote: > The QSPI controller needs three clock items to work properly on StarFive > JH7110 SoC, so there is need to change the maxItems's value to 3. Other > platforms do not have this constraint. > > Signed-off-by: William Qiu <william.qiu@starfivetech.com> > Reviewed-by: Hal Feng <hal.feng@starfivetech.com> > Reviewed-by: Conor Dooley <conor.dooley@microchip.com> > --- > .../bindings/spi/cdns,qspi-nor.yaml | 20 ++++++++++++++++++- > 1 file changed, 19 insertions(+), 1 deletion(-) > > diff --git a/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml b/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml > index b310069762dd..1b83cbb9a086 100644 > --- a/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml > +++ b/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml > @@ -26,6 +26,15 @@ allOf: > const: starfive,jh7110-qspi > then: > properties: > + clocks: > + maxItems: 3 > + > + clock-names: > + items: > + - const: ref > + - const: ahb > + - const: apb You are duplicating top-level property. Define the items only in one place. If this list is applicable to everything, then in top-level property. > + > resets: > minItems: 2 > maxItems: 3 > @@ -38,6 +47,9 @@ allOf: > > else: > properties: > + clocks: > + maxItems: 1 clock-names is missing. They must be in sync with clocks. What is the first clock? > + > resets: > maxItems: 2 > > @@ -70,7 +82,13 @@ properties: > maxItems: 1 > > clocks: > - maxItems: 1 > + maxItems: 3 You did not test it before sending. minItems is missing. > + > + clock-names: > + items: > + - const: ref > + - const: ahb > + - const: apb > > cdns,fifo-depth: > description: Best regards, Krzysztof
On 2023/6/19 17:16, Rob Herring wrote: > > On Mon, 19 Jun 2023 16:35:15 +0800, William Qiu wrote: >> The QSPI controller needs three clock items to work properly on StarFive >> JH7110 SoC, so there is need to change the maxItems's value to 3. Other >> platforms do not have this constraint. >> >> Signed-off-by: William Qiu <william.qiu@starfivetech.com> >> Reviewed-by: Hal Feng <hal.feng@starfivetech.com> >> Reviewed-by: Conor Dooley <conor.dooley@microchip.com> >> --- >> .../bindings/spi/cdns,qspi-nor.yaml | 20 ++++++++++++++++++- >> 1 file changed, 19 insertions(+), 1 deletion(-) >> > > My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' > on your patch (DT_CHECKER_FLAGS is new in v5.13): > > yamllint warnings/errors: > > dtschema/dtc warnings/errors: > /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/spi/cdns,qspi-nor.example.dtb: spi@ff705000: clocks: [[4294967295]] is too short > from schema $id: http://devicetree.org/schemas/spi/cdns,qspi-nor.yaml# > > doc reference errors (make refcheckdocs): > > See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20230619083517.415597-2-william.qiu@starfivetech.com > > The base for the series is generally the latest rc1. A different dependency > should be noted in *this* patch. > > If you already ran 'make dt_binding_check' and didn't see the above > error(s), then make sure 'yamllint' is installed and dt-schema is up to > date: > > pip3 install dtschema --upgrade > > Please check and re-submit after running the above command yourself. Note > that DT_SCHEMA_FILES can be set to your schema file to speed up checking > your schema. However, it must be unset to test all examples with your schema. > It seems that my changes are not compatible with other dts files, I'll try to fix it. Thanks for reminding. Best regards William
On 2023/6/19 20:17, Krzysztof Kozlowski wrote: > On 19/06/2023 10:35, William Qiu wrote: >> The QSPI controller needs three clock items to work properly on StarFive >> JH7110 SoC, so there is need to change the maxItems's value to 3. Other >> platforms do not have this constraint. >> >> Signed-off-by: William Qiu <william.qiu@starfivetech.com> >> Reviewed-by: Hal Feng <hal.feng@starfivetech.com> >> Reviewed-by: Conor Dooley <conor.dooley@microchip.com> >> --- >> .../bindings/spi/cdns,qspi-nor.yaml | 20 ++++++++++++++++++- >> 1 file changed, 19 insertions(+), 1 deletion(-) >> >> diff --git a/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml b/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml >> index b310069762dd..1b83cbb9a086 100644 >> --- a/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml >> +++ b/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml >> @@ -26,6 +26,15 @@ allOf: >> const: starfive,jh7110-qspi >> then: >> properties: >> + clocks: >> + maxItems: 3 >> + >> + clock-names: >> + items: >> + - const: ref >> + - const: ahb >> + - const: apb > > You are duplicating top-level property. Define the items only in one > place. If this list is applicable to everything, then in top-level property. > Only in JH7110 SoC need there clocks, other platforms do not have this constraint. So I need to duplicating top-level property. >> + >> resets: >> minItems: 2 >> maxItems: 3 >> @@ -38,6 +47,9 @@ allOf: >> >> else: >> properties: >> + clocks: >> + maxItems: 1 > > clock-names is missing. They must be in sync with clocks. What is the > first clock? > But there are no clock-names before, should I add it? >> + >> resets: >> maxItems: 2 >> >> @@ -70,7 +82,13 @@ properties: >> maxItems: 1 >> >> clocks: >> - maxItems: 1 >> + maxItems: 3 > > > You did not test it before sending. minItems is missing. > I will add it. As for other platforms, should I use enum to constraint the clocks? >> + >> + clock-names: >> + items: >> + - const: ref >> + - const: ahb >> + - const: apb > > >> >> cdns,fifo-depth: >> description: > > Best regards, > Krzysztof > Thanks for taking time to review this patches series. Best regards, William
On 21/06/2023 08:45, William Qiu wrote: > > > On 2023/6/19 20:17, Krzysztof Kozlowski wrote: >> On 19/06/2023 10:35, William Qiu wrote: >>> The QSPI controller needs three clock items to work properly on StarFive >>> JH7110 SoC, so there is need to change the maxItems's value to 3. Other >>> platforms do not have this constraint. >>> >>> Signed-off-by: William Qiu <william.qiu@starfivetech.com> >>> Reviewed-by: Hal Feng <hal.feng@starfivetech.com> >>> Reviewed-by: Conor Dooley <conor.dooley@microchip.com> >>> --- >>> .../bindings/spi/cdns,qspi-nor.yaml | 20 ++++++++++++++++++- >>> 1 file changed, 19 insertions(+), 1 deletion(-) >>> >>> diff --git a/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml b/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml >>> index b310069762dd..1b83cbb9a086 100644 >>> --- a/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml >>> +++ b/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml >>> @@ -26,6 +26,15 @@ allOf: >>> const: starfive,jh7110-qspi >>> then: >>> properties: >>> + clocks: >>> + maxItems: 3 >>> + >>> + clock-names: >>> + items: >>> + - const: ref >>> + - const: ahb >>> + - const: apb >> >> You are duplicating top-level property. Define the items only in one >> place. If this list is applicable to everything, then in top-level property. >> > Only in JH7110 SoC need there clocks, other platforms do not have this constraint. > So I need to duplicating top-level property. You don't need, why? Why writing something twice is an answer to "JH7110 needs 3 clocks"? It's not related. What is the clock for all other variants? >>> + >>> resets: >>> minItems: 2 >>> maxItems: 3 >>> @@ -38,6 +47,9 @@ allOf: >>> >>> else: >>> properties: >>> + clocks: >>> + maxItems: 1 >> >> clock-names is missing. They must be in sync with clocks. What is the >> first clock? >> > But there are no clock-names before, should I add it? Then let's just disallow it. Either you define it or you not allow it. >>> + >>> resets: >>> maxItems: 2 >>> >>> @@ -70,7 +82,13 @@ properties: >>> maxItems: 1 >>> >>> clocks: >>> - maxItems: 1 >>> + maxItems: 3 >> >> >> You did not test it before sending. minItems is missing. >> > I will add it. > As for other platforms, should I use enum to constraint the clocks? What is the clock on other platforms? Best regards, Krzysztof
On 2023/6/21 16:10, Krzysztof Kozlowski wrote: > On 21/06/2023 08:45, William Qiu wrote: >> >> >> On 2023/6/19 20:17, Krzysztof Kozlowski wrote: >>> On 19/06/2023 10:35, William Qiu wrote: >>>> The QSPI controller needs three clock items to work properly on StarFive >>>> JH7110 SoC, so there is need to change the maxItems's value to 3. Other >>>> platforms do not have this constraint. >>>> >>>> Signed-off-by: William Qiu <william.qiu@starfivetech.com> >>>> Reviewed-by: Hal Feng <hal.feng@starfivetech.com> >>>> Reviewed-by: Conor Dooley <conor.dooley@microchip.com> >>>> --- >>>> .../bindings/spi/cdns,qspi-nor.yaml | 20 ++++++++++++++++++- >>>> 1 file changed, 19 insertions(+), 1 deletion(-) >>>> >>>> diff --git a/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml b/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml >>>> index b310069762dd..1b83cbb9a086 100644 >>>> --- a/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml >>>> +++ b/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml >>>> @@ -26,6 +26,15 @@ allOf: >>>> const: starfive,jh7110-qspi >>>> then: >>>> properties: >>>> + clocks: >>>> + maxItems: 3 >>>> + >>>> + clock-names: >>>> + items: >>>> + - const: ref >>>> + - const: ahb >>>> + - const: apb >>> >>> You are duplicating top-level property. Define the items only in one >>> place. If this list is applicable to everything, then in top-level property. >>> >> Only in JH7110 SoC need there clocks, other platforms do not have this constraint. >> So I need to duplicating top-level property. > > You don't need, why? Why writing something twice is an answer to "JH7110 > needs 3 clocks"? It's not related. > > What is the clock for all other variants? > I'll try to not duplicating top-level property. >>>> + >>>> resets: >>>> minItems: 2 >>>> maxItems: 3 >>>> @@ -38,6 +47,9 @@ allOf: >>>> >>>> else: >>>> properties: >>>> + clocks: >>>> + maxItems: 1 >>> >>> clock-names is missing. They must be in sync with clocks. What is the >>> first clock? >>> >> But there are no clock-names before, should I add it? > > Then let's just disallow it. Either you define it or you not allow it. > Fine, I'll keep it disallow. >>>> + >>>> resets: >>>> maxItems: 2 >>>> >>>> @@ -70,7 +82,13 @@ properties: >>>> maxItems: 1 >>>> >>>> clocks: >>>> - maxItems: 1 >>>> + maxItems: 3 >>> >>> >>> You did not test it before sending. minItems is missing. >>> >> I will add it. >> As for other platforms, should I use enum to constraint the clocks? > > What is the clock on other platforms? > Other platforms have only one clock. > Best regards, > Krzysztof > Thanks for taking time to review this patch series and give usefull suggestions. Best Regards, William
diff --git a/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml b/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml index b310069762dd..1b83cbb9a086 100644 --- a/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml +++ b/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml @@ -26,6 +26,15 @@ allOf: const: starfive,jh7110-qspi then: properties: + clocks: + maxItems: 3 + + clock-names: + items: + - const: ref + - const: ahb + - const: apb + resets: minItems: 2 maxItems: 3 @@ -38,6 +47,9 @@ allOf: else: properties: + clocks: + maxItems: 1 + resets: maxItems: 2 @@ -70,7 +82,13 @@ properties: maxItems: 1 clocks: - maxItems: 1 + maxItems: 3 + + clock-names: + items: + - const: ref + - const: ahb + - const: apb cdns,fifo-depth: description: