From: Konrad Dybcio <konrad.dybcio@linaro.org>
To: Johan Hovold <johan@kernel.org>,
Bjorn Andersson <quic_bjorande@quicinc.com>
Cc: Vinod Koul <vkoul@kernel.org>, Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
Abhinav Kumar <quic_abhinavk@quicinc.com>,
quic_jesszhan@quicinc.com
Subject: Re: [PATCH 4/5] phy: qcom: edp: Introduce support for DisplayPort
Date: Mon, 2 Oct 2023 11:51:17 +0200 [thread overview]
Message-ID: <5f3c8a66-aba3-cef0-8df9-f897487f1098@linaro.org> (raw)
In-Reply-To: <ZRqIHSetajQf7Um1@hovoldconsulting.com>
On 10/2/23 11:06, Johan Hovold wrote:
> On Tue, Aug 09, 2022 at 09:07:44PM -0700, Bjorn Andersson wrote:
>> The eDP phy can be used to drive either eDP or DP output, with some
>> minor variations in some of the configuration and seemingly a need for
>> implementing swing and pre_emphasis calibration.
>>
>> Introduce a config object, indicating if the phy is operating in eDP or
>> DP mode and swing/pre-emphasis calibration to support this.
>>
>> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
>> ---
>> drivers/phy/qualcomm/phy-qcom-edp.c | 80 +++++++++++++++++++++++++++--
>> 1 file changed, 76 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/phy/qualcomm/phy-qcom-edp.c b/drivers/phy/qualcomm/phy-qcom-edp.c
>> index 32614fb838b5..301ac422d2fe 100644
>> --- a/drivers/phy/qualcomm/phy-qcom-edp.c
>> +++ b/drivers/phy/qualcomm/phy-qcom-edp.c
>> @@ -70,8 +70,19 @@
>>
>> #define TXn_TRAN_DRVR_EMP_EN 0x0078
>>
>> +struct qcom_edp_cfg {
>> + bool is_dp;
>> +
>> + /* DP PHY swing and pre_emphasis tables */
>> + const u8 (*swing_hbr_rbr)[4][4];
>> + const u8 (*swing_hbr3_hbr2)[4][4];
>> + const u8 (*pre_emphasis_hbr_rbr)[4][4];
>> + const u8 (*pre_emphasis_hbr3_hbr2)[4][4];
>> +};
>
>> static int qcom_edp_configure_ssc(const struct qcom_edp *edp)
>> @@ -315,7 +381,9 @@ static int qcom_edp_set_vco_div(const struct qcom_edp *edp)
>> static int qcom_edp_phy_power_on(struct phy *phy)
>> {
>> const struct qcom_edp *edp = phy_get_drvdata(phy);
>> + const struct qcom_edp_cfg *cfg = edp->cfg;
>> u32 bias0_en, drvr0_en, bias1_en, drvr1_en;
>> + u8 ldo_config;
>> int timeout;
>> int ret;
>> u32 val;
>> @@ -332,8 +400,11 @@ static int qcom_edp_phy_power_on(struct phy *phy)
>> if (timeout)
>> return timeout;
>>
>> - writel(0x01, edp->tx0 + TXn_LDO_CONFIG);
>> - writel(0x01, edp->tx1 + TXn_LDO_CONFIG);
>> +
>> + ldo_config = (cfg && cfg->is_dp) ? 0x1 : 0x0;
>> +
>> + writel(ldo_config, edp->tx0 + TXn_LDO_CONFIG);
>> + writel(ldo_config, edp->tx1 + TXn_LDO_CONFIG);
>
> When reviewing a patch from Konrad which will start using the eDP
> configuration on the X13s, I noticed that this patch inverted these bits
> for older SoCs (e.g. sc7280 and sc8180xp). They used to be set to 1,
> but after this patch they will be set to 0.
>
> Was that intentional even if it was never mentioned in the commit
> message? Or was it a mistake that should be fixed?
+Abhinav, Jessica
Konrad
next prev parent reply other threads:[~2023-10-02 9:51 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-10 4:07 [PATCH 0/5] phy: qcom: edp: Introduce SC8280XP support Bjorn Andersson
2022-08-10 4:07 ` [PATCH 1/5] dt-bindings: phy: qcom-edp: Add SC8280XP PHY compatibles Bjorn Andersson
2022-08-10 14:48 ` Krzysztof Kozlowski
2022-08-10 4:07 ` [PATCH 2/5] phy: qcom: edp: Generate unique clock names Bjorn Andersson
2022-08-10 4:07 ` [PATCH 3/5] phy: qcom: edp: Perform lane configuration Bjorn Andersson
2022-08-10 4:07 ` [PATCH 4/5] phy: qcom: edp: Introduce support for DisplayPort Bjorn Andersson
2023-10-02 9:06 ` Johan Hovold
2023-10-02 9:51 ` Konrad Dybcio [this message]
2022-08-10 4:07 ` [PATCH 5/5] phy: qcom: edp: Add SC8280XP eDP and DP PHYs Bjorn Andersson
2022-08-30 5:31 ` [PATCH 0/5] phy: qcom: edp: Introduce SC8280XP support Vinod Koul
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=5f3c8a66-aba3-cef0-8df9-f897487f1098@linaro.org \
--to=konrad.dybcio@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=johan@kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=quic_abhinavk@quicinc.com \
--cc=quic_bjorande@quicinc.com \
--cc=quic_jesszhan@quicinc.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).