dri-devel Archive on 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, robh@kernel.org,
	linux-phy@lists.infradead.org, conor+dt@kernel.org,
	dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
	vkoul@kernel.org, olteanv@gmail.com
Subject: Re: [PATCH 15/17] phy: qcom: edp: Add Nord LDO, TX lane and TX resistor calibration callbacks
Date: Fri, 11 Sep 2026 15:52:41 +0000	[thread overview]
Message-ID: <20260911155241.E01061F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260911-nord-drv-dt-v1-15-e25c073cf1b6@oss.qualcomm.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] The `qcom_edp_ldo_config_nord()` function unconditionally hardcodes LDO configuration values, contradicting the requirements documented in its block comment and the commit message.
--

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

phy: qcom: edp: Add Nord LDO, TX lane and TX resistor calibration callbacks

This commit adds PHY configuration callbacks for the Nord platform, introducing
specific LDO levels, TX lane control offsets, and TX resistor calibration codes
based on HPG Table 2-1-d.

> diff --git a/drivers/phy/qualcomm/phy-qcom-edp.c b/drivers/phy/qualcomm/phy-qcom-edp.c
> index 4d1b2c81d9563..361f4e4673518 100644
> --- a/drivers/phy/qualcomm/phy-qcom-edp.c
> +++ b/drivers/phy/qualcomm/phy-qcom-edp.c

[ ... ]

> +/*
> + * nord LDO configuration.
> + * From HPG Table 2-1-d: LDO Configuration section.
> + * eDP mode: 0xD1 for rates <= 8.1 Gbps, 0x00 for UHBR (>8.1 Gbps).
> + * DP mode: always 0x00.
> + * Also programs EDP2_DP_PHY_LDO_CFG: 0x03 for eDP rates <= 8.1G, 0x00 otherwise.
> + */
> +static int qcom_edp_ldo_config_nord(const struct qcom_edp *edp)
> +{
> +	const struct phy_configure_opts_dp *dp_opts = &edp->dp_opts;
> +	u32 ldo_config;
> +	u32 phy_ldo_cfg;
> +
> +	ldo_config = 0xd0;
> +	phy_ldo_cfg = 0x03;

[Severity: High]
The block comment directly above specifies that the LDO configuration
should be set dynamically based on the operating mode and link rate, such as
0xD1 for eDP rates <= 8.1 Gbps and 0x00 for UHBR or DP mode.

Does unconditionally hardcoding these values to 0xd0 (which also appears to be
a typo for 0xD1) and 0x03 cause incorrect LDO voltages to be applied when the
PHY is initialized for DP mode or high-speed eDP links?

Applying these values unconditionally during device probe or link training
might lead to PHY instability or link failures when operating in DP mode
or high-speed eDP modes where the hardware programming guide requires 0x00.

> +
> +	writel(ldo_config, edp->tx0 + TXn_LDO_CONFIG);
> +	writel(dp_opts->lanes > 2 ? ldo_config : 0x00, edp->tx1 + TXn_LDO_CONFIG);
> +	writel(phy_ldo_cfg, edp->edp + DP_PHY_LDO_CFG);
> +
> +	return 0;
> +}

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

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

Thread overview: 29+ 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 ` [PATCH 01/17] dt-bindings: phy: qcom,edp-phy: Document Nord eDP PHY Nabige Aala
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:44   ` sashiko-bot
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:51   ` sashiko-bot
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: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 ` [PATCH 06/17] drm/msm/dp: Add support for DP controllers " Nabige Aala
2026-09-11 15:36 ` [PATCH 07/17] phy: qcom: edp: Add Nord-specific register offsets Nabige Aala
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 ` [PATCH 09/17] phy: qcom: edp: Add Nord AUX channel and VCO divider configuration tables 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 ` [PATCH 11/17] phy: qcom: edp: Add Nord PHY power-on and reset state-machine callbacks 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: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 ` [PATCH 14/17] phy: qcom: edp: Add Nord PLL " Nabige Aala
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:52   ` sashiko-bot [this message]
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:56   ` sashiko-bot
2026-09-11 15:36 ` [PATCH 17/17] phy: qcom: edp: Register qcom,nord-dp-phy OF compatible string 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=20260911155241.E01061F000FF@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox