All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sumit Garg <sumit.garg@kernel.org>
To: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com>
Cc: trini@konsulko.com, casey.connolly@linaro.org,
	neil.armstrong@linaro.org, peng.fan@nxp.com,
	jh80.chung@samsung.com, lukma@denx.de,
	marek.vasut+renesas@mailbox.org, michal.simek@amd.com,
	alexeymin@postmarketos.org, u-boot@lists.denx.de,
	u-boot-qcom@groups.io
Subject: Re: [RESEND v2 2/6] phy: Add IPQ9574 support to Qualcomm QUSB2 phy
Date: Fri, 19 Dec 2025 19:30:04 +0530	[thread overview]
Message-ID: <aUVaZEYltFOfxeZh@sumit-xelite> (raw)
In-Reply-To: <20251218061557.1999367-3-varadarajan.narayanan@oss.qualcomm.com>

On Thu, Dec 18, 2025 at 11:45:53AM +0530, Varadarajan Narayanan wrote:
> Imported from Linux driver.

Kindly add information as to which kernel driver commit you have used to
import this code.

-Sumit

> 
> Signed-off-by: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com>
> ---
>  drivers/phy/qcom/phy-qcom-qusb2.c | 42 +++++++++++++++++++++++++++++++
>  1 file changed, 42 insertions(+)
> 
> diff --git a/drivers/phy/qcom/phy-qcom-qusb2.c b/drivers/phy/qcom/phy-qcom-qusb2.c
> index d98f6108e69..df82f2a99da 100644
> --- a/drivers/phy/qcom/phy-qcom-qusb2.c
> +++ b/drivers/phy/qcom/phy-qcom-qusb2.c
> @@ -152,6 +152,22 @@ enum qusb2phy_reg_layout {
>  		.offset = o, .val = v, .in_layout = 1, \
>  	}
>  
> +static const struct qusb2_phy_init_tbl ipq6018_init_tbl[] = {
> +	QUSB2_PHY_INIT_CFG(QUSB2PHY_PLL, 0x14),
> +	QUSB2_PHY_INIT_CFG_L(QUSB2PHY_PORT_TUNE1, 0xF8),
> +	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_TUNE5, 0x00),
> +	QUSB2_PHY_INIT_CFG(QUSB2PHY_PLL_PWR_CTRL, 0x00),
> +	QUSB2_PHY_INIT_CFG_L(QUSB2PHY_PORT_TEST2, 0x14),
> +	QUSB2_PHY_INIT_CFG(QUSB2PHY_PLL_TEST, 0x80),
> +	QUSB2_PHY_INIT_CFG(QUSB2PHY_PLL_AUTOPGM_CTL1, 0x9F),
> +};
> +
>  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),
> @@ -168,6 +184,19 @@ static const struct qusb2_phy_init_tbl sm6115_init_tbl[] = {
>  	QUSB2_PHY_INIT_CFG(QUSB2PHY_PLL_PWR_CTRL, 0x00),
>  };
>  
> +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 unsigned int sm6115_regs_layout[] = {
>  	[QUSB2PHY_PLL_STATUS] = 0x38,	  [QUSB2PHY_PORT_TUNE1] = 0x80,
>  	[QUSB2PHY_PORT_TUNE2] = 0x84,	  [QUSB2PHY_PORT_TUNE3] = 0x88,
> @@ -224,6 +253,17 @@ static const unsigned int qusb2_v2_regs_layout[] = {
>  	[QUSB2PHY_INTR_CTRL] = 0x230,
>  };
>  
> +static const struct qusb2_phy_cfg ipq6018_phy_cfg = {
> +	.tbl            = ipq6018_init_tbl,
> +	.tbl_num        = ARRAY_SIZE(ipq6018_init_tbl),
> +	.regs           = ipq6018_regs_layout,
> +
> +	.disable_ctrl   = POWER_DOWN,
> +	.mask_core_ready = PLL_LOCKED,
> +	/* autoresume not used */
> +	.autoresume_en   = BIT(0),
> +};
> +
>  static const struct qusb2_phy_cfg sm6115_phy_cfg = {
>  	.tbl = sm6115_init_tbl,
>  	.tbl_num = ARRAY_SIZE(sm6115_init_tbl),
> @@ -455,6 +495,8 @@ static const struct udevice_id qusb2phy_ids[] = {
>  	  .data = (ulong)&sm6115_phy_cfg },
>  	{ .compatible = "qcom,sdm660-qusb2-phy",
>  	  .data = (ulong)&sdm660_phy_cfg },
> +	{ .compatible = "qcom,ipq9574-qusb2-phy",
> +	  .data = (ulong)&ipq6018_phy_cfg },
>  	{ .compatible = "qcom,sm6115-qusb2-phy",
>  	  .data = (ulong)&sm6115_phy_cfg },
>  	{ .compatible = "qcom,qusb2-v2-phy", .data = (ulong)&qusb2_v2_phy_cfg },
> -- 
> 2.34.1
> 

  reply	other threads:[~2025-12-19 14:00 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-18  6:15 [RESEND v2 0/6] Enable fastboot support for IPQ9574 based boards Varadarajan Narayanan
2025-12-18  6:15 ` [RESEND v2 1/6] clk/qcom: Add USB related clocks for IPQ9574 Varadarajan Narayanan
2025-12-19 13:58   ` Sumit Garg
2026-01-12 14:56   ` Casey Connolly
2025-12-18  6:15 ` [RESEND v2 2/6] phy: Add IPQ9574 support to Qualcomm QUSB2 phy Varadarajan Narayanan
2025-12-19 14:00   ` Sumit Garg [this message]
2026-01-12 14:56   ` Casey Connolly
2025-12-18  6:15 ` [RESEND v2 3/6] phy: qcom: Add QMP USB PHY driver Varadarajan Narayanan
2025-12-19 14:13   ` Sumit Garg
2025-12-18  6:15 ` [RESEND v2 4/6] configs: ipq9574: Enable fastboot support Varadarajan Narayanan
2025-12-19 14:29   ` Sumit Garg
2025-12-22  8:44     ` Varadarajan Narayanan
2026-01-12 14:56     ` Casey Connolly
2025-12-18  6:15 ` [RESEND v2 5/6] dts: ipq9574-rdp433-u-boot: Enable USB device mode and MMC Varadarajan Narayanan
2025-12-19 14:41   ` Sumit Garg
2025-12-18  6:15 ` [RESEND v2 6/6] doc: board/qualcomm: Update RDP flashing instructions Varadarajan Narayanan
2025-12-19 14:43   ` Sumit Garg
2025-12-23  5:11     ` Varadarajan Narayanan
2025-12-23  8:27       ` Sumit Garg

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=aUVaZEYltFOfxeZh@sumit-xelite \
    --to=sumit.garg@kernel.org \
    --cc=alexeymin@postmarketos.org \
    --cc=casey.connolly@linaro.org \
    --cc=jh80.chung@samsung.com \
    --cc=lukma@denx.de \
    --cc=marek.vasut+renesas@mailbox.org \
    --cc=michal.simek@amd.com \
    --cc=neil.armstrong@linaro.org \
    --cc=peng.fan@nxp.com \
    --cc=trini@konsulko.com \
    --cc=u-boot-qcom@groups.io \
    --cc=u-boot@lists.denx.de \
    --cc=varadarajan.narayanan@oss.qualcomm.com \
    /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.