From: Vinod Koul <vkoul@kernel.org>
To: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Kishon Vijay Abraham I <kishon@ti.com>,
Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Andy Gross <agross@kernel.org>,
linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org
Subject: Re: [PATCH 1/2] phy: qcom-qmp: Add MSM8996 UFS QMP support
Date: Thu, 19 Dec 2019 09:50:47 +0530 [thread overview]
Message-ID: <20191219042047.GT2536@vkoul-mobl> (raw)
In-Reply-To: <20191207202147.2314248-2-bjorn.andersson@linaro.org>
On 07-12-19, 12:21, Bjorn Andersson wrote:
> The support for the 14nm MSM8996 UFS PHY is currently handled by the
> UFS-specific 14nm QMP driver, due to the earlier need for additional
> operations beyond the standard PHY API.
>
> Add support for this PHY to the common QMP driver, to allow us to remove
> the old driver.
>
> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> ---
> .../devicetree/bindings/phy/qcom-qmp-phy.txt | 5 +
> drivers/phy/qualcomm/phy-qcom-qmp.c | 106 ++++++++++++++++++
> 2 files changed, 111 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/phy/qcom-qmp-phy.txt b/Documentation/devicetree/bindings/phy/qcom-qmp-phy.txt
> index eac9ad3cbbc8..5b99cf081817 100644
> --- a/Documentation/devicetree/bindings/phy/qcom-qmp-phy.txt
> +++ b/Documentation/devicetree/bindings/phy/qcom-qmp-phy.txt
> @@ -8,6 +8,7 @@ Required properties:
> - compatible: compatible list, contains:
> "qcom,ipq8074-qmp-pcie-phy" for PCIe phy on IPQ8074
> "qcom,msm8996-qmp-pcie-phy" for 14nm PCIe phy on msm8996,
> + "qcom,msm8996-qmp-ufs-phy" for 14nm UFS phy on msm8996,
> "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,
> @@ -44,6 +45,8 @@ Required properties:
> For "qcom,ipq8074-qmp-pcie-phy": no clocks are listed.
> For "qcom,msm8996-qmp-pcie-phy" must contain:
> "aux", "cfg_ahb", "ref".
> + For "qcom,msm8996-qmp-ufs-phy" must contain:
> + "ref".
> For "qcom,msm8996-qmp-usb3-phy" must contain:
> "aux", "cfg_ahb", "ref".
> For "qcom,msm8998-qmp-usb3-phy" must contain:
> @@ -72,6 +75,8 @@ Required properties:
> "phy", "common".
> For "qcom,msm8996-qmp-pcie-phy" must contain:
> "phy", "common", "cfg".
> + For "qcom,msm8996-qmp-ufs-phy": must contain:
> + "ufsphy".
> For "qcom,msm8996-qmp-usb3-phy" must contain
> "phy", "common".
> For "qcom,msm8998-qmp-usb3-phy" must contain
> diff --git a/drivers/phy/qualcomm/phy-qcom-qmp.c b/drivers/phy/qualcomm/phy-qcom-qmp.c
> index a6b8fc5798e2..d81516c4d747 100644
> --- a/drivers/phy/qualcomm/phy-qcom-qmp.c
> +++ b/drivers/phy/qualcomm/phy-qcom-qmp.c
> @@ -121,6 +121,11 @@ enum qphy_reg_layout {
> QPHY_PCS_LFPS_RXTERM_IRQ_STATUS,
> };
>
> +static const unsigned int msm8996_ufsphy_regs_layout[] = {
> + [QPHY_START_CTRL] = 0x00,
> + [QPHY_PCS_READY_STATUS] = 0x168,
> +};
> +
> static const unsigned int pciephy_regs_layout[] = {
> [QPHY_COM_SW_RESET] = 0x400,
> [QPHY_COM_POWER_DOWN_CONTROL] = 0x404,
> @@ -330,6 +335,75 @@ static const struct qmp_phy_init_tbl msm8998_pcie_pcs_tbl[] = {
> QMP_PHY_INIT_CFG(QPHY_V3_PCS_SIGDET_CNTRL, 0x03),
> };
>
> +static const struct qmp_phy_init_tbl msm8996_ufs_serdes_tbl[] = {
> + QMP_PHY_INIT_CFG(QPHY_POWER_DOWN_CONTROL, 0x01),
Can you check this after adding the reset for ufs, I suspect you might
run into same issue as I am seeing on 8150, power down here does not
seem correct.
--
~Vinod
next prev parent reply other threads:[~2019-12-19 4:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-07 20:21 [PATCH 0/2] phy: qcom-qmp: Add MSM8996 UFS QMP support Bjorn Andersson
2019-12-07 20:21 ` [PATCH 1/2] " Bjorn Andersson
2019-12-18 23:42 ` Rob Herring
2019-12-19 4:20 ` Vinod Koul [this message]
2019-12-19 7:06 ` Bjorn Andersson
2019-12-19 13:48 ` Vinod Koul
2019-12-07 20:21 ` [PATCH 2/2] arm64: dts: qcom: msm8996: Use generic QMP driver for UFS Bjorn Andersson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191219042047.GT2536@vkoul-mobl \
--to=vkoul@kernel.org \
--cc=agross@kernel.org \
--cc=bjorn.andersson@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=kishon@ti.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).