From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Iskren Chernev <iskren.chernev@gmail.com>
Cc: Andy Gross <agross@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Kishon Vijay Abraham I <kishon@ti.com>,
Manu Gautam <mgautam@codeaurora.org>,
Rob Herring <robh+dt@kernel.org>, Vinod Koul <vkoul@kernel.org>,
devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org,
linux-usb@vger.kernel.org, phone-devel@vger.kernel.org,
~postmarketos/upstreaming@lists.sr.ht
Subject: Re: [PATCH v1 3/3] phy: qcom-qusb2: Add configuration for SM4250 and SM6115
Date: Tue, 22 Jun 2021 22:37:41 -0500 [thread overview]
Message-ID: <YNKshSbsf5d5Uyew@yoga> (raw)
In-Reply-To: <20210622203240.559979-4-iskren.chernev@gmail.com>
On Tue 22 Jun 15:32 CDT 2021, Iskren Chernev wrote:
> The SM4250 and SM6115 uses the same register layout as MSM8996, but the
> tune sequence is a bit different.
>
Didn't review the initialization sequence, but it's different from the
existing ones so adding a new compatible and init_tbl seems to be the
right choice.
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Regards,
Bjorn
> Signed-off-by: Iskren Chernev <iskren.chernev@gmail.com>
> ---
> drivers/phy/qualcomm/phy-qcom-qusb2.c | 34 +++++++++++++++++++++++++++
> 1 file changed, 34 insertions(+)
>
> diff --git a/drivers/phy/qualcomm/phy-qcom-qusb2.c b/drivers/phy/qualcomm/phy-qcom-qusb2.c
> index 8f1bf7e2186b..3c1d3b71c825 100644
> --- a/drivers/phy/qualcomm/phy-qcom-qusb2.c
> +++ b/drivers/phy/qualcomm/phy-qcom-qusb2.c
> @@ -219,6 +219,22 @@ static const struct qusb2_phy_init_tbl msm8998_init_tbl[] = {
> QUSB2_PHY_INIT_CFG(QUSB2PHY_PLL_DIGITAL_TIMERS_TWO, 0x19),
> };
>
> +static const struct qusb2_phy_init_tbl sm6115_init_tbl[] = {
> + QUSB2_PHY_INIT_CFG_L(QUSB2PHY_PORT_TUNE1, 0xf8),
> + QUSB2_PHY_INIT_CFG_L(QUSB2PHY_PORT_TUNE2, 0x53),
> + QUSB2_PHY_INIT_CFG_L(QUSB2PHY_PORT_TUNE3, 0x81),
> + QUSB2_PHY_INIT_CFG_L(QUSB2PHY_PORT_TUNE4, 0x17),
> +
> + QUSB2_PHY_INIT_CFG(QUSB2PHY_PLL_TUNE, 0x30),
> + QUSB2_PHY_INIT_CFG(QUSB2PHY_PLL_USER_CTL1, 0x79),
> + QUSB2_PHY_INIT_CFG(QUSB2PHY_PLL_USER_CTL2, 0x21),
> +
> + QUSB2_PHY_INIT_CFG_L(QUSB2PHY_PORT_TEST2, 0x14),
> +
> + QUSB2_PHY_INIT_CFG(QUSB2PHY_PLL_AUTOPGM_CTL1, 0x9f),
> + QUSB2_PHY_INIT_CFG(QUSB2PHY_PLL_PWR_CTRL, 0x00),
> +};
> +
> static const unsigned int qusb2_v2_regs_layout[] = {
> [QUSB2PHY_PLL_CORE_INPUT_OVERRIDE] = 0xa8,
> [QUSB2PHY_PLL_STATUS] = 0x1a0,
> @@ -342,6 +358,18 @@ static const struct qusb2_phy_cfg sdm660_phy_cfg = {
> .autoresume_en = BIT(3),
> };
>
> +static const struct qusb2_phy_cfg sm6115_phy_cfg = {
> + .tbl = sm6115_init_tbl,
> + .tbl_num = ARRAY_SIZE(sm6115_init_tbl),
> + .regs = msm8996_regs_layout,
> +
> + .has_pll_test = true,
> + .se_clk_scheme_default = true,
> + .disable_ctrl = (CLAMP_N_EN | FREEZIO_N | POWER_DOWN),
> + .mask_core_ready = PLL_LOCKED,
> + .autoresume_en = BIT(3),
> +};
> +
> static const char * const qusb2_phy_vreg_names[] = {
> "vdda-pll", "vdda-phy-dpdm",
> };
> @@ -888,6 +916,12 @@ static const struct of_device_id qusb2_phy_of_match_table[] = {
> }, {
> .compatible = "qcom,sdm660-qusb2-phy",
> .data = &sdm660_phy_cfg,
> + }, {
> + .compatible = "qcom,sm4250-qusb2-phy",
> + .data = &sm6115_phy_cfg,
> + }, {
> + .compatible = "qcom,sm6115-qusb2-phy",
> + .data = &sm6115_phy_cfg,
> }, {
> /*
> * Deprecated. Only here to support legacy device
> --
> 2.31.1
>
WARNING: multiple messages have this Message-ID (diff)
From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Iskren Chernev <iskren.chernev@gmail.com>
Cc: Andy Gross <agross@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Kishon Vijay Abraham I <kishon@ti.com>,
Manu Gautam <mgautam@codeaurora.org>,
Rob Herring <robh+dt@kernel.org>, Vinod Koul <vkoul@kernel.org>,
devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org,
linux-usb@vger.kernel.org, phone-devel@vger.kernel.org,
~postmarketos/upstreaming@lists.sr.ht
Subject: Re: [PATCH v1 3/3] phy: qcom-qusb2: Add configuration for SM4250 and SM6115
Date: Tue, 22 Jun 2021 22:37:41 -0500 [thread overview]
Message-ID: <YNKshSbsf5d5Uyew@yoga> (raw)
In-Reply-To: <20210622203240.559979-4-iskren.chernev@gmail.com>
On Tue 22 Jun 15:32 CDT 2021, Iskren Chernev wrote:
> The SM4250 and SM6115 uses the same register layout as MSM8996, but the
> tune sequence is a bit different.
>
Didn't review the initialization sequence, but it's different from the
existing ones so adding a new compatible and init_tbl seems to be the
right choice.
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Regards,
Bjorn
> Signed-off-by: Iskren Chernev <iskren.chernev@gmail.com>
> ---
> drivers/phy/qualcomm/phy-qcom-qusb2.c | 34 +++++++++++++++++++++++++++
> 1 file changed, 34 insertions(+)
>
> diff --git a/drivers/phy/qualcomm/phy-qcom-qusb2.c b/drivers/phy/qualcomm/phy-qcom-qusb2.c
> index 8f1bf7e2186b..3c1d3b71c825 100644
> --- a/drivers/phy/qualcomm/phy-qcom-qusb2.c
> +++ b/drivers/phy/qualcomm/phy-qcom-qusb2.c
> @@ -219,6 +219,22 @@ static const struct qusb2_phy_init_tbl msm8998_init_tbl[] = {
> QUSB2_PHY_INIT_CFG(QUSB2PHY_PLL_DIGITAL_TIMERS_TWO, 0x19),
> };
>
> +static const struct qusb2_phy_init_tbl sm6115_init_tbl[] = {
> + QUSB2_PHY_INIT_CFG_L(QUSB2PHY_PORT_TUNE1, 0xf8),
> + QUSB2_PHY_INIT_CFG_L(QUSB2PHY_PORT_TUNE2, 0x53),
> + QUSB2_PHY_INIT_CFG_L(QUSB2PHY_PORT_TUNE3, 0x81),
> + QUSB2_PHY_INIT_CFG_L(QUSB2PHY_PORT_TUNE4, 0x17),
> +
> + QUSB2_PHY_INIT_CFG(QUSB2PHY_PLL_TUNE, 0x30),
> + QUSB2_PHY_INIT_CFG(QUSB2PHY_PLL_USER_CTL1, 0x79),
> + QUSB2_PHY_INIT_CFG(QUSB2PHY_PLL_USER_CTL2, 0x21),
> +
> + QUSB2_PHY_INIT_CFG_L(QUSB2PHY_PORT_TEST2, 0x14),
> +
> + QUSB2_PHY_INIT_CFG(QUSB2PHY_PLL_AUTOPGM_CTL1, 0x9f),
> + QUSB2_PHY_INIT_CFG(QUSB2PHY_PLL_PWR_CTRL, 0x00),
> +};
> +
> static const unsigned int qusb2_v2_regs_layout[] = {
> [QUSB2PHY_PLL_CORE_INPUT_OVERRIDE] = 0xa8,
> [QUSB2PHY_PLL_STATUS] = 0x1a0,
> @@ -342,6 +358,18 @@ static const struct qusb2_phy_cfg sdm660_phy_cfg = {
> .autoresume_en = BIT(3),
> };
>
> +static const struct qusb2_phy_cfg sm6115_phy_cfg = {
> + .tbl = sm6115_init_tbl,
> + .tbl_num = ARRAY_SIZE(sm6115_init_tbl),
> + .regs = msm8996_regs_layout,
> +
> + .has_pll_test = true,
> + .se_clk_scheme_default = true,
> + .disable_ctrl = (CLAMP_N_EN | FREEZIO_N | POWER_DOWN),
> + .mask_core_ready = PLL_LOCKED,
> + .autoresume_en = BIT(3),
> +};
> +
> static const char * const qusb2_phy_vreg_names[] = {
> "vdda-pll", "vdda-phy-dpdm",
> };
> @@ -888,6 +916,12 @@ static const struct of_device_id qusb2_phy_of_match_table[] = {
> }, {
> .compatible = "qcom,sdm660-qusb2-phy",
> .data = &sdm660_phy_cfg,
> + }, {
> + .compatible = "qcom,sm4250-qusb2-phy",
> + .data = &sm6115_phy_cfg,
> + }, {
> + .compatible = "qcom,sm6115-qusb2-phy",
> + .data = &sm6115_phy_cfg,
> }, {
> /*
> * Deprecated. Only here to support legacy device
> --
> 2.31.1
>
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
next prev parent reply other threads:[~2021-06-23 3:37 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-22 20:32 [PATCH v1 0/3] Add USB HS support for SM4250/6115 Iskren Chernev
2021-06-22 20:32 ` Iskren Chernev
2021-06-22 20:32 ` [PATCH v1 1/3] dt-bindings: usb: qcom,dwc3: Add bindings for sm6115/4250 Iskren Chernev
2021-06-22 20:32 ` [PATCH v1 1/3] dt-bindings: usb: qcom, dwc3: " Iskren Chernev
2021-06-23 3:33 ` [PATCH v1 1/3] dt-bindings: usb: qcom,dwc3: " Bjorn Andersson
2021-06-23 3:33 ` Bjorn Andersson
2021-06-22 20:32 ` [PATCH v1 2/3] dt-bindings: phy: qcom,qusb2: document sm4250/6115 compatible Iskren Chernev
2021-06-22 20:32 ` [PATCH v1 2/3] dt-bindings: phy: qcom, qusb2: " Iskren Chernev
2021-06-23 3:37 ` [PATCH v1 2/3] dt-bindings: phy: qcom,qusb2: " Bjorn Andersson
2021-06-23 3:37 ` Bjorn Andersson
2021-06-22 20:32 ` [PATCH v1 3/3] phy: qcom-qusb2: Add configuration for SM4250 and SM6115 Iskren Chernev
2021-06-22 20:32 ` Iskren Chernev
2021-06-23 3:37 ` Bjorn Andersson [this message]
2021-06-23 3:37 ` Bjorn Andersson
2021-06-25 10:38 ` Iskren Chernev
2021-06-25 10:38 ` Iskren Chernev
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=YNKshSbsf5d5Uyew@yoga \
--to=bjorn.andersson@linaro.org \
--cc=agross@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=iskren.chernev@gmail.com \
--cc=kishon@ti.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=linux-usb@vger.kernel.org \
--cc=mgautam@codeaurora.org \
--cc=phone-devel@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=vkoul@kernel.org \
--cc=~postmarketos/upstreaming@lists.sr.ht \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.