Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp9006546rwd; Wed, 21 Jun 2023 01:32:40 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7bL71XhbGzIfj6fGElqbMdrE78IGavfQ4jd9kMpGDgh0+J+S4wP5e+YuIJX2OGkTkWRUrc X-Received: by 2002:a9d:4f03:0:b0:6b5:948f:fdeb with SMTP id d3-20020a9d4f03000000b006b5948ffdebmr4200783otl.34.1687336360578; Wed, 21 Jun 2023 01:32:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687336360; cv=none; d=google.com; s=arc-20160816; b=BynOnhaDrZ1vP1iWZ4PLgL3EDG5T6wYcFHAAnOZgEfjM1r5iGy5GsNOlYtt0ztAY8d nZCWkXtTetun3PPgIZaMPiWe8Wot/boSgKTA6k6SnoIi50+brGZrTHEJYyQaNCPzDUBo e/zJsbCjpEEjAUmhVfb0CuSSFczlf9ATmjBT8aOoINWOV4eUMZ71kTsuX3M23uo+yFFz s+a31JZsSZWz+1cTnvhI1KdoLF0kIbCmwp3HKAh53X439Wsds6hjwjSGNnSr74kVtZsj aSraIrfhjOO3mkRKSEM7lpctjpUSZbW62+9VBUDBqSgBMprAM9H1AfTBEs9gFGAi1IaD 1Siw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=bALinTqbF/qOXgwdMyTFwrJC13kjvO/KOdsOe67RJS8=; b=mAReZrcVlBMGHg3lX7/RV/gobWpylsvwFed8gOh+P8sIO2HmTquitpp8KjVwyvL00T 8MwnUpUb773GSmBqFbFuG7rkyNMlvxjQzdYvwbk4kgmjWvmGfnPjwWalJ998yQqtjNgf kF9dZ+LcOIsZhk8NHYTm6AkYcs6AjTS5w2Tkafwazo2s20rvy2N6gP3ku6YtbfQ6ZqxG NOACVuXQKKDc20Jb6VTgR+XNRpVXKE2DrPb4D6gsIvorIvuUQKEX81+Al9faLAcbcy0P GbJlFXaFkTfI5brtRwP0OtR1coCDwzgJNPf6V9mcIAS+3xENag3atWGhsi/OnY2SwijO qNFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HvemXir9; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v1-20020a63b941000000b0054fe6828cf4si3431723pgo.725.2023.06.21.01.32.26; Wed, 21 Jun 2023 01:32:40 -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; dkim=pass header.i=@linaro.org header.s=google header.b=HvemXir9; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230148AbjFUIK5 (ORCPT + 99 others); Wed, 21 Jun 2023 04:10:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49684 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230149AbjFUIKz (ORCPT ); Wed, 21 Jun 2023 04:10:55 -0400 Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5E05610F1 for ; Wed, 21 Jun 2023 01:10:53 -0700 (PDT) Received: by mail-ej1-x62f.google.com with SMTP id a640c23a62f3a-988883b0d8fso529584266b.1 for ; Wed, 21 Jun 2023 01:10:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687335052; x=1689927052; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=bALinTqbF/qOXgwdMyTFwrJC13kjvO/KOdsOe67RJS8=; b=HvemXir9m0Vmr9h4OBYoksSM7VKxai/edGasJTbOJ7/sO+PBuAydA2ohrP9V7/ypLF D6AvAbW9XbDUk0QdCUWjo2dDR/MN9r4K5ZpVdCH7DEoM2Zl3JW6sP6PLUb/Ms+FEnlXm rE2ayCc01rk9rdYDVHofbosWCgr9nhiwIWy7vF+6C/78ZNe/OdlmdXFXf0oHXmO4DKcr pkFSsEGrJj1NuNWML9lkNGQ2rWAtb42GVbmFatGwz4SGstSJadpFHv96DHuHof1rnhal tDPxfWIOWxLTisQ4NBapL8vqP0G31R+jYV/koiz6bsVCXJZQumjnShW7cImMOhBfqM9r bVsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687335052; x=1689927052; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=bALinTqbF/qOXgwdMyTFwrJC13kjvO/KOdsOe67RJS8=; b=RqhOXpadJKYe6ifVHIIY7kEsDrZPFyihVnM2X21hT6GbxD8a5b1nzceB+JN892VyfS /OvwjOegmlc3zztAcCkKgxWEyaEnot21j8T86m2zRTbI4A5e9sdQqu/mq247Seun6V82 QFUh2vUebtkPDb49uAMmy/HrOa9xqa3sohubQ4qb+alJHQIGb1wzXOX3NcdvLEkKywFB IgsD/mBLRwLtKjaFxtVkBB8LzH8RAi8OC3sUkAifbjNUIfK3VuQwh3bbsSrvaZC+h4sM c+g1lXVX9lwqTrsjkbKVytuY+a1Mj2KGdEf4LwGUm3ZGqBtm+LHClxnZqeNjtb7RY3H5 ugTQ== X-Gm-Message-State: AC+VfDwlM1LQ4FSJxJ3SHhNe0ohiLxG6uaER2NkZPyVc29EV9iXyKVTc KVSPefM9w2liBzwJt3PSs/MSoQ== X-Received: by 2002:a17:907:a41e:b0:989:2368:20d9 with SMTP id sg30-20020a170907a41e00b00989236820d9mr4221444ejc.75.1687335051832; Wed, 21 Jun 2023 01:10:51 -0700 (PDT) Received: from [192.168.1.20] ([178.197.219.26]) by smtp.gmail.com with ESMTPSA id ox4-20020a170907100400b00987316d1585sm2738614ejb.145.2023.06.21.01.10.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 21 Jun 2023 01:10:51 -0700 (PDT) Message-ID: Date: Wed, 21 Jun 2023 10:10:49 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; 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: William Qiu , devicetree@vger.kernel.org, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org 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: Krzysztof Kozlowski In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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: X-Mailing-List: linux-kernel@vger.kernel.org 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 >>> 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. 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