From: sashiko-bot@kernel.org
To: "Nabige Aala" <nabige.aala@oss.qualcomm.com>
Cc: linux-phy@lists.infradead.org, devicetree@vger.kernel.org,
dri-devel@lists.freedesktop.org, robh@kernel.org,
conor+dt@kernel.org, vkoul@kernel.org, neil.armstrong@linaro.org,
olteanv@gmail.com
Subject: Re: [PATCH v4 09/10] phy: qcom: edp: Generalize power-on path for per-SoC overrides
Date: Thu, 03 Dec 2026 11:03:02 +0000 [thread overview]
Message-ID: <sashiko-outbox-247637@kernel.org> (raw)
In-Reply-To: <20261203-nord-drv-dt-v4-9-a899d23af07a@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [Medium] phy: qcom: edp: TXn_TX_BAND reordered past
com_resetsm_cntrl() on power-on
- [Medium] phy: qcom: edp: qcom_edp_phy_power_on() bypasses per-SoC
TX_DRV_LVL override
--
commit 493d2990280e67ac4cc64c08d1e81b79f34eee25
Author: Ritesh Kumar <ritesh.kumar@oss.qualcomm.com>
phy: qcom: edp: Generalize power-on path for per-SoC overrides
This commit adds tx_res_config(), set_voltages(), and dcc_calibrate()
hooks to phy_ver_ops and moves several PHY register offsets and the
two-lane bias setting into qcom_edp_phy_cfg so newer SoCs can override
parts of the DP/eDP PHY power-on and voltage setup paths.
> diff --git a/drivers/phy/qualcomm/phy-qcom-edp.c b/drivers/phy/qualcomm/phy-qcom-edp.c
> index 5e773843d6e62..46bc9a7797675 100644
> --- a/drivers/phy/qualcomm/phy-qcom-edp.c
> +++ b/drivers/phy/qualcomm/phy-qcom-edp.c
[ ... ]
> @@ -1121,21 +1161,19 @@ static int qcom_edp_phy_power_on(struct phy *phy)
>
> /* TX Lane configuration */
> writel(0x05, edp->edp + DP_PHY_TX0_TX1_LANE_CTL);
> - writel(0x05, edp->edp + DP_PHY_TX2_TX3_LANE_CTL);
> + writel(0x05, edp->edp + edp->cfg->tx2_tx3_lane_ctl);
>
> /* TX-0 register configuration */
> writel(0x03, edp->tx0 + TXn_TRANSCEIVER_BIAS_EN);
> writel(0x0f, edp->tx0 + TXn_CLKBUF_ENABLE);
> writel(0x03, edp->tx0 + TXn_RESET_TSYNC_EN);
> writel(0x01, edp->tx0 + TXn_TRAN_DRVR_EMP_EN);
> - writel(0x04, edp->tx0 + TXn_TX_BAND);
>
> /* TX-1 register configuration */
> writel(0x03, edp->tx1 + TXn_TRANSCEIVER_BIAS_EN);
> writel(0x0f, edp->tx1 + TXn_CLKBUF_ENABLE);
> writel(0x03, edp->tx1 + TXn_RESET_TSYNC_EN);
> writel(0x01, edp->tx1 + TXn_TRAN_DRVR_EMP_EN);
> - writel(0x04, edp->tx1 + TXn_TX_BAND);
>
> ret = qcom_edp_set_vco_div(edp, &pixel_freq);
> if (ret)
[Severity: Medium]
Is it safe to defer the TXn_TX_BAND writes past the PHY reset and
com_resetsm_cntrl()?
Moving TXn_TX_BAND into qcom_edp_tx_res_config_default() reorders it
after qcom_edp_set_vco_div(), the DP_PHY_CFG reset sequence, and
com_resetsm_cntrl() for all existing SoCs.
Sibling QMP DP drivers (qmp_combo_dp_power_on() and
qmp_usbc_dp_power_on()) also program TX_BAND before DP_PHY_CFG and
COM_RESETSM_CNTRL, so deferring it may regress PHY bring-up or link
training on existing platforms.
Keeping TXn_TX_BAND in the pre-reset TX phase via a separate hook or
config field would preserve the existing sequence.
> @@ -1159,13 +1197,9 @@ static int qcom_edp_phy_power_on(struct phy *phy)
> writel(0x00, edp->tx1 + TXn_TX_POL_INV);
> writel(0x10, edp->tx0 + TXn_TX_DRV_LVL_OFFSET);
> writel(0x10, edp->tx1 + TXn_TX_DRV_LVL_OFFSET);
> - writel(0x11, edp->tx0 + TXn_RES_CODE_LANE_OFFSET_TX0);
> - writel(0x11, edp->tx0 + TXn_RES_CODE_LANE_OFFSET_TX1);
> - writel(0x11, edp->tx1 + TXn_RES_CODE_LANE_OFFSET_TX0);
> - writel(0x11, edp->tx1 + TXn_RES_CODE_LANE_OFFSET_TX1);
> -
> - writel(0x10, edp->tx0 + TXn_TX_EMP_POST1_LVL);
> - writel(0x10, edp->tx1 + TXn_TX_EMP_POST1_LVL);
> + ret = edp->cfg->ver_ops->tx_res_config(edp);
> + if (ret)
> + return ret;
> writel(0x1f, edp->tx0 + TXn_TX_DRV_LVL);
> writel(0x1f, edp->tx1 + TXn_TX_DRV_LVL);
[Severity: Medium]
Should the TXn_TX_DRV_LVL writes also move into
qcom_edp_tx_res_config_default()?
Leaving these hardcoded writes in qcom_edp_phy_power_on() bypasses the
per-SoC hooks on platforms with relocated TX drive-level registers.
In commit "phy: qcom: edp: Add Nord DP PHY support", Nord initializes
DP_PHY_TX_LN0_DRV_LVL_NORD and DP_PHY_TX_LN1_DRV_LVL_NORD to 0x12 in
qcom_edp_tx_res_config_nord() and overrides set_voltages(), yet
qcom_edp_phy_power_on() still writes 0x1f to TXn_TX_DRV_LVL on tx0/tx1.
On Nord, those writes either hit a repurposed register in the tx0/tx1
blocks or leave a legacy drive-level register stuck at 0x1f instead of
0x12. Moving these writes into qcom_edp_tx_res_config_default()
alongside TXn_TX_EMP_POST1_LVL would keep the power-on path consistent.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261203-nord-drv-dt-v4-0-a899d23af07a@oss.qualcomm.com?part=9
WARNING: multiple messages have this Message-ID (diff)
From: sashiko-bot@kernel.org
To: "Nabige Aala" <nabige.aala@oss.qualcomm.com>
Cc: linux-phy@lists.infradead.org, devicetree@vger.kernel.org,
dri-devel@lists.freedesktop.org, robh@kernel.org,
conor+dt@kernel.org, vkoul@kernel.org, neil.armstrong@linaro.org,
olteanv@gmail.com
Subject: Re: [PATCH v4 09/10] phy: qcom: edp: Generalize power-on path for per-SoC overrides
Date: Thu, 03 Dec 2026 11:03:02 +0000 [thread overview]
Message-ID: <sashiko-outbox-247637@kernel.org> (raw)
In-Reply-To: <20261203-nord-drv-dt-v4-9-a899d23af07a@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [Medium] phy: qcom: edp: TXn_TX_BAND reordered past
com_resetsm_cntrl() on power-on
- [Medium] phy: qcom: edp: qcom_edp_phy_power_on() bypasses per-SoC
TX_DRV_LVL override
--
commit 493d2990280e67ac4cc64c08d1e81b79f34eee25
Author: Ritesh Kumar <ritesh.kumar@oss.qualcomm.com>
phy: qcom: edp: Generalize power-on path for per-SoC overrides
This commit adds tx_res_config(), set_voltages(), and dcc_calibrate()
hooks to phy_ver_ops and moves several PHY register offsets and the
two-lane bias setting into qcom_edp_phy_cfg so newer SoCs can override
parts of the DP/eDP PHY power-on and voltage setup paths.
> diff --git a/drivers/phy/qualcomm/phy-qcom-edp.c b/drivers/phy/qualcomm/phy-qcom-edp.c
> index 5e773843d6e62..46bc9a7797675 100644
> --- a/drivers/phy/qualcomm/phy-qcom-edp.c
> +++ b/drivers/phy/qualcomm/phy-qcom-edp.c
[ ... ]
> @@ -1121,21 +1161,19 @@ static int qcom_edp_phy_power_on(struct phy *phy)
>
> /* TX Lane configuration */
> writel(0x05, edp->edp + DP_PHY_TX0_TX1_LANE_CTL);
> - writel(0x05, edp->edp + DP_PHY_TX2_TX3_LANE_CTL);
> + writel(0x05, edp->edp + edp->cfg->tx2_tx3_lane_ctl);
>
> /* TX-0 register configuration */
> writel(0x03, edp->tx0 + TXn_TRANSCEIVER_BIAS_EN);
> writel(0x0f, edp->tx0 + TXn_CLKBUF_ENABLE);
> writel(0x03, edp->tx0 + TXn_RESET_TSYNC_EN);
> writel(0x01, edp->tx0 + TXn_TRAN_DRVR_EMP_EN);
> - writel(0x04, edp->tx0 + TXn_TX_BAND);
>
> /* TX-1 register configuration */
> writel(0x03, edp->tx1 + TXn_TRANSCEIVER_BIAS_EN);
> writel(0x0f, edp->tx1 + TXn_CLKBUF_ENABLE);
> writel(0x03, edp->tx1 + TXn_RESET_TSYNC_EN);
> writel(0x01, edp->tx1 + TXn_TRAN_DRVR_EMP_EN);
> - writel(0x04, edp->tx1 + TXn_TX_BAND);
>
> ret = qcom_edp_set_vco_div(edp, &pixel_freq);
> if (ret)
[Severity: Medium]
Is it safe to defer the TXn_TX_BAND writes past the PHY reset and
com_resetsm_cntrl()?
Moving TXn_TX_BAND into qcom_edp_tx_res_config_default() reorders it
after qcom_edp_set_vco_div(), the DP_PHY_CFG reset sequence, and
com_resetsm_cntrl() for all existing SoCs.
Sibling QMP DP drivers (qmp_combo_dp_power_on() and
qmp_usbc_dp_power_on()) also program TX_BAND before DP_PHY_CFG and
COM_RESETSM_CNTRL, so deferring it may regress PHY bring-up or link
training on existing platforms.
Keeping TXn_TX_BAND in the pre-reset TX phase via a separate hook or
config field would preserve the existing sequence.
> @@ -1159,13 +1197,9 @@ static int qcom_edp_phy_power_on(struct phy *phy)
> writel(0x00, edp->tx1 + TXn_TX_POL_INV);
> writel(0x10, edp->tx0 + TXn_TX_DRV_LVL_OFFSET);
> writel(0x10, edp->tx1 + TXn_TX_DRV_LVL_OFFSET);
> - writel(0x11, edp->tx0 + TXn_RES_CODE_LANE_OFFSET_TX0);
> - writel(0x11, edp->tx0 + TXn_RES_CODE_LANE_OFFSET_TX1);
> - writel(0x11, edp->tx1 + TXn_RES_CODE_LANE_OFFSET_TX0);
> - writel(0x11, edp->tx1 + TXn_RES_CODE_LANE_OFFSET_TX1);
> -
> - writel(0x10, edp->tx0 + TXn_TX_EMP_POST1_LVL);
> - writel(0x10, edp->tx1 + TXn_TX_EMP_POST1_LVL);
> + ret = edp->cfg->ver_ops->tx_res_config(edp);
> + if (ret)
> + return ret;
> writel(0x1f, edp->tx0 + TXn_TX_DRV_LVL);
> writel(0x1f, edp->tx1 + TXn_TX_DRV_LVL);
[Severity: Medium]
Should the TXn_TX_DRV_LVL writes also move into
qcom_edp_tx_res_config_default()?
Leaving these hardcoded writes in qcom_edp_phy_power_on() bypasses the
per-SoC hooks on platforms with relocated TX drive-level registers.
In commit "phy: qcom: edp: Add Nord DP PHY support", Nord initializes
DP_PHY_TX_LN0_DRV_LVL_NORD and DP_PHY_TX_LN1_DRV_LVL_NORD to 0x12 in
qcom_edp_tx_res_config_nord() and overrides set_voltages(), yet
qcom_edp_phy_power_on() still writes 0x1f to TXn_TX_DRV_LVL on tx0/tx1.
On Nord, those writes either hit a repurposed register in the tx0/tx1
blocks or leave a legacy drive-level register stuck at 0x1f instead of
0x12. Moving these writes into qcom_edp_tx_res_config_default()
alongside TXn_TX_EMP_POST1_LVL would keep the power-on path consistent.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261203-nord-drv-dt-v4-0-a899d23af07a@oss.qualcomm.com?part=9
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
next prev parent reply other threads:[~2026-12-03 11:03 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-03 10:36 [PATCH v4 00/10] Add Qualcomm Nord display and eDP PHY support Nabige Aala
2026-12-03 10:36 ` Nabige Aala
2026-12-03 10:36 ` [PATCH v4 01/10] dt-bindings: phy: qcom,edp-phy: Add DP PHY compatible for Nord Nabige Aala
2026-12-03 10:36 ` Nabige Aala
2026-12-03 10:36 ` [PATCH v4 02/10] dt-bindings: display: msm: dp-controller: Document Nord DisplayPort Controller Nabige Aala
2026-12-03 10:36 ` Nabige Aala
2026-12-03 14:25 ` Krzysztof Kozlowski
2026-12-03 14:25 ` Krzysztof Kozlowski
2026-12-03 10:36 ` [PATCH v4 03/10] dt-bindings: display/msm: Document Nord MDSS Nabige Aala
2026-12-03 10:36 ` Nabige Aala
2026-12-03 10:55 ` sashiko-bot
2026-12-03 10:55 ` sashiko-bot
2026-12-03 14:27 ` Krzysztof Kozlowski
2026-12-03 14:27 ` Krzysztof Kozlowski
2026-12-03 10:36 ` [PATCH v4 04/10] dt-bindings: display/msm: qcom,sm8650-dpu: Add Qualcomm Nord Soc Nabige Aala
2026-12-03 10:36 ` Nabige Aala
2026-12-03 10:47 ` sashiko-bot
2026-12-03 10:47 ` sashiko-bot
2026-12-03 10:36 ` [PATCH v4 05/10] drm/msm/dpu: Add missing INTF_9/INTF_10 interrupts Nabige Aala
2026-12-03 10:36 ` Nabige Aala
2026-12-03 10:50 ` sashiko-bot
2026-12-03 10:50 ` sashiko-bot
2026-12-03 10:36 ` [PATCH v4 06/10] drm/msm/dpu: Add support for DPU 12.1 on Nord Nabige Aala
2026-12-03 10:36 ` Nabige Aala
2026-12-03 10:59 ` sashiko-bot
2026-12-03 10:59 ` sashiko-bot
2026-12-03 10:36 ` [PATCH v4 07/10] drm/msm: mdss: Add support for MDSS " Nabige Aala
2026-12-03 10:36 ` Nabige Aala
2026-12-03 10:53 ` sashiko-bot
2026-12-03 10:53 ` sashiko-bot
2026-12-03 10:36 ` [PATCH v4 08/10] drm/msm/dp: Add support for DP controllers " Nabige Aala
2026-12-03 10:36 ` Nabige Aala
2026-12-03 10:54 ` sashiko-bot
2026-12-03 10:54 ` sashiko-bot
2026-12-03 10:36 ` [PATCH v4 09/10] phy: qcom: edp: Generalize power-on path for per-SoC overrides Nabige Aala
2026-12-03 10:36 ` Nabige Aala
2026-12-03 11:03 ` sashiko-bot [this message]
2026-12-03 11:03 ` sashiko-bot
2026-12-03 10:36 ` [PATCH v4 10/10] phy: qcom: edp: Add Nord DP PHY support Nabige Aala
2026-12-03 10:36 ` Nabige Aala
2026-12-03 11:06 ` sashiko-bot
2026-12-03 11:06 ` sashiko-bot
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=sashiko-outbox-247637@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-phy@lists.infradead.org \
--cc=nabige.aala@oss.qualcomm.com \
--cc=neil.armstrong@linaro.org \
--cc=olteanv@gmail.com \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--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.