All of lore.kernel.org
 help / color / mirror / Atom feed
From: AngeloGioacchino Del Regno  <angelogioacchino.delregno@somainline.org>
To: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: agross@kernel.org, kishon@ti.com, vkoul@kernel.org,
	robh+dt@kernel.org, mgautam@codeaurora.org,
	linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
	devicetree@vger.kernel.org, konrad.dybcio@somainline.org,
	martin.botka@somainline.org, marijn.suijten@somainline.org,
	phone-devel@vger.kernel.org
Subject: Re: [PATCH 1/3] phy: qcom-qusb2: Allow specifying default clock scheme
Date: Thu, 14 Jan 2021 18:57:44 +0100	[thread overview]
Message-ID: <28bb9e1e-909a-1559-af62-bc99b6e960ec@somainline.org> (raw)
In-Reply-To: <YACE+uWidV6xzAwC@builder.lan>

Il 14/01/21 18:52, Bjorn Andersson ha scritto:
> On Thu 14 Jan 11:47 CST 2021, AngeloGioacchino Del Regno wrote:
> 
>> The TCSR's PHY_CLK_SCHEME register is not available on all SoC
>> models, but some may still use a differential reference clock.
>>
>> In preparation for these SoCs, add a se_clk_scheme_default
>> configuration entry and declare it to true for all currently
>> supported SoCs (retaining the previous defaults.
>>
>> This patch brings no functional changes.
>>
> 
> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> 

Thanks!! :)

>> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>
>> ---
>>   drivers/phy/qualcomm/phy-qcom-qusb2.c | 15 +++++++++++++--
>>   1 file changed, 13 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/phy/qualcomm/phy-qcom-qusb2.c b/drivers/phy/qualcomm/phy-qcom-qusb2.c
>> index 109792203baf..8fcfea2a8f1f 100644
>> --- a/drivers/phy/qualcomm/phy-qcom-qusb2.c
>> +++ b/drivers/phy/qualcomm/phy-qcom-qusb2.c
>> @@ -245,6 +245,9 @@ struct qusb2_phy_cfg {
>>   
>>   	/* true if PHY has PLL_CORE_INPUT_OVERRIDE register to reset PLL */
>>   	bool has_pll_override;
>> +
>> +	/* true if PHY default clk scheme is single-ended */
>> +	bool se_clk_scheme_default;
>>   };
>>   
>>   static const struct qusb2_phy_cfg msm8996_phy_cfg = {
>> @@ -253,6 +256,7 @@ static const struct qusb2_phy_cfg msm8996_phy_cfg = {
>>   	.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),
>> @@ -266,6 +270,7 @@ static const struct qusb2_phy_cfg msm8998_phy_cfg = {
>>   	.disable_ctrl   = POWER_DOWN,
>>   	.mask_core_ready = CORE_READY_STATUS,
>>   	.has_pll_override = true,
>> +	.se_clk_scheme_default = true,
>>   	.autoresume_en   = BIT(0),
>>   	.update_tune1_with_efuse = true,
>>   };
>> @@ -279,6 +284,7 @@ static const struct qusb2_phy_cfg qusb2_v2_phy_cfg = {
>>   			   POWER_DOWN),
>>   	.mask_core_ready = CORE_READY_STATUS,
>>   	.has_pll_override = true,
>> +	.se_clk_scheme_default = true,
>>   	.autoresume_en	  = BIT(0),
>>   	.update_tune1_with_efuse = true,
>>   };
>> @@ -701,8 +707,13 @@ static int qusb2_phy_init(struct phy *phy)
>>   	/* Required to get phy pll lock successfully */
>>   	usleep_range(150, 160);
>>   
>> -	/* Default is single-ended clock on msm8996 */
>> -	qphy->has_se_clk_scheme = true;
>> +	/*
>> +	 * Not all the SoCs have got a readable TCSR_PHY_CLK_SCHEME
>> +	 * register in the TCSR so, if there's none, use the default
>> +	 * value hardcoded in the configuration.
>> +	 */
>> +	qphy->has_se_clk_scheme = cfg->se_clk_scheme_default;
>> +
>>   	/*
>>   	 * read TCSR_PHY_CLK_SCHEME register to check if single-ended
>>   	 * clock scheme is selected. If yes, then disable differential
>> -- 
>> 2.29.2
>>


  reply	other threads:[~2021-01-14 17:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-14 17:47 [PATCH 1/3] phy: qcom-qusb2: Allow specifying default clock scheme AngeloGioacchino Del Regno
2021-01-14 17:47 ` [PATCH 2/3] phy: qcom-qusb2: Add configuration for SDM660 AngeloGioacchino Del Regno
2021-01-14 17:53   ` Bjorn Andersson
2021-01-14 17:47 ` [PATCH 3/3] dt-bindings: phy: qcom-qusb2: Document SDM660 compatible AngeloGioacchino Del Regno
2021-01-14 17:53   ` Bjorn Andersson
2021-01-14 17:52 ` [PATCH 1/3] phy: qcom-qusb2: Allow specifying default clock scheme Bjorn Andersson
2021-01-14 17:57   ` AngeloGioacchino Del Regno [this message]
2021-01-19 15:07 ` Vinod Koul
2021-01-19 21:52   ` AngeloGioacchino Del Regno

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=28bb9e1e-909a-1559-af62-bc99b6e960ec@somainline.org \
    --to=angelogioacchino.delregno@somainline.org \
    --cc=agross@kernel.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=kishon@ti.com \
    --cc=konrad.dybcio@somainline.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marijn.suijten@somainline.org \
    --cc=martin.botka@somainline.org \
    --cc=mgautam@codeaurora.org \
    --cc=phone-devel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=vkoul@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.