Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp599813pxm; Wed, 2 Mar 2022 05:06:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJyL3PfcMSKLeRWjhJT7zUhkeRFXny/Fa4a1Z2gM1gdr4zm3QLazJ5h9xVGIBBQ8Ajxu3W5+ X-Received: by 2002:a17:90b:702:b0:1bc:6d8a:70e0 with SMTP id s2-20020a17090b070200b001bc6d8a70e0mr26775354pjz.137.1646226391465; Wed, 02 Mar 2022 05:06:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646226391; cv=none; d=google.com; s=arc-20160816; b=gotG+GxjJyDEQGkM5crCTWpMbPZhB+rI0dNbdJwmNUMrpTppfMeex9hmaxJC4+pZHZ c3dYt1mFefjy9lvZPyh7uZKZGLhsPtMbW/UDOg7dSYmhphsedcgmCLW6XHsdVDhGNLAU mLhN+avICzMB/hRHxsP7RlzqJRkp5jcW9fn2GWF+v9y+pU2qGJq4CtU23XrZCxV8afiN L0KcqxAnWWxan7M+F4i7t+1uNU0kiOzUM3JpOJkrlB4EoFNp+A9XzQRlRXT0+vYwYQs1 H85XNPVGEyoNot7Oi2JF6jJdqFWyLz/hvRqJzH8lSzEdIgThsVIxShOKz3dKCnFDIQc2 d0Ug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:mail-followup-to:message-id:subject:cc:to:from:date; bh=GSRdvv3AasCRZ0HapqdyntnD5XG5XA4MLbrTptOTv20=; b=wEEQQok4dE533p4jPHEChEPwSF5ghjbm5JUWlFBdTATIiBxgLbbqcPTLPy9TarxxYW 94GjM5bnPiHu6EUmInDvSm58CsKzD+hzLW3cjNa2qCFQkEIecI70mSk4uj7Yi/fQTpe0 aUmefwD8x+9XFm8F4T5uv6BpMU3Ax95pZvitlFKwykn0hSl2JZCffCDLJI6LFR275KHm h15s3SrD3+Tv6HzDK1SGKNiUv/ZwBOoUEC6r/8x5W9WeSEh48nAqyjF7/r6uJM0cHC1y V0Wzuh2IMC40j5eVvj94zHRi65MuVp52WFId5tS5Rv7G2CQYjL6sYXpsj49TAAU85+9q OQkQ== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q16-20020a17090311d000b001517777221bsi7292855plh.256.2022.03.02.05.06.12; Wed, 02 Mar 2022 05:06:31 -0800 (PST) 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 S241982AbiCBMzI (ORCPT + 99 others); Wed, 2 Mar 2022 07:55:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47354 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241972AbiCBMzG (ORCPT ); Wed, 2 Mar 2022 07:55:06 -0500 Received: from relay06.th.seeweb.it (relay06.th.seeweb.it [IPv6:2001:4b7a:2000:18::167]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25BE2A66D2; Wed, 2 Mar 2022 04:54:21 -0800 (PST) Received: from SoMainline.org (94-209-165-62.cable.dynamic.v4.ziggo.nl [94.209.165.62]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by m-r2.th.seeweb.it (Postfix) with ESMTPSA id 773963F817; Wed, 2 Mar 2022 13:54:18 +0100 (CET) Date: Wed, 2 Mar 2022 13:54:17 +0100 From: Marijn Suijten To: Krzysztof Kozlowski Cc: Dmitry Baryshkov , phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno , Konrad Dybcio , Martin Botka , Jami Kettunen , Pavel Dubrova , Andy Gross , Bjorn Andersson , Michael Turquette , Stephen Boyd , Rob Herring , linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 2/3] dt-bindings: clock: add QCOM SM6125 display clock bindings Message-ID: <20220302125417.iu52rvdxrmo25wwt@SoMainline.org> Mail-Followup-To: Marijn Suijten , Krzysztof Kozlowski , Dmitry Baryshkov , phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno , Konrad Dybcio , Martin Botka , Jami Kettunen , Pavel Dubrova , Andy Gross , Bjorn Andersson , Michael Turquette , Stephen Boyd , Rob Herring , linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <20220226200911.230030-1-marijn.suijten@somainline.org> <20220226200911.230030-3-marijn.suijten@somainline.org> <62ebb074-b8de-0dc3-2bbc-e43dca9d2ced@linaro.org> <05310308-b0ff-56a0-83ac-855b1b795936@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <05310308-b0ff-56a0-83ac-855b1b795936@canonical.com> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,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 2022-02-28 10:23:19, Krzysztof Kozlowski wrote: > On 27/02/2022 22:43, Dmitry Baryshkov wrote: > > On 27/02/2022 13:03, Krzysztof Kozlowski wrote: > >> On 26/02/2022 21:09, Marijn Suijten wrote: > >>> From: Martin Botka > >>> > >>> Add device tree bindings for display clock controller for > >>> Qualcomm Technology Inc's SM6125 SoC. > >>> > >>> Signed-off-by: Martin Botka > >>> --- > >>> .../bindings/clock/qcom,dispcc-sm6125.yaml | 87 +++++++++++++++++++ > >>> .../dt-bindings/clock/qcom,dispcc-sm6125.h | 41 +++++++++ > >>> 2 files changed, 128 insertions(+) > >>> create mode 100644 Documentation/devicetree/bindings/clock/qcom,dispcc-sm6125.yaml > >>> create mode 100644 include/dt-bindings/clock/qcom,dispcc-sm6125.h > >>> > >>> diff --git a/Documentation/devicetree/bindings/clock/qcom,dispcc-sm6125.yaml b/Documentation/devicetree/bindings/clock/qcom,dispcc-sm6125.yaml > >>> new file mode 100644 > >>> index 000000000000..3465042d0d9f > >>> --- /dev/null > >>> +++ b/Documentation/devicetree/bindings/clock/qcom,dispcc-sm6125.yaml > >>> @@ -0,0 +1,87 @@ > >>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > >>> +%YAML 1.2 > >>> +--- > >>> +$id: http://devicetree.org/schemas/clock/qcom,dispcc-sm6125.yaml# > >>> +$schema: http://devicetree.org/meta-schemas/core.yaml# > >>> + > >>> +title: Qualcomm Display Clock Controller Binding for SM6125 > >>> + > >>> +maintainers: > >>> + - Martin Botka > >>> + > >>> +description: | > >>> + Qualcomm display clock control module which supports the clocks and > >>> + power domains on SM6125. > >>> + > >>> + See also: > >>> + dt-bindings/clock/qcom,dispcc-sm6125.h > >>> + > >>> +properties: > >>> + compatible: > >>> + enum: > >>> + - qcom,sm6125-dispcc > >>> + > >>> + clocks: > >>> + items: > >>> + - description: Board XO source > >>> + - description: Byte clock from DSI PHY0 > >>> + - description: Pixel clock from DSI PHY0 > >>> + - description: Pixel clock from DSI PHY1 > >>> + - description: Link clock from DP PHY > >>> + - description: VCO DIV clock from DP PHY > >>> + - description: AHB config clock from GCC > >>> + > >>> + clock-names: > >>> + items: > >>> + - const: bi_tcxo > >>> + - const: dsi0_phy_pll_out_byteclk > >>> + - const: dsi0_phy_pll_out_dsiclk > >>> + - const: dsi1_phy_pll_out_dsiclk > >>> + - const: dp_phy_pll_link_clk > >>> + - const: dp_phy_pll_vco_div_clk > >>> + - const: cfg_ahb_clk > >>> + > >>> + '#clock-cells': > >>> + const: 1 > >>> + > >>> + '#power-domain-cells': > >>> + const: 1 > >>> + > >>> + reg: > >>> + maxItems: 1 > >>> + > >>> +required: > >>> + - compatible > >>> + - reg > >>> + - clocks > >>> + - clock-names > >>> + - '#clock-cells' > >>> + - '#power-domain-cells' > >>> + > >>> +additionalProperties: false > >>> + > >>> +examples: > >>> + - | > >>> + #include > >>> + #include > >>> + clock-controller@5f00000 { > >>> + compatible = "qcom,sm6125-dispcc"; > >>> + reg = <0x5f00000 0x20000>; > >>> + clocks = <&rpmcc RPM_SMD_XO_CLK_SRC>, > >>> + <&dsi0_phy 0>, > >>> + <&dsi0_phy 1>, > >>> + <0>, > >> > >> This does not look like a valid phandle. This clock is required, isn't it? I remember it being used like this before, though upon closer inspection only qcom,gcc-msm8998.yaml uses it as example. The clock should be optional, in that case it is perhaps desired to omit it from clock-names instead, or pretend there's a `dsi1_phy 1`? > > > > Not, it's not required for general dispcc support. > > dispcc uses DSI and DP PHY clocks to provide respective pixel/byte/etc > > clocks. However if support for DP is not enabled, the dispcc can work > > w/o DP phy clock. Thus we typically add 0 phandles as placeholders for Is there any semantic difference between omitting the clock from DT (in clocks= /and/ clock-names=) or setting it to a 0 phandle? > > DSI/DP clock sources and populate them as support for respective > > interfaces gets implemented. > > > > Then the clock is optional, isn't it? While not modeling it as optional? It looks like this should be modelled using minItems: then, and "optional" text/comment? Other clocks are optional as well, we don't have DSI 1 in downstream SM6125 DT sources and haven't added the DP PLL in our to-be-upstreamed mainline tree yet. - Marijn