All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Jeffrey Hugo <jhugo@codeaurora.org>
Cc: kishon@ti.com, andy.gross@linaro.org, david.brown@linaro.org,
	linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
	robh+dt@kernel.org, mark.rutland@arm.com,
	devicetree@vger.kernel.org, gregkh@linuxfoundation.org,
	balbi@kernel.org, linux-usb@vger.kernel.org
Subject: Re: [PATCH v2 3/6] phy: qcom-qusb2: Add QUSB2 PHY support for msm8998
Date: Tue, 15 Jan 2019 10:11:14 -0800	[thread overview]
Message-ID: <20190115181114.GE28907@builder> (raw)
In-Reply-To: <1547483802-5408-1-git-send-email-jhugo@codeaurora.org>

On Mon 14 Jan 08:36 PST 2019, Jeffrey Hugo wrote:

> MSM8998 contains one QUSB2 PHY which is very similar to the existing
> sdm845 support.
> 

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>

> Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org>
> ---
>  drivers/phy/qualcomm/phy-qcom-qusb2.c | 41 +++++++++++++++++++++++++++++++++++
>  1 file changed, 41 insertions(+)
> 
> diff --git a/drivers/phy/qualcomm/phy-qcom-qusb2.c b/drivers/phy/qualcomm/phy-qcom-qusb2.c
> index 9177989f..e5e4f36 100644
> --- a/drivers/phy/qualcomm/phy-qcom-qusb2.c
> +++ b/drivers/phy/qualcomm/phy-qcom-qusb2.c
> @@ -152,6 +152,32 @@ enum qusb2phy_reg_layout {
>  	QUSB2_PHY_INIT_CFG(QUSB2PHY_PLL_PWR_CTRL, 0x00),
>  };
>  
> +static const unsigned int msm8998_regs_layout[] = {
> +	[QUSB2PHY_PLL_CORE_INPUT_OVERRIDE] = 0xa8,
> +	[QUSB2PHY_PLL_STATUS]              = 0x1a0,
> +	[QUSB2PHY_PORT_TUNE1]              = 0x23c,
> +	[QUSB2PHY_PORT_TUNE2]              = 0x240,
> +	[QUSB2PHY_PORT_TUNE3]              = 0x244,
> +	[QUSB2PHY_PORT_TUNE4]              = 0x248,
> +	[QUSB2PHY_PORT_TEST1]              = 0x24c,
> +	[QUSB2PHY_PORT_TEST2]              = 0x250,
> +	[QUSB2PHY_PORT_POWERDOWN]          = 0x210,
> +	[QUSB2PHY_INTR_CTRL]               = 0x22c,
> +};
> +
> +static const struct qusb2_phy_init_tbl msm8998_init_tbl[] = {
> +	QUSB2_PHY_INIT_CFG(QUSB2PHY_PLL_ANALOG_CONTROLS_TWO, 0x13),
> +	QUSB2_PHY_INIT_CFG(QUSB2PHY_PLL_CLOCK_INVERTERS, 0x7c),
> +	QUSB2_PHY_INIT_CFG(QUSB2PHY_PLL_CMODE, 0x80),
> +	QUSB2_PHY_INIT_CFG(QUSB2PHY_PLL_LOCK_DELAY, 0x0a),
> +
> +	QUSB2_PHY_INIT_CFG_L(QUSB2PHY_PORT_TUNE1, 0xa5),
> +	QUSB2_PHY_INIT_CFG_L(QUSB2PHY_PORT_TUNE2, 0x09),
> +
> +	QUSB2_PHY_INIT_CFG(QUSB2PHY_PLL_DIGITAL_TIMERS_TWO, 0x19),
> +};
> +
> +
>  static const unsigned int sdm845_regs_layout[] = {
>  	[QUSB2PHY_PLL_CORE_INPUT_OVERRIDE] = 0xa8,
>  	[QUSB2PHY_PLL_STATUS]		= 0x1a0,
> @@ -221,6 +247,18 @@ struct qusb2_phy_cfg {
>  	.autoresume_en	 = BIT(3),
>  };
>  
> +static const struct qusb2_phy_cfg msm8998_phy_cfg = {
> +	.tbl            = msm8998_init_tbl,
> +	.tbl_num        = ARRAY_SIZE(msm8998_init_tbl),
> +	.regs           = msm8998_regs_layout,
> +
> +	.disable_ctrl   = POWER_DOWN,
> +	.mask_core_ready = CORE_READY_STATUS,
> +	.has_pll_override = true,
> +	.autoresume_en   = BIT(0),
> +	.update_tune1_with_efuse = true,
> +};
> +
>  static const struct qusb2_phy_cfg sdm845_phy_cfg = {
>  	.tbl		= sdm845_init_tbl,
>  	.tbl_num	= ARRAY_SIZE(sdm845_init_tbl),
> @@ -734,6 +772,9 @@ static int qusb2_phy_exit(struct phy *phy)
>  		.compatible	= "qcom,msm8996-qusb2-phy",
>  		.data		= &msm8996_phy_cfg,
>  	}, {
> +		.compatible	= "qcom,msm8998-qusb2-phy",
> +		.data		= &msm8998_phy_cfg,
> +	}, {
>  		.compatible	= "qcom,sdm845-qusb2-phy",
>  		.data		= &sdm845_phy_cfg,
>  	},
> -- 
> Qualcomm Datacenter Technologies as an affiliate of Qualcomm Technologies, Inc.
> Qualcomm Technologies, Inc. is a member of the
> Code Aurora Forum, a Linux Foundation Collaborative Project.
> 

WARNING: multiple messages have this Message-ID (diff)
From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Jeffrey Hugo <jhugo@codeaurora.org>
Cc: kishon@ti.com, andy.gross@linaro.org, david.brown@linaro.org,
	linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
	robh+dt@kernel.org, mark.rutland@arm.com,
	devicetree@vger.kernel.org, gregkh@linuxfoundation.org,
	balbi@kernel.org, linux-usb@vger.kernel.org
Subject: [v2,3/6] phy: qcom-qusb2: Add QUSB2 PHY support for msm8998
Date: Tue, 15 Jan 2019 10:11:14 -0800	[thread overview]
Message-ID: <20190115181114.GE28907@builder> (raw)

On Mon 14 Jan 08:36 PST 2019, Jeffrey Hugo wrote:

> MSM8998 contains one QUSB2 PHY which is very similar to the existing
> sdm845 support.
> 

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>

> Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org>
> ---
>  drivers/phy/qualcomm/phy-qcom-qusb2.c | 41 +++++++++++++++++++++++++++++++++++
>  1 file changed, 41 insertions(+)
> 
> diff --git a/drivers/phy/qualcomm/phy-qcom-qusb2.c b/drivers/phy/qualcomm/phy-qcom-qusb2.c
> index 9177989f..e5e4f36 100644
> --- a/drivers/phy/qualcomm/phy-qcom-qusb2.c
> +++ b/drivers/phy/qualcomm/phy-qcom-qusb2.c
> @@ -152,6 +152,32 @@ enum qusb2phy_reg_layout {
>  	QUSB2_PHY_INIT_CFG(QUSB2PHY_PLL_PWR_CTRL, 0x00),
>  };
>  
> +static const unsigned int msm8998_regs_layout[] = {
> +	[QUSB2PHY_PLL_CORE_INPUT_OVERRIDE] = 0xa8,
> +	[QUSB2PHY_PLL_STATUS]              = 0x1a0,
> +	[QUSB2PHY_PORT_TUNE1]              = 0x23c,
> +	[QUSB2PHY_PORT_TUNE2]              = 0x240,
> +	[QUSB2PHY_PORT_TUNE3]              = 0x244,
> +	[QUSB2PHY_PORT_TUNE4]              = 0x248,
> +	[QUSB2PHY_PORT_TEST1]              = 0x24c,
> +	[QUSB2PHY_PORT_TEST2]              = 0x250,
> +	[QUSB2PHY_PORT_POWERDOWN]          = 0x210,
> +	[QUSB2PHY_INTR_CTRL]               = 0x22c,
> +};
> +
> +static const struct qusb2_phy_init_tbl msm8998_init_tbl[] = {
> +	QUSB2_PHY_INIT_CFG(QUSB2PHY_PLL_ANALOG_CONTROLS_TWO, 0x13),
> +	QUSB2_PHY_INIT_CFG(QUSB2PHY_PLL_CLOCK_INVERTERS, 0x7c),
> +	QUSB2_PHY_INIT_CFG(QUSB2PHY_PLL_CMODE, 0x80),
> +	QUSB2_PHY_INIT_CFG(QUSB2PHY_PLL_LOCK_DELAY, 0x0a),
> +
> +	QUSB2_PHY_INIT_CFG_L(QUSB2PHY_PORT_TUNE1, 0xa5),
> +	QUSB2_PHY_INIT_CFG_L(QUSB2PHY_PORT_TUNE2, 0x09),
> +
> +	QUSB2_PHY_INIT_CFG(QUSB2PHY_PLL_DIGITAL_TIMERS_TWO, 0x19),
> +};
> +
> +
>  static const unsigned int sdm845_regs_layout[] = {
>  	[QUSB2PHY_PLL_CORE_INPUT_OVERRIDE] = 0xa8,
>  	[QUSB2PHY_PLL_STATUS]		= 0x1a0,
> @@ -221,6 +247,18 @@ struct qusb2_phy_cfg {
>  	.autoresume_en	 = BIT(3),
>  };
>  
> +static const struct qusb2_phy_cfg msm8998_phy_cfg = {
> +	.tbl            = msm8998_init_tbl,
> +	.tbl_num        = ARRAY_SIZE(msm8998_init_tbl),
> +	.regs           = msm8998_regs_layout,
> +
> +	.disable_ctrl   = POWER_DOWN,
> +	.mask_core_ready = CORE_READY_STATUS,
> +	.has_pll_override = true,
> +	.autoresume_en   = BIT(0),
> +	.update_tune1_with_efuse = true,
> +};
> +
>  static const struct qusb2_phy_cfg sdm845_phy_cfg = {
>  	.tbl		= sdm845_init_tbl,
>  	.tbl_num	= ARRAY_SIZE(sdm845_init_tbl),
> @@ -734,6 +772,9 @@ static int qusb2_phy_exit(struct phy *phy)
>  		.compatible	= "qcom,msm8996-qusb2-phy",
>  		.data		= &msm8996_phy_cfg,
>  	}, {
> +		.compatible	= "qcom,msm8998-qusb2-phy",
> +		.data		= &msm8998_phy_cfg,
> +	}, {
>  		.compatible	= "qcom,sdm845-qusb2-phy",
>  		.data		= &sdm845_phy_cfg,
>  	},
> -- 
> Qualcomm Datacenter Technologies as an affiliate of Qualcomm Technologies, Inc.
> Qualcomm Technologies, Inc. is a member of the
> Code Aurora Forum, a Linux Foundation Collaborative Project.
>

  reply	other threads:[~2019-01-15 18:11 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-14 16:36 [PATCH v2 3/6] phy: qcom-qusb2: Add QUSB2 PHY support for msm8998 Jeffrey Hugo
2019-01-14 16:36 ` [v2,3/6] " Jeffrey Hugo
2019-01-15 18:11 ` Bjorn Andersson [this message]
2019-01-15 18:11   ` Bjorn Andersson
2019-01-16  8:50   ` [PATCH v2 3/6] " Kishon Vijay Abraham I
2019-01-16  8:50     ` Kishon Vijay Abraham I
2019-01-16  8:50     ` [v2,3/6] " Kishon Vijay Abraham I
2019-01-16  8:58     ` [PATCH v2 3/6] " Kishon Vijay Abraham I
2019-01-16  8:58       ` Kishon Vijay Abraham I
2019-01-16  8:58       ` [v2,3/6] " Kishon Vijay Abraham I
2019-01-16 15:28       ` [PATCH v2 3/6] " Jeffrey Hugo
2019-01-16 15:28         ` [v2,3/6] " Jeffrey Hugo
2019-01-17 10:52         ` [PATCH v2 3/6] " Kishon Vijay Abraham I
2019-01-17 10:52           ` Kishon Vijay Abraham I
2019-01-17 10:52           ` [v2,3/6] " Kishon Vijay Abraham I
2019-01-17 17:57           ` [PATCH v2 3/6] " Jeffrey Hugo
2019-01-17 17:57             ` [v2,3/6] " Jeffrey Hugo

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=20190115181114.GE28907@builder \
    --to=bjorn.andersson@linaro.org \
    --cc=andy.gross@linaro.org \
    --cc=balbi@kernel.org \
    --cc=david.brown@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jhugo@codeaurora.org \
    --cc=kishon@ti.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@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 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.