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 v3 11/11] phy: qcom: edp: Add Nord eDP/DP PHY support
Date: Mon, 16 Nov 2026 13:44:36 +0000 [thread overview]
Message-ID: <sashiko-outbox-217102@kernel.org> (raw)
In-Reply-To: <20261116-nord-drv-dt-v3-11-e3d3bf0e2c49@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [Low] phy: qcom: edp: duplicated v6/v8 definitions and misplaced Nord
code
- [Low] phy: qcom: edp: asymmetric DRV_LVL writes in
qcom_edp_tx_res_config_nord()
--
commit d8ce2b9ae0271c780b642dc599049c73dd865127
Author: Ritesh Kumar <ritesh.kumar@oss.qualcomm.com>
phy: qcom: edp: Add Nord eDP/DP PHY support
This commit adds eDP/DP PHY support, callbacks, configuration tables, and the
qcom,nord-dp-phy compatible string for the Qualcomm Nord SoC.
> diff --git a/drivers/phy/qualcomm/phy-qcom-edp.c b/drivers/phy/qualcomm/phy-qcom-edp.c
> index c61e57cc2aa7b..d5de6d322f023 100644
> --- a/drivers/phy/qualcomm/phy-qcom-edp.c
> +++ b/drivers/phy/qualcomm/phy-qcom-edp.c
> @@ -27,6 +27,7 @@
> #include "phy-qcom-qmp-qserdes-com-v6.h"
>
> #include "phy-qcom-qmp-qserdes-dp-com-v8.h"
> +#include "phy-qcom-qmp-qserdes-dp-com-v8-nord.h"
>
> /* EDP_PHY registers */
> #define DP_PHY_CFG 0x0010
> @@ -1514,6 +1515,262 @@ static int qcom_edp_phy_probe(struct platform_device *pdev)
> return PTR_ERR_OR_ZERO(phy_provider);
> }
>
> +static const u8 nord_dp_pre_emp_hbr_rbr[4][4] = {
[ ... ]
> +static const u8 edp_phy_vco_div_cfg_nord[4] = {
> + 0x00, 0x00, 0x02, 0x01,
> +};
> +
> +static int qcom_edp_ldo_config_nord(const struct qcom_edp *edp)
> +{
> + const struct phy_configure_opts_dp *dp_opts = &edp->dp_opts;
> +
> + writel(0xd0, edp->tx0 + TXn_LDO_CONFIG);
> + writel(dp_opts->lanes > 2 ? 0xd0 : 0x00, edp->tx1 + TXn_LDO_CONFIG);
> + writel(0x03, edp->edp + DP_PHY_LDO_CFG_NORD);
> +
> + return 0;
> +}
> +
> +static int qcom_edp_tx_res_config_nord(const struct qcom_edp *edp)
> +{
> + 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(0x05, edp->tx0 + TXn_TX_BAND_NORD);
> + writel(0x05, 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 initial TX drive-level
programming be handled symmetrically between qcom_edp_tx_res_config_nord()
and qcom_edp_tx_res_config_default()?
qcom_edp_tx_res_config_nord() programs DP_PHY_TX_LN0_DRV_LVL_NORD and
DP_PHY_TX_LN1_DRV_LVL_NORD, whereas qcom_edp_tx_res_config_default() omits
TXn_TX_DRV_LVL and leaves those writes hardcoded in qcom_edp_phy_power_on():
drivers/phy/qualcomm/phy-qcom-edp.c:qcom_edp_phy_power_on() {
...
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);
...
}
Because qcom_edp_phy_power_on() unconditionally writes 0x1f to TXn_TX_DRV_LVL
after calling tx_res_config(), Nord still executes the legacy TXn_TX_DRV_LVL
writes even though it relocates drive-level control to
DP_PHY_TX_LN0_DRV_LVL_NORD and DP_PHY_TX_LN1_DRV_LVL_NORD.
> +
> +static int qcom_edp_phy_power_on_nord(const struct qcom_edp *edp)
> +{
> + u32 val;
> +
> + writel(DP_PHY_PD_CTL_PWRDN | DP_PHY_PD_CTL_AUX_PWRDN |
> + DP_PHY_PD_CTL_LANE_0_1_PWRDN | DP_PHY_PD_CTL_LANE_2_3_PWRDN |
> + DP_PHY_PD_CTL_PLL_PWRDN | DP_PHY_PD_CTL_DP_CLAMP_EN,
> + edp->edp + DP_PHY_PD_CTL);
> + writel(0xfc, edp->edp + DP_PHY_MODE);
> +
> + return readl_poll_timeout(edp->pll + NORD_DP_QSERDES_COM_CMN_STATUS,
> + val, val & BIT(7), 5, 200);
> +}
> +
> +static int qcom_edp_phy_com_resetsm_cntrl_nord(const struct qcom_edp *edp)
> +{
> + u32 val;
> +
> + writel(0x20, edp->pll + NORD_DP_QSERDES_COM_RESETSM_CNTRL);
> +
> + return readl_poll_timeout(edp->pll + NORD_DP_QSERDES_COM_C_READY_STATUS,
> + val, val & BIT(0), 500, 10000);
> +}
[ ... ]
> static const struct of_device_id qcom_edp_phy_match_table[] = {
> { .compatible = "qcom,glymur-dp-phy", .data = &glymur_phy_cfg, },
> { .compatible = "qcom,sa8775p-edp-phy", .data = &sa8775p_dp_phy_cfg, },
> @@ -1522,6 +1779,7 @@ static const struct of_device_id qcom_edp_phy_match_table[] = {
> { .compatible = "qcom,sc8280xp-dp-phy", .data = &sc8280xp_dp_phy_cfg, },
> { .compatible = "qcom,sc8280xp-edp-phy", .data = &sc8280xp_edp_phy_cfg, },
> { .compatible = "qcom,x1e80100-dp-phy", .data = &x1e80100_phy_cfg, },
> + { .compatible = "qcom,nord-dp-phy", .data = &nord_edp_phy_cfg, },
> { }
> };
> MODULE_DEVICE_TABLE(of, qcom_edp_phy_match_table);
[Severity: Low]
Can Nord reuse the existing v6 and v8 definitions instead of duplicating
them?
All 40 NORD_DP_QSERDES_COM_* offsets in phy-qcom-qmp-qserdes-dp-com-v8-nord.h
are identical to the QSERDES_V6_COM_* offsets in
phy-qcom-qmp-qserdes-com-v6.h, which is already included in this file.
Consequently, qcom_edp_phy_power_on_nord() and
qcom_edp_phy_com_resetsm_cntrl_nord() are identical to
qcom_edp_phy_power_on_v6() and qcom_edp_phy_com_resetsm_cntrl_v6(), and
edp_phy_vco_div_cfg_nord is identical to edp_phy_vco_div_cfg_v8.
Also, the Nord register macros, configuration tables, and callbacks are
placed after qcom_edp_phy_probe() instead of alongside the other SoC
definitions earlier in the file, and qcom,nord-dp-phy is appended to the end
of the alphabetically sorted qcom_edp_phy_match_table[].
[1] https://lore.kernel.org/r/qqfucmyebsvemdr5px33wabsxxq4owozwmxcqu62sprs5k32bo@kb5pjx2m4ucq
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261116-nord-drv-dt-v3-0-e3d3bf0e2c49@oss.qualcomm.com?part=11
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
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 v3 11/11] phy: qcom: edp: Add Nord eDP/DP PHY support
Date: Mon, 16 Nov 2026 13:44:36 +0000 [thread overview]
Message-ID: <sashiko-outbox-217102@kernel.org> (raw)
In-Reply-To: <20261116-nord-drv-dt-v3-11-e3d3bf0e2c49@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [Low] phy: qcom: edp: duplicated v6/v8 definitions and misplaced Nord
code
- [Low] phy: qcom: edp: asymmetric DRV_LVL writes in
qcom_edp_tx_res_config_nord()
--
commit d8ce2b9ae0271c780b642dc599049c73dd865127
Author: Ritesh Kumar <ritesh.kumar@oss.qualcomm.com>
phy: qcom: edp: Add Nord eDP/DP PHY support
This commit adds eDP/DP PHY support, callbacks, configuration tables, and the
qcom,nord-dp-phy compatible string for the Qualcomm Nord SoC.
> diff --git a/drivers/phy/qualcomm/phy-qcom-edp.c b/drivers/phy/qualcomm/phy-qcom-edp.c
> index c61e57cc2aa7b..d5de6d322f023 100644
> --- a/drivers/phy/qualcomm/phy-qcom-edp.c
> +++ b/drivers/phy/qualcomm/phy-qcom-edp.c
> @@ -27,6 +27,7 @@
> #include "phy-qcom-qmp-qserdes-com-v6.h"
>
> #include "phy-qcom-qmp-qserdes-dp-com-v8.h"
> +#include "phy-qcom-qmp-qserdes-dp-com-v8-nord.h"
>
> /* EDP_PHY registers */
> #define DP_PHY_CFG 0x0010
> @@ -1514,6 +1515,262 @@ static int qcom_edp_phy_probe(struct platform_device *pdev)
> return PTR_ERR_OR_ZERO(phy_provider);
> }
>
> +static const u8 nord_dp_pre_emp_hbr_rbr[4][4] = {
[ ... ]
> +static const u8 edp_phy_vco_div_cfg_nord[4] = {
> + 0x00, 0x00, 0x02, 0x01,
> +};
> +
> +static int qcom_edp_ldo_config_nord(const struct qcom_edp *edp)
> +{
> + const struct phy_configure_opts_dp *dp_opts = &edp->dp_opts;
> +
> + writel(0xd0, edp->tx0 + TXn_LDO_CONFIG);
> + writel(dp_opts->lanes > 2 ? 0xd0 : 0x00, edp->tx1 + TXn_LDO_CONFIG);
> + writel(0x03, edp->edp + DP_PHY_LDO_CFG_NORD);
> +
> + return 0;
> +}
> +
> +static int qcom_edp_tx_res_config_nord(const struct qcom_edp *edp)
> +{
> + 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(0x05, edp->tx0 + TXn_TX_BAND_NORD);
> + writel(0x05, 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 initial TX drive-level
programming be handled symmetrically between qcom_edp_tx_res_config_nord()
and qcom_edp_tx_res_config_default()?
qcom_edp_tx_res_config_nord() programs DP_PHY_TX_LN0_DRV_LVL_NORD and
DP_PHY_TX_LN1_DRV_LVL_NORD, whereas qcom_edp_tx_res_config_default() omits
TXn_TX_DRV_LVL and leaves those writes hardcoded in qcom_edp_phy_power_on():
drivers/phy/qualcomm/phy-qcom-edp.c:qcom_edp_phy_power_on() {
...
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);
...
}
Because qcom_edp_phy_power_on() unconditionally writes 0x1f to TXn_TX_DRV_LVL
after calling tx_res_config(), Nord still executes the legacy TXn_TX_DRV_LVL
writes even though it relocates drive-level control to
DP_PHY_TX_LN0_DRV_LVL_NORD and DP_PHY_TX_LN1_DRV_LVL_NORD.
> +
> +static int qcom_edp_phy_power_on_nord(const struct qcom_edp *edp)
> +{
> + u32 val;
> +
> + writel(DP_PHY_PD_CTL_PWRDN | DP_PHY_PD_CTL_AUX_PWRDN |
> + DP_PHY_PD_CTL_LANE_0_1_PWRDN | DP_PHY_PD_CTL_LANE_2_3_PWRDN |
> + DP_PHY_PD_CTL_PLL_PWRDN | DP_PHY_PD_CTL_DP_CLAMP_EN,
> + edp->edp + DP_PHY_PD_CTL);
> + writel(0xfc, edp->edp + DP_PHY_MODE);
> +
> + return readl_poll_timeout(edp->pll + NORD_DP_QSERDES_COM_CMN_STATUS,
> + val, val & BIT(7), 5, 200);
> +}
> +
> +static int qcom_edp_phy_com_resetsm_cntrl_nord(const struct qcom_edp *edp)
> +{
> + u32 val;
> +
> + writel(0x20, edp->pll + NORD_DP_QSERDES_COM_RESETSM_CNTRL);
> +
> + return readl_poll_timeout(edp->pll + NORD_DP_QSERDES_COM_C_READY_STATUS,
> + val, val & BIT(0), 500, 10000);
> +}
[ ... ]
> static const struct of_device_id qcom_edp_phy_match_table[] = {
> { .compatible = "qcom,glymur-dp-phy", .data = &glymur_phy_cfg, },
> { .compatible = "qcom,sa8775p-edp-phy", .data = &sa8775p_dp_phy_cfg, },
> @@ -1522,6 +1779,7 @@ static const struct of_device_id qcom_edp_phy_match_table[] = {
> { .compatible = "qcom,sc8280xp-dp-phy", .data = &sc8280xp_dp_phy_cfg, },
> { .compatible = "qcom,sc8280xp-edp-phy", .data = &sc8280xp_edp_phy_cfg, },
> { .compatible = "qcom,x1e80100-dp-phy", .data = &x1e80100_phy_cfg, },
> + { .compatible = "qcom,nord-dp-phy", .data = &nord_edp_phy_cfg, },
> { }
> };
> MODULE_DEVICE_TABLE(of, qcom_edp_phy_match_table);
[Severity: Low]
Can Nord reuse the existing v6 and v8 definitions instead of duplicating
them?
All 40 NORD_DP_QSERDES_COM_* offsets in phy-qcom-qmp-qserdes-dp-com-v8-nord.h
are identical to the QSERDES_V6_COM_* offsets in
phy-qcom-qmp-qserdes-com-v6.h, which is already included in this file.
Consequently, qcom_edp_phy_power_on_nord() and
qcom_edp_phy_com_resetsm_cntrl_nord() are identical to
qcom_edp_phy_power_on_v6() and qcom_edp_phy_com_resetsm_cntrl_v6(), and
edp_phy_vco_div_cfg_nord is identical to edp_phy_vco_div_cfg_v8.
Also, the Nord register macros, configuration tables, and callbacks are
placed after qcom_edp_phy_probe() instead of alongside the other SoC
definitions earlier in the file, and qcom,nord-dp-phy is appended to the end
of the alphabetically sorted qcom_edp_phy_match_table[].
[1] https://lore.kernel.org/r/qqfucmyebsvemdr5px33wabsxxq4owozwmxcqu62sprs5k32bo@kb5pjx2m4ucq
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261116-nord-drv-dt-v3-0-e3d3bf0e2c49@oss.qualcomm.com?part=11
next prev parent reply other threads:[~2026-11-16 13:44 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-16 13:16 [PATCH v3 00/11] Add Qualcomm Nord display and eDP PHY support Nabige Aala
2026-11-16 13:16 ` Nabige Aala
2026-11-16 13:16 ` [PATCH v3 01/11] dt-bindings: phy: qcom,edp-phy: Add DP PHY compatible for Nord Nabige Aala
2026-11-16 13:16 ` Nabige Aala
2026-11-16 13:16 ` [PATCH v3 02/11] dt-bindings: display: msm: dp-controller: Document Nord DisplayPort Controller Nabige Aala
2026-11-16 13:16 ` Nabige Aala
2026-11-16 13:31 ` sashiko-bot
2026-11-16 13:31 ` sashiko-bot
2026-11-16 13:16 ` [PATCH v3 03/11] dt-bindings: display/msm: Document Nord MDSS Nabige Aala
2026-11-16 13:16 ` Nabige Aala
2026-11-16 13:38 ` sashiko-bot
2026-11-16 13:38 ` sashiko-bot
2026-11-17 15:23 ` Rob Herring (Arm)
2026-11-17 15:23 ` Rob Herring (Arm)
2026-11-18 4:51 ` Shawn Guo
2026-11-18 4:51 ` Shawn Guo
2026-11-16 13:16 ` [PATCH v3 04/11] dt-bindings: display/msm: qcom,sm8650-dpu: Add Qualcomm Nord Soc Nabige Aala
2026-11-16 13:16 ` Nabige Aala
2026-11-16 13:16 ` [PATCH v3 05/11] drm/msm/dpu: Add support for DPU 12.1 on Nord Nabige Aala
2026-11-16 13:16 ` Nabige Aala
2026-11-16 13:47 ` sashiko-bot
2026-11-16 13:47 ` sashiko-bot
2026-11-16 13:16 ` [PATCH v3 06/11] drm/msm/dpu: Fix DSI tear interrupts broken by adding INTF_9 and INTF_10 Nabige Aala
2026-11-16 13:16 ` Nabige Aala
2026-11-16 13:29 ` sashiko-bot
2026-11-16 13:29 ` sashiko-bot
2026-11-16 13:16 ` [PATCH v3 07/11] drm/msm: mdss: Add support for MDSS on Nord Nabige Aala
2026-11-16 13:16 ` Nabige Aala
2026-11-16 13:16 ` [PATCH v3 08/11] drm/msm/dp: Add support for DP controllers " Nabige Aala
2026-11-16 13:16 ` Nabige Aala
2026-11-16 13:16 ` [PATCH v3 09/11] phy: qcom: edp: Generalize power-on path for per-SoC overrides Nabige Aala
2026-11-16 13:16 ` Nabige Aala
2026-11-16 13:16 ` [PATCH v3 10/11] phy: qcom: edp: Add Nord-specific QSERDES COM register header Nabige Aala
2026-11-16 13:16 ` Nabige Aala
2026-11-16 13:30 ` sashiko-bot
2026-11-16 13:30 ` sashiko-bot
2026-11-16 13:16 ` [PATCH v3 11/11] phy: qcom: edp: Add Nord eDP/DP PHY support Nabige Aala
2026-11-16 13:16 ` Nabige Aala
2026-11-16 13:44 ` sashiko-bot [this message]
2026-11-16 13:44 ` 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-217102@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.