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 D8290C433FE for ; Mon, 14 Nov 2022 16:52:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236205AbiKNQwM (ORCPT ); Mon, 14 Nov 2022 11:52:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60252 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236542AbiKNQvf (ORCPT ); Mon, 14 Nov 2022 11:51:35 -0500 Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 940A62DCB for ; Mon, 14 Nov 2022 08:51:33 -0800 (PST) Received: by mail-lf1-x12e.google.com with SMTP id l12so20245009lfp.6 for ; Mon, 14 Nov 2022 08:51:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=6dLf4Wewae+9+C646HGqgQuWVwvqyOlsvboz2D5cvWY=; b=qW1e16qnKkNRaGKPE94EmHEd++Gx12+z6dNP+m7n3grXvXpbSUFF33ZUECS/AF3p0O zKxrr6T5eDUUqqdC6tp7cJLGHZYmpoeExDo/9uhRXklrMDCYyq2DD0CvsAbBDUkgXaSa jy6/DzDpdospmLDHeiCg9NUdWvgToOw7mDUyb+m9tdv1OK7uM63PEyVhnZ7Yk97BMVy2 8nm/At14I4cp0d4+4vWX0HwedhN9poV+s7T7QZ1xOjcA8E7wEpgqOzgjdFDye7OzSO6P o3/TH2mwcZi0gxj/uftrEyAEIDFTLGTgAV5kuCcu3X7ewpyG/QYGF0KhdMDnnti0UamN 7A0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=6dLf4Wewae+9+C646HGqgQuWVwvqyOlsvboz2D5cvWY=; b=aYLfa8/xoqDwm2ifZPF6WyRGskMmSQ7WYTsKYot+bSQA3yrtaPZz3+bc7cXKCi0M8a wFbFc2f3GnmHQ419J26e41c2nD+Pj58lDYo0BlYMlUZntDK1pH7AliAfbOYq9w6kngsL uxX+IGE9WFwoao5JTOgKUws6hp3K6g8Pa2R/JnzKjnMQ4Kf4iSdGvEr4I1Y8fxenEO6S 1enuQ1+LXquxJMZH/jjZY8oduLg9yyQxqpi7GTxJ+qZLHtrzfX+BqyYEPi207LOQHNg3 pT2+LKmyvDP5+tGbWI+helnm+3+r+WTwReCf3a2UHrcA+nfowiNNN925JEQ+sjNg49zf zKlA== X-Gm-Message-State: ANoB5pntrCjctHrIuWPAp4TGClrPTe/CAbiK7L3ADjpCzWYhgP5hEBeT pDj898l3ucEiZKBZKuASjddGbg== X-Google-Smtp-Source: AA0mqf4iplJlnBuDmLstDKHRy1Bhyq+KwJHcQisutdSSLy9f0NnEJsl0w9ATYuvkmt/Vh6kUejVp4w== X-Received: by 2002:ac2:4f13:0:b0:4a2:25b1:10ff with SMTP id k19-20020ac24f13000000b004a225b110ffmr5037510lfr.274.1668444691947; Mon, 14 Nov 2022 08:51:31 -0800 (PST) Received: from [192.168.1.211] ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id a17-20020a056512201100b0049d83646ce7sm1875806lfb.110.2022.11.14.08.51.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 14 Nov 2022 08:51:31 -0800 (PST) Message-ID: <5920660e-34e4-8a6b-7d99-ba0511e2c86a@linaro.org> Date: Mon, 14 Nov 2022 19:51:31 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.1 Subject: Re: [PATCH 02/14] dt-bindings: phy: qcom,qmp-usb3-dp: fix sc8280xp bindings Content-Language: en-GB To: Johan Hovold Cc: Krzysztof Kozlowski , Johan Hovold , Vinod Koul , Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <20221111092457.10546-1-johan+linaro@kernel.org> <20221111092457.10546-3-johan+linaro@kernel.org> <78cda6f8-849c-219a-8dbb-966c283c1a92@linaro.org> From: Dmitry Baryshkov In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On 14/11/2022 19:42, Johan Hovold wrote: > On Mon, Nov 14, 2022 at 07:14:48PM +0300, Dmitry Baryshkov wrote: >> On 14/11/2022 18:38, Johan Hovold wrote: >>> On Mon, Nov 14, 2022 at 06:19:25PM +0300, Dmitry Baryshkov wrote: >>>> On 14/11/2022 17:18, Johan Hovold wrote: >>>>> On Mon, Nov 14, 2022 at 03:07:41PM +0100, Krzysztof Kozlowski wrote: >>>>>> On 14/11/2022 14:27, Johan Hovold wrote: >>>>>>> On Fri, Nov 11, 2022 at 04:17:29PM +0100, Krzysztof Kozlowski wrote: >>>>>>>> On 11/11/2022 10:24, Johan Hovold wrote: >>> >>>>>>> I noticed that several bindings leave the clock indexes unspecified, or >>>>>>> have header files defining some or all of them. I first added a QMP >>>>>>> header but that seemed like overkill, especially if we'd end up with >>>>>>> one header per SoC (cf. the GCC headers) due to (known and potential) >>>>>>> platform differences. >>> >>>>>>> Shall I add back a shared header for all PHYs handled by this driver >>>>>>> (another implementation detail) even if this could eventually lead to >>>>>>> describing clocks not supported by a particular SoC (so such constraints >>>>>>> would still need to be described by the binding somehow): >>>>>>> >>>>>>> /* QMP clocks */ >>>>>>> #define QMP_USB3_PIPE_CLK 0 >>>>>>> #define QMP_DP_LINK_CLK 1 >>>>>>> #define QMP_DP_VCO_DIV_CLK 2 >>>> >>>> Maybe QMP_COMBO_USB3_PIPE_CLK, QMP_COMBO_DP_LINK_CLK, >>>> QMP_COMBO_DP_VCO_DIV_CLK? >>> >>> "COMBO" is just the name of the Linux driver and does not belong in the >>> binding. >> >> We do not have any standard (iow, coming from the docs) name, so we can >> invent it on our own. > > I still think the naming should reflect the hardware and not the Linux > implementation if this is going into the binding. Well, I always viewed docs as > > And the USB4_USB3_DP defines are going to be a superset of USB3_DP (as > far we know know). > >>>> I'll then extend this header with QMP_UFS_RX_SYMBOL_0_CLK >>>> QMP_UFS_RX_SYMBOL_1_CLK and QMP_UFS_TX_SYMBOL_0_CLK. >>> >>> Yeah, I had those in mind when creating the header and using a generic >>> QMP prefix (even if I didn't end up using the header in v1). >>> >>> This could just be mapping of (arbitrary) QMP indexes to clocks and we >>> use it for USB3, DP, UFS and later also USB4. >>> >>> This will however mean that the indexes are not necessarily zero-based >>> and consecutive for a specific SoC and PHY. But that's perhaps a >>> non-issue (cf. the PHY_TYPE defines). >> >> Ugh. Please, no. We have symbol clocks for UFS PHY, USB+DP clocks for >> USB+DP PHY, but let's not go for the unified clocks index definition. > > Yeah, this is the kind of issues I wanted to avoid by not using a per > SoC header for three clocks which will almost always use the same > indexes. > > Because how can you be sure that your unified per-PHY type defines will > never have to be amended? Or some index left out? > > The only way then is to have per-SoC defines which is a pain to > maintain (just consider that driver mapping table when some odd SoC > shows up). My vote is definitely against a per-SoC defines. > > Johan -- With best wishes Dmitry