From: Xiangxu Yin <xiangxu.yin@oss.qualcomm.com>
To: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Cc: Vinod Koul <vkoul@kernel.org>,
Kishon Vijay Abraham I <kishon@kernel.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Rob Clark <robin.clark@oss.qualcomm.com>,
Dmitry Baryshkov <lumag@kernel.org>,
Abhinav Kumar <abhinav.kumar@linux.dev>,
Jessica Zhang <jessica.zhang@oss.qualcomm.com>,
Sean Paul <sean@poorly.run>,
Marijn Suijten <marijn.suijten@somainline.org>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org,
fange.zhang@oss.qualcomm.com, yongxing.mou@oss.qualcomm.com,
li.liu@oss.qualcomm.com, Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>
Subject: Re: [PATCH v5 12/14] phy: qcom: qmp-usbc: Add QCS615 USB/DP PHY config and DP mode support
Date: Mon, 22 Sep 2025 19:24:45 +0800 [thread overview]
Message-ID: <f4a5ffad-ca5e-4a54-a39b-4ed69ab3a729@oss.qualcomm.com> (raw)
In-Reply-To: <2ewxoe76rrii4w3n5b6wl32vmatcp2boj75o65cuq5nx4f2a55@7cn6m7oxzu6c>
On 9/22/2025 5:45 PM, Dmitry Baryshkov wrote:
> On Mon, Sep 22, 2025 at 02:58:17PM +0800, Xiangxu Yin wrote:
>> On 9/20/2025 2:41 AM, Dmitry Baryshkov wrote:
>>> On Fri, Sep 19, 2025 at 10:24:29PM +0800, Xiangxu Yin wrote:
>>>> Add QCS615-specific configuration for USB/DP PHY, including DP init
>>>> routines, voltage swing tables, and platform data. Add compatible
>>>> "qcs615-qmp-usb3-dp-phy".
>>>>
>>>> Signed-off-by: Xiangxu Yin <xiangxu.yin@oss.qualcomm.com>
>>>> ---
>>>> drivers/phy/qualcomm/phy-qcom-qmp-usbc.c | 395 +++++++++++++++++++++++++++++++
>>>> 1 file changed, 395 insertions(+)
>>>>
>>>> +
>>>> + writel(0x3f, qmp->dp_tx + QSERDES_V2_TX_TRANSCEIVER_BIAS_EN);
>>>> + writel(0x10, qmp->dp_tx + QSERDES_V2_TX_HIGHZ_DRVR_EN);
>>>> + writel(0x0a, qmp->dp_tx + QSERDES_V2_TX_TX_POL_INV);
>>>> + writel(0x3f, qmp->dp_tx2 + QSERDES_V2_TX_TRANSCEIVER_BIAS_EN);
>>>> + writel(0x10, qmp->dp_tx2 + QSERDES_V2_TX_HIGHZ_DRVR_EN);
>>>> + writel(0x0a, qmp->dp_tx2 + QSERDES_V2_TX_TX_POL_INV);
>>> Are you sure that these don't need to be adjusted based on
>>> qmp->orientation or selected lanes count?
>>>
>>> In fact... I don't see orientation handling for DP at all. Don't we need
>>> it?
>>
>> Thanks for the review.
>>
>> I agree with your reasoning and compared talos 14nm HPG with hana/kona
>> 7nm PHY HPG; the 7nm COMBO PHY series has orientation/lane-count dependent
>> configs, but the 14nm PHY series does not. On QCS615 (talos), the TX_*
>> registers you pointed to are programmed with constant values regardless
>> of orientation or lane count. This has been confirmed from both the HPG
>> and the downstream reference driver.
> Thanks for the confirmation.
>
>> For orientation, from reference the only difference is DP_PHY_MODE, which
>> is set by qmp_usbc_configure_dp_mode(). The DP PHY does have an
>> SW_PORTSELECT-related register, but due to talos lane mapping from the
>> DP controller to the PHY not being the standard <0 1 2 3> sequence, it
>> cannot reliably handle orientation flip. Also, QCS615 is a fixed-
>> orientation platform (not DP-over-TypeC), so there is no validated hardware
>> path for orientation flip on this platform.
> Wait... I thought that the the non-standard lane order is handled by the
> DP driver, then we should be able to handle the orientation inside PHY
> driver as usual.
Yes, I have confirmed this with our verification team.
For the non-standard lane order, handling flip requires swapping mapped
lane 0 ↔ lane 3 and lane 1 ↔ lane 2 in the logical2physical mapping.
This is a hardware limitation, and with the current PHY driver we cannot
propagate orientation status to dp_ctrl for processing.
> Anyway, please add a FIXME comment into the source file and a note to
> the commit message that SW_PORTSELECT should be handled, but it's not a
> part of this patch for the stated reasons.
OK, I will add a |FIXME| comment in |qmp_usbc_dp_power_on| and update the
related commit message.
>>
>>>> +
>>>> + writel(0x18, qmp->dp_dp_phy + QSERDES_DP_PHY_CFG);
>>>> + writel(0x19, qmp->dp_dp_phy + QSERDES_DP_PHY_CFG);
>>>> +
>>>> + if (readl_poll_timeout(qmp->dp_dp_phy + QSERDES_V2_DP_PHY_STATUS,
>>>> + status,
>>>> + ((status & BIT(1)) > 0),
>>>> + 500,
>>>> + 10000)){
>>>> + dev_err(qmp->dev, "PHY_READY not ready\n");
>>>> + return -ETIMEDOUT;
>>>> + }
>>>> +
>>>> + return 0;
>>>> +}
>>>> +
next prev parent reply other threads:[~2025-09-22 11:24 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-19 14:24 [PATCH v5 00/14] Add DisplayPort support for QCS615 platform Xiangxu Yin
2025-09-19 14:24 ` [PATCH v5 01/14] dt-bindings: phy: Add QMP USB3+DP PHY for QCS615 Xiangxu Yin
2025-09-22 19:57 ` Rob Herring (Arm)
2025-09-19 14:24 ` [PATCH v5 02/14] phy: qcom: qmp-usbc: Rename USB-specific ops to prepare for DP support Xiangxu Yin
2025-09-19 14:24 ` [PATCH v5 03/14] phy: qcom: qmp-usbc: Add DP-related fields for USB/DP switchable PHY Xiangxu Yin
2025-09-19 14:24 ` [PATCH v5 04/14] phy: qcom: qmp-usbc: Add regulator init_load support Xiangxu Yin
2025-09-19 14:24 ` [PATCH v5 05/14] phy: qcom: qmp-usbc: Move reset config into PHY cfg Xiangxu Yin
2025-09-19 16:45 ` Dmitry Baryshkov
2025-09-22 8:04 ` Xiangxu Yin
2025-09-22 9:40 ` Dmitry Baryshkov
2025-09-22 10:38 ` Xiangxu Yin
2025-09-22 9:39 ` Dmitry Baryshkov
2025-09-22 10:39 ` Xiangxu Yin
2025-09-19 14:24 ` [PATCH v5 06/14] phy: qcom: qmp-usbc: Add USB/DP switchable PHY clk register Xiangxu Yin
2025-09-19 16:46 ` Dmitry Baryshkov
2025-09-22 8:26 ` Xiangxu Yin
2025-09-22 9:40 ` Dmitry Baryshkov
2025-09-19 14:24 ` [PATCH v5 07/14] phy: qcom: qmp-usbc: Move USB-only init to usb_power_on Xiangxu Yin
2025-09-19 18:48 ` Dmitry Baryshkov
2025-09-22 11:33 ` Xiangxu Yin
2025-09-19 14:24 ` [PATCH v5 08/14] phy: qcom: qmp-usbc: Add TCSR parsing and PHY mode setting Xiangxu Yin
2025-09-19 18:29 ` Dmitry Baryshkov
2025-09-19 14:24 ` [PATCH v5 09/14] phy: qcom: qmp-usbc: Add DP PHY ops for USB/DP switchable Type-C PHYs Xiangxu Yin
2025-09-19 18:42 ` Dmitry Baryshkov
2025-09-19 14:24 ` [PATCH v5 10/14] phy: qcom: qmp-usbc: Add USB/DP exclude handling Xiangxu Yin
2025-09-19 14:24 ` [PATCH v5 11/14] phy: qcom: qmp: Add DP v2 PHY register definitions Xiangxu Yin
2025-09-19 18:42 ` Dmitry Baryshkov
2025-09-19 14:24 ` [PATCH v5 12/14] phy: qcom: qmp-usbc: Add QCS615 USB/DP PHY config and DP mode support Xiangxu Yin
2025-09-19 18:41 ` Dmitry Baryshkov
2025-09-22 6:58 ` Xiangxu Yin
2025-09-22 9:45 ` Dmitry Baryshkov
2025-09-22 11:24 ` Xiangxu Yin [this message]
2025-09-22 11:28 ` Xiangxu Yin
2025-09-22 23:38 ` Dmitry Baryshkov
2025-09-23 3:48 ` Xiangxu Yin
2025-09-19 14:24 ` [PATCH v5 13/14] drm/msm/dp: move link-specific parsing from dp_panel to dp_link Xiangxu Yin
2025-09-19 14:24 ` [PATCH v5 14/14] drm/msm/dp: Add support for lane mapping configuration Xiangxu Yin
2025-09-19 18:35 ` Dmitry Baryshkov
2025-09-22 3:23 ` Xiangxu Yin
2025-09-22 15:13 ` Rob Clark
2025-09-22 23:39 ` Dmitry Baryshkov
2025-09-23 3:38 ` Xiangxu Yin
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=f4a5ffad-ca5e-4a54-a39b-4ed69ab3a729@oss.qualcomm.com \
--to=xiangxu.yin@oss.qualcomm.com \
--cc=abhinav.kumar@linux.dev \
--cc=airlied@gmail.com \
--cc=andersson@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.baryshkov@oss.qualcomm.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=fange.zhang@oss.qualcomm.com \
--cc=freedreno@lists.freedesktop.org \
--cc=jessica.zhang@oss.qualcomm.com \
--cc=kishon@kernel.org \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=li.liu@oss.qualcomm.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=lumag@kernel.org \
--cc=marijn.suijten@somainline.org \
--cc=robh@kernel.org \
--cc=robin.clark@oss.qualcomm.com \
--cc=sean@poorly.run \
--cc=simona@ffwll.ch \
--cc=vkoul@kernel.org \
--cc=yongxing.mou@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®