Received: by 2002:ac0:8845:0:0:0:0:0 with SMTP id g63csp2087592img; Wed, 27 Feb 2019 10:10:36 -0800 (PST) X-Google-Smtp-Source: AHgI3IZ/guQxvbUeXYbbHRleot5WN3tDoBLIPXGDTcfu9XEfGfIZ5LScxYxcWiZj2wTWzcuZ7bZl X-Received: by 2002:a17:902:1026:: with SMTP id b35mr3371846pla.252.1551291036703; Wed, 27 Feb 2019 10:10:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551291036; cv=none; d=google.com; s=arc-20160816; b=j5irklhuxAfNW5PF8FolF+nXB91283Mz9q5GBM9fluxJu9A92ooprsoVGOvOjLvF7d 44GVwM99ico4Cqs0no5pMkdvlLci57DWjhrYll+M/6LJmims6Pp4RFIY4C4EFOgG6vPh 72lf/puKLBfkLg5D+vcKurtbcNdxt3idEP8yThtIlOljMWtYpFeEJ+vp3sG9TeFW+FUC Zalm6SQ2gbdmqeHV5xUU0CMhIRn4k623+IBTvY/ou/vW+t4ENPZH/7ppsjab3/HR8x5E sA825Win6Sqh1bfHL13YYmeLWhMVLagxpFeVNdXcVIxEaTtSvhNS4CouUbRb9MmnxGPe kGhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=W2OUFSd0FP3lORhut5RaNw1VzmkYP+Tqe9cEC63o4kU=; b=kLiK+9AOdX33bS81LXMKVZbqQYYdJ7YNuTA7M0HEaFDTTBXbmE9Aoyd6pMEl1eqoMZ TYx+9bazD33OGoRshkEQvlyeaPnRy2hS+vfLPQsdpSteRJIopkRU3L+y0uYaSxMLNpw3 Pofhp7R0woyd6RDi0XBgoa7MpbhMesgorbGvQUAGX4TAX0E0WRZPiMCVz8E3lPgNdqmU Od7CCiYx1Ta05LCx75XfaNTHXMaxQBqANZOwiJEcGoORtLayPVep2dhzNjfRe9msl9aB 3rHtZlEOeX/uCZi0HgdongufRioYwwrO6RWZ+DVIRn4KCvhcDj81a03u1Ba+1MZawv6Q zg3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=X2AxPD1R; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x12si15639657pga.127.2019.02.27.10.10.22; Wed, 27 Feb 2019 10:10:36 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=X2AxPD1R; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1729412AbfB0SJ5 (ORCPT + 99 others); Wed, 27 Feb 2019 13:09:57 -0500 Received: from mail-pg1-f196.google.com ([209.85.215.196]:39369 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726397AbfB0SJ4 (ORCPT ); Wed, 27 Feb 2019 13:09:56 -0500 Received: by mail-pg1-f196.google.com with SMTP id h8so7818412pgp.6 for ; Wed, 27 Feb 2019 10:09:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=W2OUFSd0FP3lORhut5RaNw1VzmkYP+Tqe9cEC63o4kU=; b=X2AxPD1RrJ9jYu+gE7BgffwOBUn+KRu++KX+lUgX/ziP/o7t6UsTEPMK6WmrM2pruZ YAA/Si5RpEuwpxqnvfPzPdPLlbVtTl4L4XQ3kZ96JNqxN6pey27VPIfSTF3pWmruYaXc g1dSterF/svsXaOMBTvqgMES2SvuVUGgA/aY9uHrz5hvqiDyPLbiV5kr8v/5QxGZV3j0 q7TQdKQEBWzy+0S3gUJxH6GvGsprGdvHV8AEPiDFP5yJqfgXCAIcI1+daUUo53QOQ39J JzxgzNnZpyoFCyRZ1NckjTTk1pljNBi6XeY75XYehh98CFsl97wkrjhILOaKqO5PjmJP X1Rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=W2OUFSd0FP3lORhut5RaNw1VzmkYP+Tqe9cEC63o4kU=; b=BnfuWL7/xO1LJcZASzVoiTriLyvGWHTmFpAUMJdu5fRswxywtEW24TEjuxN1m3DiwQ I2KYR7OTCvvXs4NtDE6nVHIPwSV9Lao08elGVSanr5rm5+EdzXMEIrjPs3eusgik+vgA TSrjOYLrn4emp5Ag0jzvttRk8vzoaOF4tnnm2B86NLAPS8332h8/vmwhx6erF67WqVgB cfhg6b91XqAMKgd5KodvAIpJ3NY+p5n08U/lfhw/xbjRBemPI8WRQcQmoW1nwApp/uP/ UgybqdQFQ1xtsUuUq/jQu+Rs/YUyvVfp6qy9bffsRYkKIdhb3f2SfGfeMLpQBU8cbBvT rjRg== X-Gm-Message-State: AHQUAuaFUIu3w0B3GRcykIZJ6ZRFsqraGyNmm2rFDbu44udnLKClAK5T o85qQxShvZi8IWzYeTu4D/z3Sw== X-Received: by 2002:a63:4d4f:: with SMTP id n15mr4185178pgl.327.1551290995391; Wed, 27 Feb 2019 10:09:55 -0800 (PST) Received: from tuxbook-pro (104-188-17-28.lightspeed.sndgca.sbcglobal.net. [104.188.17.28]) by smtp.gmail.com with ESMTPSA id g3sm21724039pgg.41.2019.02.27.10.09.53 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 27 Feb 2019 10:09:54 -0800 (PST) Date: Wed, 27 Feb 2019 10:09:52 -0800 From: Bjorn Andersson To: Marc Gonzalez Cc: Kishon Vijay Abraham I , Rob Herring , Mark Rutland , MSM , LKML , Can Guo , Vivek Gautam , Jeffrey Hugo , Nicolas Dechesne Subject: Re: [PATCH] phy: qcom: qmp: Add SDM845 PCIe QMP PHY support Message-ID: <20190227180952.GA1803@tuxbook-pro> References: <20190226065919.22218-1-bjorn.andersson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.3 (2019-02-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 27 Feb 01:27 PST 2019, Marc Gonzalez wrote: > On 26/02/2019 07:59, Bjorn Andersson wrote: > > > qcom_qmp_phy_init() is extended to support the additional register > > writes needed in PCS MISC and the appropriate sequences and resources > > are defined for SDM845. > > > > Signed-off-by: Bjorn Andersson > > --- > > .../devicetree/bindings/phy/qcom-qmp-phy.txt | 7 + > > drivers/phy/qualcomm/phy-qcom-qmp.c | 160 ++++++++++++++++++ > > drivers/phy/qualcomm/phy-qcom-qmp.h | 12 ++ > > 3 files changed, 179 insertions(+) > > > > diff --git a/Documentation/devicetree/bindings/phy/qcom-qmp-phy.txt b/Documentation/devicetree/bindings/phy/qcom-qmp-phy.txt > > index 5d181fc3cc18..dd2725a9d3f7 100644 > > --- a/Documentation/devicetree/bindings/phy/qcom-qmp-phy.txt > > +++ b/Documentation/devicetree/bindings/phy/qcom-qmp-phy.txt > > @@ -11,6 +11,7 @@ Required properties: > > "qcom,msm8996-qmp-usb3-phy" for 14nm USB3 phy on msm8996, > > "qcom,msm8998-qmp-usb3-phy" for USB3 QMP V3 phy on msm8998, > > "qcom,msm8998-qmp-ufs-phy" for UFS QMP phy on msm8998, > > + "qcom,sdm845-qmp-pcie-phy" for PCIe phy on sdm845, > > "qcom,sdm845-qmp-usb3-phy" for USB3 QMP V3 phy on sdm845, > > "qcom,sdm845-qmp-usb3-uni-phy" for USB3 QMP V3 UNI phy on sdm845, > > "qcom,sdm845-qmp-ufs-phy" for UFS QMP phy on sdm845. > > @@ -48,6 +49,10 @@ Required properties: > > "aux", "cfg_ahb", "ref". > > For "qcom,msm8998-qmp-ufs-phy" must contain: > > "ref", "ref_aux". > > + For "qcom,sdm845-qmp-usb3-phy" must contain: > > + "aux", "cfg_ahb", "ref", "refgen". > > qcom,sdm845-qmp-usb3-phy in a PCIe patch? > Must have forgotten to fix it up after copy pasting the other line, thanks for spotting. > > + For "qcom,sdm845-qmp-usb3-phy" must contain: > > + "aux", "cfg_ahb", "ref", "com_aux". > > qcom,sdm845-qmp-usb3-phy again in a PCIe patch? > Ditto. > > > +static const struct qmp_phy_init_tbl sdm845_pcie_pcs_misc_tbl[] = { > > + QMP_PHY_INIT_CFG(QPHY_V3_PCS_MISC_OSC_DTCT_CONFIG2, 0x52), > > + QMP_PHY_INIT_CFG(QPHY_V3_PCS_MISC_OSC_DTCT_MODE2_CONFIG2, 0x10), > > + QMP_PHY_INIT_CFG(QPHY_V3_PCS_MISC_OSC_DTCT_MODE2_CONFIG4, 0x1a), > > + QMP_PHY_INIT_CFG(QPHY_V3_PCS_MISC_OSC_DTCT_MODE2_CONFIG5, 0x06), > > + QMP_PHY_INIT_CFG(QPHY_V3_PCS_MISC_PCIE_INT_AUX_CLK_CONFIG1, 0x00), > > +}; > > I was thinking I might need to do the same for msm8998, since downstream > tweaks pcs_misc + 0x2c = 0x52 > (dunno if that's QPHY_V3_PCS_MISC_OSC_DTCT_CONFIG2) > Yeah, we probably should add the 8998 sequences as well. I haven't been able to compare the two side by side, but it's expected that they will be slightly different. > The thing is, phy driver writes unconditionally to pcs_misc + 0x0c > (QPHY_V3_PCS_MISC_CLAMP_ENABLE). Should that be moved elsewhere? > I spotted this as the only difference in the initialization sequence, but concluded that it seems to work fine as it is. So I left that part intact. Regards, Bjorn