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 B03C1EB64D8 for ; Wed, 21 Jun 2023 06:47:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230325AbjFUGr1 (ORCPT ); Wed, 21 Jun 2023 02:47:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40136 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229716AbjFUGqr (ORCPT ); Wed, 21 Jun 2023 02:46:47 -0400 Received: from ex01.ufhost.com (ex01.ufhost.com [61.152.239.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 901D41FF2; Tue, 20 Jun 2023 23:45:15 -0700 (PDT) Received: from EXMBX165.cuchost.com (unknown [175.102.18.54]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "EXMBX165", Issuer "EXMBX165" (not verified)) by ex01.ufhost.com (Postfix) with ESMTP id E998E24E1AC; Wed, 21 Jun 2023 14:45:13 +0800 (CST) Received: from EXMBX068.cuchost.com (172.16.6.68) by EXMBX165.cuchost.com (172.16.6.75) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Wed, 21 Jun 2023 14:45:13 +0800 Received: from [192.168.120.57] (171.223.208.138) by EXMBX068.cuchost.com (172.16.6.68) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Wed, 21 Jun 2023 14:45:12 +0800 Message-ID: Date: Wed, 21 Jun 2023 14:45:11 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH v3 1/3] dt-bindings: qspi: cdns,qspi-nor: Add clocks for StarFive JH7110 SoC Content-Language: en-US To: Krzysztof Kozlowski , , , , CC: Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Emil Renner Berthing , Ziv Xu References: <20230619083517.415597-1-william.qiu@starfivetech.com> <20230619083517.415597-2-william.qiu@starfivetech.com> <4937f9c4-a0e0-fd37-d71b-e7488b2a1062@linaro.org> From: William Qiu In-Reply-To: <4937f9c4-a0e0-fd37-d71b-e7488b2a1062@linaro.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [171.223.208.138] X-ClientProxiedBy: EXCAS063.cuchost.com (172.16.6.23) To EXMBX068.cuchost.com (172.16.6.68) X-YovoleRuleAgent: yovoleflag Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 >> Reviewed-by: Hal Feng >> Reviewed-by: Conor Dooley >> --- >> .../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