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 10/10] phy: qcom: edp: Add Nord DP PHY support
Date: Thu, 03 Dec 2026 11:06:31 +0000 [thread overview]
Message-ID: <sashiko-outbox-247644@kernel.org> (raw)
In-Reply-To: <20261203-nord-drv-dt-v4-10-a899d23af07a@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 3 potential
issues to consider:
- [Medium] phy: qcom: edp: qcom_edp_dcc_calibrate_nord() polls all lanes
in 1-lane mode
- [Low] phy: qcom: edp: duplicate v6/v8 code and misplaced Nord
definitions
- [Low] phy: qcom: edp: extra AUX/DRV_LVL writes in
qcom_edp_tx_res_config_nord()
--
commit a5802c72f11d33fa941a827664efb57ba7c55383
Author: Ritesh Kumar <ritesh.kumar@oss.qualcomm.com>
phy: qcom: edp: Add Nord DP PHY support
This commit adds DisplayPort PHY support for the Qualcomm Nord SoC,
reusing the v6 QSERDES COM register layout and making com_ldo_config
optional in struct phy_ver_ops.
> diff --git a/drivers/phy/qualcomm/phy-qcom-edp.c b/drivers/phy/qualcomm/phy-qcom-edp.c
> index 46bc9a7797675..77e8a92c1bc67 100644
> --- a/drivers/phy/qualcomm/phy-qcom-edp.c
> +++ b/drivers/phy/qualcomm/phy-qcom-edp.c
[ ... ]
> @@ -1521,6 +1525,299 @@ static int qcom_edp_phy_probe(struct platform_device *pdev)
[ ... ]
> +static int qcom_edp_tx_res_config_nord(const struct qcom_edp *edp)
> +{
> + u32 aux_cfg2;
> + u32 tx_band;
> +
> + if (edp->dp_opts.link_rate == 8100) {
> + aux_cfg2 = 0xa0;
> + tx_band = 0x07;
> + } else {
> + aux_cfg2 = 0xa4;
> + tx_band = 0x05;
> + }
> +
> + writel(aux_cfg2, edp->edp + DP_PHY_AUX_CFG(2));
> + writel(0x06, edp->tx0 + TXn_RES_CODE_LANE_OFFSET_TX0);
> + writel(0x06, edp->tx0 + TXn_RES_CODE_LANE_OFFSET_TX1);
> + writel(0x06, edp->tx1 + TXn_RES_CODE_LANE_OFFSET_TX0);
> + writel(0x06, edp->tx1 + TXn_RES_CODE_LANE_OFFSET_TX1);
> + writel(0x06, edp->tx0 + TXn_TX_EMP_POST1_LVL);
> + writel(0x06, edp->tx1 + TXn_TX_EMP_POST1_LVL);
> + writel(tx_band, edp->tx0 + TXn_TX_BAND_NORD);
> + writel(tx_band, edp->tx1 + TXn_TX_BAND_NORD);
> + writel(0x12, edp->edp + DP_PHY_TX_LN0_DRV_LVL_NORD);
> + writel(0x12, edp->edp + DP_PHY_TX_LN1_DRV_LVL_NORD);
> +
> + return 0;
> +}
[Severity: Low]
As reported by Dmitry Baryshkov on v2 [1], should
qcom_edp_tx_res_config_nord() be reprogramming DP_PHY_AUX_CFG(2) and
DP_PHY_TX_LN0/1_DRV_LVL_NORD inside tx_res_config()?
qcom_edp_tx_res_config_default() only configures TXn_TX_BAND,
TXn_RES_CODE_LANE_OFFSET_TX0/1, and TXn_TX_EMP_POST1_LVL, leaving the
initial drive-level writes to TXn_TX_DRV_LVL hardcoded in
qcom_edp_phy_power_on(). Because of that, qcom_edp_phy_power_on() still
unconditionally writes 0x1f to edp->tx0/tx1 + TXn_TX_DRV_LVL on Nord right
after tx_res_config() returns, even though Nord relocates drive-level
control to DP_PHY_TX_LN0/1_DRV_LVL_NORD.
Moving the initial TXn_TX_DRV_LVL writes into
qcom_edp_tx_res_config_default() and keeping DP_PHY_AUX_CFG(2) outside
tx_res_config() would avoid those legacy writes on Nord and keep the
callback symmetric across SoCs.
[ ... ]
> +static int qcom_edp_dcc_calibrate_nord(const struct qcom_edp *edp)
> +{
> + u32 tx0_done = 0;
> + u32 tx1_done = 0;
> + int tx0_ret;
> + int tx1_ret;
> +
> + writel(0x07, edp->tx0 + TXn_DCC0_CTRL_NORD);
> + writel(0x07, edp->tx0 + TXn_DCC1_CTRL_NORD);
> + writel(0x07, edp->tx1 + TXn_DCC0_CTRL_NORD);
> + writel(0x07, edp->tx1 + TXn_DCC1_CTRL_NORD);
> +
> + usleep_range(200, 250);
> +
> + tx0_ret = readl_poll_timeout(edp->tx0 + TXn_DCC_DONE_NORD, tx0_done,
> + (tx0_done & 0x03) == 0x03, 50, 10000);
> + tx1_ret = readl_poll_timeout(edp->tx1 + TXn_DCC_DONE_NORD, tx1_done,
> + (tx1_done & 0x03) == 0x03, 50, 10000);
> +
> + qcom_edp_dcc_disable_nord(edp);
> +
> + return tx0_ret ?: tx1_ret;
> +}
[Severity: Medium]
Can qcom_edp_dcc_calibrate_nord() time out in 1-lane mode?
nord_edp_phy_cfg sets .bias1_en_2lane = 0x03 to keep TX1 transceiver bias
enabled in 2-lane mode, but in 1-lane mode qcom_edp_phy_power_on() still
hardcodes bias0_en = 0x01 and bias1_en = 0x00 right before calling
dcc_calibrate(). Yet qcom_edp_dcc_calibrate_nord() enables DCC and polls
both sub-lanes of tx0 and tx1 regardless of edp->dp_opts.lanes.
With a 1-lane sink or after lane down-shift via
msm_dp_ctrl_link_lane_down_shift() -> msm_dp_ctrl_enable_mainlink_clocks(),
TX0 lane 1 and both TX1 lanes are unbiased during calibration. If DCC
completion depends on transceiver bias, qcom_edp_phy_power_on() returns
-ETIMEDOUT, skipping clk_set_rate() for the link and pixel clocks while
msm_dp_ctrl_enable_mainlink_clocks() ignores the error and breaks 1-lane
bring-up.
Separately, if tx0_ret already timed out, polling tx1 still waits up to
another 10 ms before discarding tx1_ret. Either gating DCC enablement and
polling on edp->dp_opts.lanes (or biasing all calibrated lanes in 1-lane
mode) and skipping the tx1 poll on tx0_ret failure would address this.
[ ... ]
> +static int qcom_edp_phy_com_resetsm_cntrl_nord(const struct qcom_edp *edp)
> +{
> + u32 val;
> +
> + writel(0x20, edp->pll + QSERDES_V6_COM_RESETSM_CNTRL);
> +
> + return readl_poll_timeout(edp->pll + QSERDES_V6_COM_C_READY_STATUS,
> + val, val & BIT(0), 500, 10000);
> +}
[ ... ]
> +static const struct phy_ver_ops qcom_edp_phy_ops_nord = {
> + .com_power_on = qcom_edp_phy_power_on_nord,
> + .com_resetsm_cntrl = qcom_edp_phy_com_resetsm_cntrl_nord,
> + .com_bias_en_clkbuflr = qcom_edp_com_bias_en_clkbuflr_v8,
> + .com_clk_fwd_cfg = qcom_edp_com_clk_fwd_cfg_v4,
> + .com_configure_pll = qcom_edp_com_configure_pll_nord,
> + .com_configure_ssc = qcom_edp_com_configure_ssc_nord,
> + .tx_res_config = qcom_edp_tx_res_config_nord,
> + .set_voltages = qcom_edp_set_voltages_nord,
> + .dcc_calibrate = qcom_edp_dcc_calibrate_nord,
> +};
[ ... ]
> { .compatible = "qcom,x1e80100-dp-phy", .data = &x1e80100_phy_cfg, },
> + { .compatible = "qcom,nord-dp-phy", .data = &nord_edp_phy_cfg, },
> { }
> };
[Severity: Low]
As reported by Dmitry Baryshkov on v1 [2], can qcom_edp_phy_ops_nord reuse
the existing v6/v8 definitions instead of duplicating them?
qcom_edp_phy_com_resetsm_cntrl_nord() is an exact duplicate of
qcom_edp_phy_com_resetsm_cntrl_v6(), and edp_phy_vco_div_cfg_nord is an
exact duplicate of edp_phy_vco_div_cfg_v8. In addition,
qcom_edp_phy_ops_nord assigns qcom_edp_com_bias_en_clkbuflr_v8 instead of
qcom_edp_com_bias_en_clkbuflr_v6 even though Nord uses the
QSERDES_V6_COM_* register layout everywhere else.
Also, placing the Nord macros, tables, callbacks, ops, and config structs
after qcom_edp_phy_probe() differs from the other SoCs defined earlier in
the file, and qcom,nord-dp-phy is out of alphabetical order in
qcom_edp_phy_match_table[].
[1] https://lore.kernel.org/r/qqfucmyebsvemdr5px33wabsxxq4owozwmxcqu62sprs5k32bo@kb5pjx2m4ucq
[2] https://lore.kernel.org/r/53h45tzuwxcpa3dgto5jcpc74hpeifzuhdjwvwlgsbvkxaxlcg@p2p5rciv3e2g
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261203-nord-drv-dt-v4-0-a899d23af07a@oss.qualcomm.com?part=10
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
prev parent reply other threads:[~2026-12-03 11:06 UTC|newest]
Thread overview: 19+ 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 ` [PATCH v4 01/10] dt-bindings: phy: qcom,edp-phy: Add DP PHY compatible for Nord 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 ` [PATCH v4 03/10] dt-bindings: display/msm: Document Nord MDSS Nabige Aala
2026-12-03 10:55 ` sashiko-bot
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: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: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: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: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: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 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 11:06 ` sashiko-bot [this message]
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-247644@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox