Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2785826pxp; Mon, 14 Mar 2022 05:05:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwhK31EWvegIlchtjgPodiO6Qef68+t2CVggDWj9HVpUgB89tWFO1KCr8HF0kFt6R6yeRue X-Received: by 2002:aa7:c244:0:b0:416:46b:6237 with SMTP id y4-20020aa7c244000000b00416046b6237mr19740392edo.139.1647259511738; Mon, 14 Mar 2022 05:05:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647259511; cv=none; d=google.com; s=arc-20160816; b=gsKnztCgnwd3NWYHeigt0Gl69isENjxVP3yo7ywWbzB9Q9RpjPKB63SpDQoYZmRTHG RBJP5yjL2txbr6OnJFf16aGzOQDpaVrPbTYbLtZu17fC74dX0zH3AkObgFM4L2qHDAKm ow5/W+zGiPiFLCtwVwBkYttIeH2pHq7He4yQvIvJEpHiShf3PEQcKxnpdmAy2duBbQsS wslsKg9y16AHmaVcGejtx5RSl6UgLBmtQcDy+VvGgDsanp3Lh2BH2UNAiyBm6nYXEOl7 POn6Kro4MW0E9Uhj3QBTLmjG1klKo4AAGh0KtcSVr+3oax+wrZ/sfaPCcnOyjy285HJ/ tUkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=cTigVYPVCkuHRdanPQILHhd3eQaHPFWGn2HDxmows44=; b=ScEzcEo09pxFeSbrva+TSwXJJr9SHfJQphE7j3q9MkHYd0uqFC2YP3qmmDDX/+0IFz hJM1zm4V94Wba4sS014b5r/oMxyaTXwM3OrDU+cIidbhMMLdRoYdDpdw9L+MPR1uIG0+ NKsDY2oh5yY/s8LO5GZvu0F0CM+ZTo3g2g01PRz7dYx9NLk/WLldg3KbKt9AAhlJ056L IgnDeclFsLjotMRYVbrC3kGndO2u6cJi2xJ2EI8s3E5lml3XPO2q0AqkAOp8uIEwNolF sRVm0XGbyiS28zoztXfafnXCrh3vAmc4mYyZ3PWFNBMV9QHscpEins+4WtI0pNqKsMdC 1Wcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=KODfWs9Q; 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=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r9-20020a170906280900b006d01388f459si8388763ejc.1.2022.03.14.05.04.22; Mon, 14 Mar 2022 05:05:11 -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=@quicinc.com header.s=qcdkim header.b=KODfWs9Q; 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=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236068AbiCNDbQ (ORCPT + 99 others); Sun, 13 Mar 2022 23:31:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45574 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231607AbiCNDbO (ORCPT ); Sun, 13 Mar 2022 23:31:14 -0400 Received: from alexa-out-sd-02.qualcomm.com (alexa-out-sd-02.qualcomm.com [199.106.114.39]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD601245BE; Sun, 13 Mar 2022 20:30:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1647228604; x=1678764604; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=cTigVYPVCkuHRdanPQILHhd3eQaHPFWGn2HDxmows44=; b=KODfWs9QFlw8I5ttSp85pdWFiJ/J9vIhAiZ/xBQeLvdqMTrk8VyjyxNL CHI6TkZMpZ10mMq+iq2Z/6QQKSmEMpsTlgmIcWpzIAKu2yKlbpuYMNdAB paVjJ93Q+SGLXfxYb/dHmoHDlw9yJRJUvN0shh5+9RKCiyIbqr4rLZTWv g=; Received: from unknown (HELO ironmsg02-sd.qualcomm.com) ([10.53.140.142]) by alexa-out-sd-02.qualcomm.com with ESMTP; 13 Mar 2022 20:30:03 -0700 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg02-sd.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Mar 2022 20:30:03 -0700 Received: from nalasex01a.na.qualcomm.com (10.47.209.196) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.15; Sun, 13 Mar 2022 20:30:02 -0700 Received: from hu-pkondeti-hyd.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.15; Sun, 13 Mar 2022 20:29:56 -0700 Date: Mon, 14 Mar 2022 08:59:52 +0530 From: Pavan Kondeti To: Krzysztof Kozlowski CC: Sandeep Maheswaram , Rob Herring , Andy Gross , Bjorn Andersson , Kishon Vijay Abraham I , "Vinod Koul" , Greg Kroah-Hartman , Wesley Cheng , Stephen Boyd , Doug Anderson , Matthias Kaehlcke , , , , , , , , Subject: Re: [PATCH v2 1/3] dt-bindings: phy: qcom,usb-snps-femto-v2: Add phy override params bindings Message-ID: <20220314032952.GA27561@hu-pkondeti-hyd.qualcomm.com> References: <1646288011-32242-1-git-send-email-quic_c_sanm@quicinc.com> <1646288011-32242-2-git-send-email-quic_c_sanm@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,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 Hi Krzysztof, On Thu, Mar 03, 2022 at 04:59:22PM +0100, Krzysztof Kozlowski wrote: > On 03/03/2022 07:13, Sandeep Maheswaram wrote: > > Add device tree bindings for SNPS phy tuning parameters. > > > > Signed-off-by: Sandeep Maheswaram > > --- > > .../bindings/phy/qcom,usb-snps-femto-v2.yaml | 125 +++++++++++++++++++++ > > 1 file changed, 125 insertions(+) > > > > diff --git a/Documentation/devicetree/bindings/phy/qcom,usb-snps-femto-v2.yaml b/Documentation/devicetree/bindings/phy/qcom,usb-snps-femto-v2.yaml > > index 0dfe691..227c097 100644 > > --- a/Documentation/devicetree/bindings/phy/qcom,usb-snps-femto-v2.yaml > > +++ b/Documentation/devicetree/bindings/phy/qcom,usb-snps-femto-v2.yaml > > @@ -50,6 +50,131 @@ properties: > > vdda33-supply: > > description: phandle to the regulator 3.3V supply node. > > > > + qcom,hs-disconnect: > > + $ref: /schemas/types.yaml#/definitions/uint32 > > + description: > > + This adjusts the voltage level for the threshold used to > > + detect a disconnect event at the host. Possible values are. > > ':', instead of full stop. > > > + 7 -> +21.56% > > + 6 -> +17.43% > > + 5 -> +13.32% > > + 4 -> +9.73% > > + 3 -> +6.3 > > + 2 -> +3.17% > > + 1 -> 0, Design default% > > Use "default:" instead. Here and in other places. > > > + 0 -> -2.72% > > In current form this should be an enum... but actually current form is > wrong. You should not store register values in DT. What if next version > of hardware has a different meaning of these values? > > Instead, you should store here meaningful values, not register values. > Thanks for the feedback. The values in % really makes the tuning easy. People look at the eye diagram and decided whether to increase/decrease the margin. The absolute values may not be that useful. All we need is an "adjustment" here. The databook it self does not give any absolute values. I agree to the "enum" suggestion which we have been following for the qusb2 driver already. The values have not changed in the last 5 years for this hardware block, so defining enums for the % values would be really helpful. > > > + > > + qcom,squelch-detector: > > + $ref: /schemas/types.yaml#/definitions/uint32 > > + description: > > + This adjusts the voltage level for the threshold used to > > + detect valid high-speed data. Possible values are > > + 7-> -20.90% > > + 6-> -15.60% > > + 5-> -10.30% > > + 4-> -5.30% > > + 3-> 0, Design default% > > + 2-> +5.30% > > + 1-> +10.60% > > + 0-> +15.90% > > + > > + qcom,hs-amplitude: > > + $ref: /schemas/types.yaml#/definitions/uint32 > > + description: > > + This adjusts the high-speed DC level voltage. > > + Possible values are > > + 15-> +26.70% > > + 14-> +24.30% > > + 13-> +22.20% > > + 12-> +20.00% > > + 11-> +17.80% > > + 10-> +15.60% > > + 9-> +13.30% > > + 8-> +11.10% > > + 7-> +8.90% > > + 6-> +6.50% > > + 5-> +4.40% > > + 4-> +2.30% > > + 3-> 0, Design default% > > + 2-> -2.20% > > + 1-> -4.40% > > + 0-> -6.60% > > + > > + qcom,pre-emphasis-duration: > > + $ref: /schemas/types.yaml#/definitions/uint32 > > + description: > > + This signal controls the duration for which the > > + HS pre-emphasis current is sourced onto DP<#> or DM<#>. > > + The HS Transmitter pre-emphasis duration is defined in terms of > > + unit amounts. One unit of pre-emphasis duration is approximately > > + 650 ps and is defined as 1X pre-emphasis duration. > > + Possible values are > > + 1-> 1x, short pre-emphasis current duration > > + 0-> 2x, long pre-emphasis current duration > > I could understand encoding of percentages in way of register value, but > a boolean flag is too much. > Agreed. This needs to be encoded in % as well (100% or 200%). Thanks, Pavan