Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp2010693iog; Sun, 19 Jun 2022 05:07:34 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uZUEbQvOZR2DDkWubZXXAbvQ/KMtmuD0VtUx4AqcYISpyvuNpprQEMreu0U3UalBlpFlZO X-Received: by 2002:a17:90a:9408:b0:1ec:9453:2ebc with SMTP id r8-20020a17090a940800b001ec94532ebcmr4826253pjo.150.1655640453906; Sun, 19 Jun 2022 05:07:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655640453; cv=none; d=google.com; s=arc-20160816; b=AAVG1xrixAaYoiOKg47CABmo+BHBRbBmLnfY8kxt7AjCbLFFMFWAJ3FeQj1+pUxLu7 RaTBwOgvRF7MvWmRnJhFkhKGZCpSIHigntVhDMkNFNOAtYDCNVs0peMWNwEC+z9NyErS ZemaNHsLbzCNTi4DWsXdKfSbYmBdw3TvdPVQ2ILf6N9gwmhXmrTLQmS+JQajDlxyHWWk 45O36F4Jfgvy43Q23CHcdtOy0NroqjRD/0fWCWHwMw1j5MrHOcqy1eeVlOL+xXvNZx2F TKzNjjedAQfO+Cec7v+g04oyXrxN6SIeTdT9rjTlcMqHuAiJd82vZgC3kzmCV4I51Cew ZZeA== 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=jakXNefXr+d4XHXk3yMQZ4OQ2nmGeDzmNhlPkvj1/X4=; b=ewmlVAY4dzmZrc1R8zup2i0YsXctRQWuNb4KQs+CBU6lEXo6VkPLvMH446sNg5hdCG 3ZiypgAlnvNEthMBqRMLc08UqFrzE38W0uZmjfXdpOCARpBconM+8Wae9sdf3UqPQSQz Jb6IMg1RJndzr14qD3/PdQBufwaBuTy+n8e8PF91h2QRMFrX707ivUKg/DUvUpK7LR7t RcAJR750Fs5CaWr5R2rgEf7AnJSj0MCxAfz8i5u9WjwAxfawwL4Hk1W5tVjAYjcOkjY6 yVMXqZ6LJsrrYt44RL2wRVJ5KNY0s/pNEmgF67Ekd8IM1B2GeQ+otCD3TVmzWa6s3Z6B 6L5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=D58WLVKU; 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 w62-20020a638241000000b0040c9c626e78si3002709pgd.813.2022.06.19.05.07.22; Sun, 19 Jun 2022 05:07:33 -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=D58WLVKU; 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 S236999AbiFSMFj (ORCPT + 99 others); Sun, 19 Jun 2022 08:05:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46002 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236997AbiFSMFf (ORCPT ); Sun, 19 Jun 2022 08:05:35 -0400 Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4548712612 for ; Sun, 19 Jun 2022 05:05:34 -0700 (PDT) Received: by mail-ed1-x532.google.com with SMTP id o10so11619514edi.1 for ; Sun, 19 Jun 2022 05:05:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=jakXNefXr+d4XHXk3yMQZ4OQ2nmGeDzmNhlPkvj1/X4=; b=D58WLVKUXyi+dx4Z2fQfDcotvsZXCiAWSQWbsXluKMHKlXC6jSVQM+0nw+Sdn9K6XF rTjtQGmVXuQyIQHrFGrwUojJHyTCDl5nxMHbA8cGs2aZVFWVFeJnwJXC5Ffr8pbiH+Jr JResf2C3FcIn/SNNowXrLlVKeprt7jHqsyiJsOIbawrR7MzGbgFqkCbfrFvdAR57vC6R R9rotoR4f0NPXh5/1HZoWVgPYWqB+lin1Nv+sHnQWY6Ex5AibOj2dpTzaepVk2XXAjeX R+AAhW+DbWMclZiMvAsPoUNTLW+MFB78voLjhmewSuXZpfdxoiMuMfOhCKmptP35fzqR 740Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=jakXNefXr+d4XHXk3yMQZ4OQ2nmGeDzmNhlPkvj1/X4=; b=Tz203ePAznwTL25IiAhH0G6d1l4yjfcl0fT0UzC62wB8rRUSMxgcbQwJqb+JM2Q0e5 qUXSWbEOhFRxwRYKFCfhYH4WiU6nnMuHiJRZmy3fJfTWyu2reiwRAPefDY43zVocd7F0 qOpWBp7CdigGsmC3zY6ppWPI/bYAChL9NxcwFy7BmISTd86jxkEf/TNfxAi0JDtkj6AZ A4lofLBBdGtcbKGXE46lZgtT6ezdVGCC30QLFAI1/wffMbdb6GwW8MDp+DJ+LShOKKhb WKsVhMiRtsrjLFh4YT1DbOIVcOwO3hPdRXbeuKozLo6mmp9JVeRRAIUiuV9+x4vr4PK0 vVDw== X-Gm-Message-State: AJIora/stsBQAROySfclzbuWwtgxoImhr00l/QUJX9T1L7QN2WtoOWgF gSU2Jfs6yskCGwRgxsdnqYerfg== X-Received: by 2002:a05:6402:350e:b0:42f:b2c1:9393 with SMTP id b14-20020a056402350e00b0042fb2c19393mr23592753edd.11.1655640332791; Sun, 19 Jun 2022 05:05:32 -0700 (PDT) Received: from [192.168.0.206] (xdsl-188-155-176-92.adslplus.ch. [188.155.176.92]) by smtp.gmail.com with ESMTPSA id o16-20020a50fd90000000b0042617ba63basm7708329edt.68.2022.06.19.05.05.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 19 Jun 2022 05:05:32 -0700 (PDT) Message-ID: Date: Sun, 19 Jun 2022 14:05:30 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH 2/3] dt-bindings: usb: mtk-xhci: Allow middle optional clocks to be missing Content-Language: en-US To: Chunfeng Yun , =?UTF-8?B?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= , Greg Kroah-Hartman , Matthias Brugger Cc: AngeloGioacchino Del Regno , kernel@collabora.com, Krzysztof Kozlowski , Rob Herring , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-usb@vger.kernel.org References: <20220617222916.2435618-1-nfraprado@collabora.com> <20220617222916.2435618-3-nfraprado@collabora.com> <8639e64d-c659-7090-2d0a-078fd96cfbd4@linaro.org> From: Krzysztof Kozlowski In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 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 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 19/06/2022 09:46, Chunfeng Yun wrote: > On Fri, 2022-06-17 at 18:25 -0700, Krzysztof Kozlowski wrote: >> On 17/06/2022 15:29, NĂ­colas F. R. A. Prado wrote: >>> The current clock list in the binding doesn't allow for one of the >>> optional clocks to be missing and a subsequent clock to be present. >>> An >>> example where this is an issue is in mt8192.dtsi, which has >>> "sys_ck", >>> "ref_ck", "xhci_ck" and would cause dtbs_check warnings. >>> >>> Change the clock list in a way that allows the middle optional >>> clocks to >>> be missing, while still guaranteeing a fixed order. The "ref_ck" is >>> kept >>> as a const even though it is optional for simplicity, since it is >>> present in all current dts files. >>> >>> Signed-off-by: NĂ­colas F. R. A. Prado >>> --- >>> >>> .../devicetree/bindings/usb/mediatek,mtk-xhci.yaml | 9 >>> +++++++-- >>> 1 file changed, 7 insertions(+), 2 deletions(-) >>> >>> diff --git a/Documentation/devicetree/bindings/usb/mediatek,mtk- >>> xhci.yaml b/Documentation/devicetree/bindings/usb/mediatek,mtk- >>> xhci.yaml >>> index 63cbc2b62d18..99a1b233ec90 100644 >>> --- a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml >>> +++ b/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml >>> @@ -80,8 +80,13 @@ properties: >>> items: >>> - const: sys_ck # required, the following ones are optional >>> - const: ref_ck >>> - - const: mcu_ck >>> - - const: dma_ck >>> + - enum: >>> + - mcu_ck >>> + - dma_ck >>> + - xhci_ck >>> + - enum: >>> + - dma_ck >>> + - xhci_ck >>> - const: xhci_ck >> >> You allow now almost any order here, including incorrect like >> sys,ref,xhci,xhci,xhci. >> >> The order of clocks has to be fixed and we cannot allow flexibility. >> Are >> you sure that these clocks are actually optional (not wired to the >> device)? > In fact, these optional clocks are fixed, due to no gates are provided, > SW can't control them by CCF; > In this case, I usually use a fixed clock, or ignore it. But in some versions these clocks are controllable or not? Best regards, Krzysztof