All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Nabige Aala" <nabige.aala@oss.qualcomm.com>
Cc: neil.armstrong@linaro.org, olteanv@gmail.com,
	conor+dt@kernel.org, dri-devel@lists.freedesktop.org,
	devicetree@vger.kernel.org, vkoul@kernel.org,
	linux-phy@lists.infradead.org, robh@kernel.org
Subject: Re: [PATCH 16/17] phy: qcom: edp: Introduce Nord phy_ver_ops and phy_cfg descriptor
Date: Fri, 11 Sep 2026 15:56:40 +0000	[thread overview]
Message-ID: <20260911155641.4846E1F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260911-nord-drv-dt-v1-16-e25c073cf1b6@oss.qualcomm.com>

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] The common power-on flow unconditionally writes to the legacy TX_BAND offset, which corrupts registers on the Nord platform.
- [High] The Nord LDO configuration ignores DP mode and applies incorrect eDP settings, contradicting the Hardware Programming Guide.
--

commit ff420262cd547c67f8bafbb24b3a2db77628fd60
Author: Ritesh Kumar <ritesh.kumar@oss.qualcomm.com>

phy: qcom: edp: Introduce Nord phy_ver_ops and phy_cfg descriptor

Add qcom_edp_phy_ops_nord wiring all eight Nord-specific callbacks and
nord_edp_phy_cfg collecting the Nord AUX, VCO divider, swing/pre-emphasis
tables and ver_ops.

> diff --git a/drivers/phy/qualcomm/phy-qcom-edp.c b/drivers/phy/qualcomm/phy-qcom-edp.c
> index 361f4e4673518..338f28cb404fb 100644
> --- a/drivers/phy/qualcomm/phy-qcom-edp.c
> +++ b/drivers/phy/qualcomm/phy-qcom-edp.c
> @@ -1847,6 +1847,29 @@ static int qcom_edp_phy_tx_res_cfg_nord(const struct qcom_edp *edp)
>  }
>  
>  
> +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_nord,
> +	.com_configure_pll	= qcom_edp_com_configure_pll_nord,
> +	.com_configure_ssc	= qcom_edp_com_configure_ssc_nord,
> +	.com_ldo_config		= qcom_edp_ldo_config_nord,

[Severity: High]
Does this hardcode the incorrect LDO configuration for DP mode?

The comments for qcom_edp_ldo_config_nord() document that DP mode must use
0x00 and eDP mode must use 0xD1.

However, the implementation seems to unconditionally hardcode 0xd0 and 0x03,
ignoring edp->is_edp completely:

qcom_edp_ldo_config_nord()
	ldo_config = 0xd0;
	phy_ldo_cfg = 0x03;

	writel(ldo_config, edp->tx0 + TXn_LDO_CONFIG);

Could this cause instability or link failures when running in DP mode due to
contradicting the hardware requirements?

> +	.phy_tx_lane_cfg	= qcom_edp_phy_tx_lane_cfg_nord,

[Severity: High]
Can the common power-on flow corrupt registers on the Nord platform here?

When qcom_edp_phy_power_on() runs, it calls this phy_tx_lane_cfg() callback
which correctly programs the Nord-specific TX_BAND offset at 0x0024:

qcom_edp_phy_power_on()
	if (edp->cfg->ver_ops->phy_tx_lane_cfg) {
		ret = edp->cfg->ver_ops->phy_tx_lane_cfg(edp);
        ...

But immediately afterward, the common flow unconditionally writes to the
legacy TX_BAND offset:

qcom_edp_phy_power_on()
	/* TX-0 register configuration */
    ...
	writel(0x04, edp->tx0 + TXn_TX_BAND);

Since TXn_TX_BAND moved to 0x0024 on Nord, writing to the legacy offset
(0x0028) might clobber whatever unknown register resides there now.

Would it be better to conditionally bypass the legacy TX_BAND write when the
Nord specific callback is used?

> +	.phy_tx_res_cfg		= qcom_edp_phy_tx_res_cfg_nord,
> +};
> +
> +static const struct qcom_edp_phy_cfg nord_edp_phy_cfg = {
> +	.is_edp			= false,
> +	.aux_cfg		= edp_phy_aux_cfg_nord,
> +	.vco_div_cfg		= edp_phy_vco_div_cfg_nord,
> +	.dp_swing_pre_emph_cfg	= &nord_dp_swing_pre_emph_cfg,
> +	.edp_swing_pre_emph_cfg	= &nord_edp_swing_pre_emph_cfg,
> +	.ver_ops		= &qcom_edp_phy_ops_nord,
> +	.phy_status_reg		= DP_PHY_STATUS_NORD,
> +	.bias1_en_2lane		= 0x03,
> +};

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260911-nord-drv-dt-v1-0-e25c073cf1b6@oss.qualcomm.com?part=16

WARNING: multiple messages have this Message-ID (diff)
From: sashiko-bot@kernel.org
To: "Nabige Aala" <nabige.aala@oss.qualcomm.com>
Cc: neil.armstrong@linaro.org, olteanv@gmail.com,
	conor+dt@kernel.org, dri-devel@lists.freedesktop.org,
	devicetree@vger.kernel.org, vkoul@kernel.org,
	linux-phy@lists.infradead.org, robh@kernel.org
Subject: Re: [PATCH 16/17] phy: qcom: edp: Introduce Nord phy_ver_ops and phy_cfg descriptor
Date: Fri, 11 Sep 2026 15:56:40 +0000	[thread overview]
Message-ID: <20260911155641.4846E1F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260911-nord-drv-dt-v1-16-e25c073cf1b6@oss.qualcomm.com>

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] The common power-on flow unconditionally writes to the legacy TX_BAND offset, which corrupts registers on the Nord platform.
- [High] The Nord LDO configuration ignores DP mode and applies incorrect eDP settings, contradicting the Hardware Programming Guide.
--

commit ff420262cd547c67f8bafbb24b3a2db77628fd60
Author: Ritesh Kumar <ritesh.kumar@oss.qualcomm.com>

phy: qcom: edp: Introduce Nord phy_ver_ops and phy_cfg descriptor

Add qcom_edp_phy_ops_nord wiring all eight Nord-specific callbacks and
nord_edp_phy_cfg collecting the Nord AUX, VCO divider, swing/pre-emphasis
tables and ver_ops.

> diff --git a/drivers/phy/qualcomm/phy-qcom-edp.c b/drivers/phy/qualcomm/phy-qcom-edp.c
> index 361f4e4673518..338f28cb404fb 100644
> --- a/drivers/phy/qualcomm/phy-qcom-edp.c
> +++ b/drivers/phy/qualcomm/phy-qcom-edp.c
> @@ -1847,6 +1847,29 @@ static int qcom_edp_phy_tx_res_cfg_nord(const struct qcom_edp *edp)
>  }
>  
>  
> +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_nord,
> +	.com_configure_pll	= qcom_edp_com_configure_pll_nord,
> +	.com_configure_ssc	= qcom_edp_com_configure_ssc_nord,
> +	.com_ldo_config		= qcom_edp_ldo_config_nord,

[Severity: High]
Does this hardcode the incorrect LDO configuration for DP mode?

The comments for qcom_edp_ldo_config_nord() document that DP mode must use
0x00 and eDP mode must use 0xD1.

However, the implementation seems to unconditionally hardcode 0xd0 and 0x03,
ignoring edp->is_edp completely:

qcom_edp_ldo_config_nord()
	ldo_config = 0xd0;
	phy_ldo_cfg = 0x03;

	writel(ldo_config, edp->tx0 + TXn_LDO_CONFIG);

Could this cause instability or link failures when running in DP mode due to
contradicting the hardware requirements?

> +	.phy_tx_lane_cfg	= qcom_edp_phy_tx_lane_cfg_nord,

[Severity: High]
Can the common power-on flow corrupt registers on the Nord platform here?

When qcom_edp_phy_power_on() runs, it calls this phy_tx_lane_cfg() callback
which correctly programs the Nord-specific TX_BAND offset at 0x0024:

qcom_edp_phy_power_on()
	if (edp->cfg->ver_ops->phy_tx_lane_cfg) {
		ret = edp->cfg->ver_ops->phy_tx_lane_cfg(edp);
        ...

But immediately afterward, the common flow unconditionally writes to the
legacy TX_BAND offset:

qcom_edp_phy_power_on()
	/* TX-0 register configuration */
    ...
	writel(0x04, edp->tx0 + TXn_TX_BAND);

Since TXn_TX_BAND moved to 0x0024 on Nord, writing to the legacy offset
(0x0028) might clobber whatever unknown register resides there now.

Would it be better to conditionally bypass the legacy TX_BAND write when the
Nord specific callback is used?

> +	.phy_tx_res_cfg		= qcom_edp_phy_tx_res_cfg_nord,
> +};
> +
> +static const struct qcom_edp_phy_cfg nord_edp_phy_cfg = {
> +	.is_edp			= false,
> +	.aux_cfg		= edp_phy_aux_cfg_nord,
> +	.vco_div_cfg		= edp_phy_vco_div_cfg_nord,
> +	.dp_swing_pre_emph_cfg	= &nord_dp_swing_pre_emph_cfg,
> +	.edp_swing_pre_emph_cfg	= &nord_edp_swing_pre_emph_cfg,
> +	.ver_ops		= &qcom_edp_phy_ops_nord,
> +	.phy_status_reg		= DP_PHY_STATUS_NORD,
> +	.bias1_en_2lane		= 0x03,
> +};

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260911-nord-drv-dt-v1-0-e25c073cf1b6@oss.qualcomm.com?part=16

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

  reply	other threads:[~2026-09-11 15:56 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-11 15:36 [PATCH 00/17] Add Qualcomm Nord display and eDP PHY support Nabige Aala
2026-09-11 15:36 ` Nabige Aala
2026-09-11 15:36 ` [PATCH 01/17] dt-bindings: phy: qcom,edp-phy: Document Nord eDP PHY Nabige Aala
2026-09-11 15:36   ` Nabige Aala
2026-09-11 15:48   ` sashiko-bot
2026-09-11 15:48     ` sashiko-bot
2026-09-11 15:36 ` [PATCH 02/17] dt-bindings: display/msm: dp-controller: Document Nord DP Nabige Aala
2026-09-11 15:36   ` Nabige Aala
2026-09-11 15:44   ` sashiko-bot
2026-09-11 15:44     ` sashiko-bot
2026-09-13  7:51   ` Krzysztof Kozlowski
2026-09-13  7:51     ` Krzysztof Kozlowski
2026-09-11 15:36 ` [PATCH 03/17] dt-bindings: display/msm: Document Nord MDSS Nabige Aala
2026-09-11 15:36   ` Nabige Aala
2026-09-11 15:51   ` sashiko-bot
2026-09-11 15:51     ` sashiko-bot
2026-09-13  7:50   ` Krzysztof Kozlowski
2026-09-13  7:50     ` Krzysztof Kozlowski
2026-09-11 15:36 ` [PATCH 04/17] drm/msm/dpu: Add support for DPU 12.1 on Nord Nabige Aala
2026-09-11 15:36   ` Nabige Aala
2026-09-11 15:59   ` sashiko-bot
2026-09-11 15:59     ` sashiko-bot
2026-09-11 15:36 ` [PATCH 05/17] drm/msm: mdss: Add support for MDSS " Nabige Aala
2026-09-11 15:36   ` Nabige Aala
2026-09-11 15:36 ` [PATCH 06/17] drm/msm/dp: Add support for DP controllers " Nabige Aala
2026-09-11 15:36   ` Nabige Aala
2026-09-11 15:36 ` [PATCH 07/17] phy: qcom: edp: Add Nord-specific register offsets Nabige Aala
2026-09-11 15:36   ` Nabige Aala
2026-09-11 15:49   ` sashiko-bot
2026-09-11 15:49     ` sashiko-bot
2026-09-11 15:36 ` [PATCH 08/17] phy: qcom: edp: Generalize power-on path to support per-SoC overrides Nabige Aala
2026-09-11 15:36   ` Nabige Aala
2026-09-11 15:36 ` [PATCH 09/17] phy: qcom: edp: Add Nord AUX channel and VCO divider configuration tables Nabige Aala
2026-09-11 15:36   ` Nabige Aala
2026-09-11 15:36 ` [PATCH 10/17] phy: qcom: edp: Add Nord voltage-swing and pre-emphasis tables Nabige Aala
2026-09-11 15:36   ` Nabige Aala
2026-09-11 15:36 ` [PATCH 11/17] phy: qcom: edp: Add Nord PHY power-on and reset state-machine callbacks Nabige Aala
2026-09-11 15:36   ` Nabige Aala
2026-09-11 15:36 ` [PATCH 12/17] phy: qcom: edp: Add Nord bias and clock buffer enable callback Nabige Aala
2026-09-11 15:36   ` Nabige Aala
2026-09-11 15:49   ` sashiko-bot
2026-09-11 15:49     ` sashiko-bot
2026-09-11 15:36 ` [PATCH 13/17] phy: qcom: edp: Add Nord spread-spectrum clocking configuration callback Nabige Aala
2026-09-11 15:36   ` Nabige Aala
2026-09-11 15:36 ` [PATCH 14/17] phy: qcom: edp: Add Nord PLL " Nabige Aala
2026-09-11 15:36   ` Nabige Aala
2026-09-11 15:53   ` sashiko-bot
2026-09-11 15:53     ` sashiko-bot
2026-09-11 15:36 ` [PATCH 15/17] phy: qcom: edp: Add Nord LDO, TX lane and TX resistor calibration callbacks Nabige Aala
2026-09-11 15:36   ` Nabige Aala
2026-09-11 15:52   ` sashiko-bot
2026-09-11 15:52     ` sashiko-bot
2026-09-11 15:36 ` [PATCH 16/17] phy: qcom: edp: Introduce Nord phy_ver_ops and phy_cfg descriptor Nabige Aala
2026-09-11 15:36   ` Nabige Aala
2026-09-11 15:56   ` sashiko-bot [this message]
2026-09-11 15:56     ` sashiko-bot
2026-09-11 15:36 ` [PATCH 17/17] phy: qcom: edp: Register qcom,nord-dp-phy OF compatible string Nabige Aala
2026-09-11 15:36   ` Nabige Aala

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=20260911155641.4846E1F000FF@smtp.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.