From: Rob Herring <robh@kernel.org>
To: kholk11@gmail.com
Cc: agross@kernel.org, bjorn.andersson@linaro.org, kishon@ti.com,
marijns95@gmail.com, konradybcio@gmail.com,
martin.botka1@gmail.com, devicetree@vger.kernel.org,
linux-arm-msm@vger.kernel.org, phone-devel@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] phy: qcom-qusb2: Add support for SDM630/660
Date: Tue, 29 Sep 2020 14:12:54 -0500 [thread overview]
Message-ID: <20200929191254.GA984478@bogus> (raw)
In-Reply-To: <20200926131157.14633-1-kholk11@gmail.com>
On Sat, Sep 26, 2020 at 03:11:57PM +0200, kholk11@gmail.com wrote:
> From: Konrad Dybcio <konradybcio@gmail.com>
>
> QUSB on these SoCs actually uses *almost* the same
> configuration that msm8996 does, so we can reuse
> the phy_cfg from there with just a single change
> (se clock scheme).
>
> Signed-off-by: Konrad Dybcio <konradybcio@gmail.com>
> Signed-off-by: AngeloGioacchino Del Regno <kholk11@gmail.com>
> ---
> Documentation/devicetree/bindings/phy/qcom,qusb2-phy.yaml | 1 +
> drivers/phy/qualcomm/phy-qcom-qusb2.c | 7 ++++++-
> 2 files changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/phy/qcom,qusb2-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qusb2-phy.yaml
> index ccda92859eca..97dae24752b4 100644
> --- a/Documentation/devicetree/bindings/phy/qcom,qusb2-phy.yaml
> +++ b/Documentation/devicetree/bindings/phy/qcom,qusb2-phy.yaml
> @@ -21,6 +21,7 @@ properties:
> - qcom,ipq8074-qusb2-phy
> - qcom,msm8996-qusb2-phy
> - qcom,msm8998-qusb2-phy
> + - qcom,sdm660-qusb2-phy
> - items:
> - enum:
> - qcom,sc7180-qusb2-phy
> diff --git a/drivers/phy/qualcomm/phy-qcom-qusb2.c b/drivers/phy/qualcomm/phy-qcom-qusb2.c
> index 557547dabfd5..a4d706b361b9 100644
> --- a/drivers/phy/qualcomm/phy-qcom-qusb2.c
> +++ b/drivers/phy/qualcomm/phy-qcom-qusb2.c
> @@ -702,7 +702,8 @@ static int qusb2_phy_init(struct phy *phy)
> usleep_range(150, 160);
>
> /* Default is single-ended clock on msm8996 */
> - qphy->has_se_clk_scheme = true;
> + if (!of_device_is_compatible(phy->dev.of_node, "qcom,sdm660-qusb2-phy"))
> + qphy->has_se_clk_scheme = true;
You should just pull this from the driver data.
> /*
> * read TCSR_PHY_CLK_SCHEME register to check if single-ended
> * clock scheme is selected. If yes, then disable differential
> @@ -818,6 +819,10 @@ static const struct of_device_id qusb2_phy_of_match_table[] = {
> }, {
> .compatible = "qcom,msm8998-qusb2-phy",
> .data = &msm8998_phy_cfg,
> + }, {
> + .compatible = "qcom,sdm660-qusb2-phy",
> + /* sdm630/660 use the same config as msm8996. */
> + .data = &msm8996_phy_cfg,
> }, {
> /*
> * Deprecated. Only here to support legacy device
> --
> 2.28.0
>
next prev parent reply other threads:[~2020-09-29 19:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-26 13:11 [PATCH] phy: qcom-qusb2: Add support for SDM630/660 kholk11
2020-09-26 13:25 ` Martin Botka
2020-09-29 19:12 ` Rob Herring [this message]
2020-09-29 19:25 ` Konrad Dybcio
2020-09-29 19:46 ` Rob Herring
2020-09-30 9:31 ` Alexey Minekhanov
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=20200929191254.GA984478@bogus \
--to=robh@kernel.org \
--cc=agross@kernel.org \
--cc=bjorn.andersson@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=kholk11@gmail.com \
--cc=kishon@ti.com \
--cc=konradybcio@gmail.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marijns95@gmail.com \
--cc=martin.botka1@gmail.com \
--cc=phone-devel@vger.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).