From: Sumit Garg <sumit.garg@kernel.org>
To: Balaji Selvanathan <balaji.selvanathan@oss.qualcomm.com>
Cc: trini@konsulko.com, aswin.murugan@oss.qualcomm.com,
lukma@denx.de, seanga2@gmail.com, casey.connolly@linaro.org,
neil.armstrong@linaro.org, alexeymin@postmarketos.org,
u-boot@lists.denx.de, u-boot-qcom@groups.io
Subject: Re: [PATCH v1 3/3] phy: qcom: qusb2: Add QCS615 QUSB2 PHY support
Date: Fri, 26 Dec 2025 15:59:30 +0530 [thread overview]
Message-ID: <aU5jiji7JN0AItZZ@sumit-xelite> (raw)
In-Reply-To: <20251114063804.3835132-4-balaji.selvanathan@oss.qualcomm.com>
On Fri, Nov 14, 2025 at 12:08:04PM +0530, Balaji Selvanathan wrote:
> Add support for QCS615 QUSB2 PHY by introducing platform-specific
> initialization table and register layout. The implementation reuses
> the IPQ6018 register layout and defines QCS615-specific tuning
> parameters for proper USB PHY operation.
>
> This change is based on the upstream Linux kernel implementation:
> https://web.git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/phy/qualcomm/phy-qcom-qusb2.c?id=3d25d46a255a83f94d7d4d4216f38aafc8e116b0
>
This kernel reference doesn't contain qcs615 specific implementation.
Once you update that, feel free to add:
Reviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
-Sumit
> Signed-off-by: Balaji Selvanathan <balaji.selvanathan@oss.qualcomm.com>
> ---
> drivers/phy/qcom/phy-qcom-qusb2.c | 38 +++++++++++++++++++++++++++++++
> 1 file changed, 38 insertions(+)
>
> diff --git a/drivers/phy/qcom/phy-qcom-qusb2.c b/drivers/phy/qcom/phy-qcom-qusb2.c
> index d98f6108e69..a5d724eebd4 100644
> --- a/drivers/phy/qcom/phy-qcom-qusb2.c
> +++ b/drivers/phy/qcom/phy-qcom-qusb2.c
> @@ -176,6 +176,19 @@ static const unsigned int sm6115_regs_layout[] = {
> [QUSB2PHY_PORT_POWERDOWN] = 0xb4, [QUSB2PHY_INTR_CTRL] = 0xbc,
> };
>
> +static const unsigned int ipq6018_regs_layout[] = {
> + [QUSB2PHY_PLL_STATUS] = 0x38,
> + [QUSB2PHY_PORT_TUNE1] = 0x80,
> + [QUSB2PHY_PORT_TUNE2] = 0x84,
> + [QUSB2PHY_PORT_TUNE3] = 0x88,
> + [QUSB2PHY_PORT_TUNE4] = 0x8C,
> + [QUSB2PHY_PORT_TUNE5] = 0x90,
> + [QUSB2PHY_PORT_TEST1] = 0x98,
> + [QUSB2PHY_PORT_TEST2] = 0x9C,
> + [QUSB2PHY_PORT_POWERDOWN] = 0xB4,
> + [QUSB2PHY_INTR_CTRL] = 0xBC,
> +};
> +
> static const struct qusb2_phy_init_tbl msm8996_init_tbl[] = {
> QUSB2_PHY_INIT_CFG_L(QUSB2PHY_PORT_TUNE1, 0xf8),
> QUSB2_PHY_INIT_CFG_L(QUSB2PHY_PORT_TUNE2, 0xb3),
> @@ -189,6 +202,19 @@ static const struct qusb2_phy_init_tbl msm8996_init_tbl[] = {
> QUSB2_PHY_INIT_CFG(QUSB2PHY_PLL_PWR_CTRL, 0x00),
> };
>
> +static const struct qusb2_phy_init_tbl qcs615_init_tbl[] = {
> + QUSB2_PHY_INIT_CFG_L(QUSB2PHY_PORT_TUNE1, 0xc8),
> + QUSB2_PHY_INIT_CFG_L(QUSB2PHY_PORT_TUNE2, 0xb3),
> + QUSB2_PHY_INIT_CFG_L(QUSB2PHY_PORT_TUNE3, 0x83),
> + QUSB2_PHY_INIT_CFG_L(QUSB2PHY_PORT_TUNE4, 0xc0),
> + 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 struct qusb2_phy_init_tbl qusb2_v2_init_tbl[] = {
> QUSB2_PHY_INIT_CFG(QUSB2PHY_PLL_ANALOG_CONTROLS_TWO, 0x03),
> QUSB2_PHY_INIT_CFG(QUSB2PHY_PLL_CLOCK_INVERTERS, 0x7c),
> @@ -248,6 +274,16 @@ static const struct qusb2_phy_cfg sdm660_phy_cfg = {
> .autoresume_en = BIT(3),
> };
>
> +static const struct qusb2_phy_cfg qcs615_phy_cfg = {
> + .tbl = qcs615_init_tbl,
> + .tbl_num = ARRAY_SIZE(qcs615_init_tbl),
> + .regs = ipq6018_regs_layout,
> +
> + .disable_ctrl = (CLAMP_N_EN | FREEZIO_N | POWER_DOWN),
> + .mask_core_ready = PLL_LOCKED,
> + .autoresume_en = BIT(0),
> +};
> +
> static const struct qusb2_phy_cfg qusb2_v2_phy_cfg = {
> .tbl = qusb2_v2_init_tbl,
> .tbl_num = ARRAY_SIZE(qusb2_v2_init_tbl),
> @@ -453,6 +489,8 @@ static const struct udevice_id qusb2phy_ids[] = {
> { .compatible = "qcom,qusb2-phy" },
> { .compatible = "qcom,qcm2290-qusb2-phy",
> .data = (ulong)&sm6115_phy_cfg },
> + { .compatible = "qcom,qcs615-qusb2-phy",
> + .data = (ulong)&qcs615_phy_cfg },
> { .compatible = "qcom,sdm660-qusb2-phy",
> .data = (ulong)&sdm660_phy_cfg },
> { .compatible = "qcom,sm6115-qusb2-phy",
> --
> 2.34.1
>
prev parent reply other threads:[~2025-12-26 10:29 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-14 6:38 [PATCH v1 0/3] Enable USB High-Speed support for QCS615 Balaji Selvanathan
2025-11-14 6:38 ` [PATCH v1 1/3] arm: dts: qcs615-ride: Remove unsupported USB clock reference Balaji Selvanathan
2025-12-26 10:22 ` Sumit Garg
2026-01-20 4:30 ` Balaji Selvanathan
2026-01-20 12:07 ` Sumit Garg
2025-11-14 6:38 ` [PATCH v1 2/3] clk: qcom: qcs615: Add GCC_AHB2PHY_WEST_CLK clock support Balaji Selvanathan
2025-11-18 8:07 ` neil.armstrong
2025-12-26 10:29 ` Sumit Garg
2025-11-14 6:38 ` [PATCH v1 3/3] phy: qcom: qusb2: Add QCS615 QUSB2 PHY support Balaji Selvanathan
2025-11-18 8:07 ` neil.armstrong
2025-12-26 10:29 ` Sumit Garg [this message]
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=aU5jiji7JN0AItZZ@sumit-xelite \
--to=sumit.garg@kernel.org \
--cc=alexeymin@postmarketos.org \
--cc=aswin.murugan@oss.qualcomm.com \
--cc=balaji.selvanathan@oss.qualcomm.com \
--cc=casey.connolly@linaro.org \
--cc=lukma@denx.de \
--cc=neil.armstrong@linaro.org \
--cc=seanga2@gmail.com \
--cc=trini@konsulko.com \
--cc=u-boot-qcom@groups.io \
--cc=u-boot@lists.denx.de \
/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