mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2] drm/msm/dp: Correct LeMans/Monaco DP phy Swing/Emphasis setting
@ 2026-01-19 12:37 Yongxing Mou
  2026-01-19 12:55 ` Dmitry Baryshkov
  0 siblings, 1 reply; 6+ messages in thread
From: Yongxing Mou @ 2026-01-19 12:37 UTC (permalink / raw)
  To: Vinod Koul, Neil Armstrong
  Cc: linux-arm-msm, linux-phy, linux-kernel, stable, Abel Vesa, Yongxing Mou

Currently, the LeMans/Monaco devices and their derivative platforms
operate in DP mode rather than eDP mode. Per the PHY HPG, the Swing and
Emphasis settings need to be corrected to the proper values.

This will help achieve successful link training on some dongles.

Cc: stable@vger.kernel.org
Fixes: 3f12bf16213c ("phy: qcom: edp: Add support for eDP PHY on SA8775P")
Reviewed-by: Abel Vesa <abel.vesa@oss.qualcomm.com>
Signed-off-by: Yongxing Mou <yongxing.mou@oss.qualcomm.com>
---
Changes in v2:
- Separate the LDO change out.[Konrad][Dmitry]
- Modify the commit message.[Dmitry]
- Link to v1: https://lore.kernel.org/r/20260109-klm_dpphy-v1-1-a6b6abe382de@oss.qualcomm.com
---
 drivers/phy/qualcomm/phy-qcom-edp.c | 23 ++++++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)

diff --git a/drivers/phy/qualcomm/phy-qcom-edp.c b/drivers/phy/qualcomm/phy-qcom-edp.c
index 13feab99feec..ae98f0a3cf3a 100644
--- a/drivers/phy/qualcomm/phy-qcom-edp.c
+++ b/drivers/phy/qualcomm/phy-qcom-edp.c
@@ -122,6 +122,13 @@ static const u8 dp_swing_hbr_rbr[4][4] = {
 	{ 0x1f, 0xff, 0xff, 0xff }
 };
 
+static const u8 dp_swing_hbr_rbr_v1[4][4] = {
+	{ 0x07, 0x0f, 0x16, 0x1f },
+	{ 0x11, 0x1e, 0x1f, 0xff },
+	{ 0x16, 0x1f, 0xff, 0xff },
+	{ 0x1f, 0xff, 0xff, 0xff }
+};
+
 static const u8 dp_pre_emp_hbr_rbr[4][4] = {
 	{ 0x00, 0x0d, 0x14, 0x1a },
 	{ 0x00, 0x0e, 0x15, 0xff },
@@ -129,6 +136,13 @@ static const u8 dp_pre_emp_hbr_rbr[4][4] = {
 	{ 0x03, 0xff, 0xff, 0xff }
 };
 
+static const u8 dp_pre_emp_hbr_rbr_v1[4][4] = {
+	{ 0x00, 0x0e, 0x15, 0x1a },
+	{ 0x00, 0x0e, 0x15, 0xff },
+	{ 0x00, 0x0e, 0xff, 0xff },
+	{ 0x04, 0xff, 0xff, 0xff }
+};
+
 static const u8 dp_swing_hbr2_hbr3[4][4] = {
 	{ 0x02, 0x12, 0x16, 0x1a },
 	{ 0x09, 0x19, 0x1f, 0xff },
@@ -150,6 +164,13 @@ static const struct qcom_edp_swing_pre_emph_cfg dp_phy_swing_pre_emph_cfg = {
 	.pre_emphasis_hbr3_hbr2 = &dp_pre_emp_hbr2_hbr3,
 };
 
+static const struct qcom_edp_swing_pre_emph_cfg dp_phy_swing_pre_emph_cfg_v1 = {
+	.swing_hbr_rbr = &dp_swing_hbr_rbr_v1,
+	.swing_hbr3_hbr2 = &dp_swing_hbr2_hbr3,
+	.pre_emphasis_hbr_rbr = &dp_pre_emp_hbr_rbr_v1,
+	.pre_emphasis_hbr3_hbr2 = &dp_pre_emp_hbr2_hbr3,
+};
+
 static const u8 edp_swing_hbr_rbr[4][4] = {
 	{ 0x07, 0x0f, 0x16, 0x1f },
 	{ 0x0d, 0x16, 0x1e, 0xff },
@@ -564,7 +585,7 @@ static const struct qcom_edp_phy_cfg sa8775p_dp_phy_cfg = {
 	.is_edp = false,
 	.aux_cfg = edp_phy_aux_cfg_v5,
 	.vco_div_cfg = edp_phy_vco_div_cfg_v4,
-	.swing_pre_emph_cfg = &edp_phy_swing_pre_emph_cfg_v5,
+	.swing_pre_emph_cfg = &dp_phy_swing_pre_emph_cfg_v1,
 	.ver_ops = &qcom_edp_phy_ops_v4,
 };
 

---
base-commit: fc4e91c639c0af93d63c3d5bc0ee45515dd7504a
change-id: 20260109-klm_dpphy-8b3a95750f78

Best regards,
-- 
Yongxing Mou <yongxing.mou@oss.qualcomm.com>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] drm/msm/dp: Correct LeMans/Monaco DP phy Swing/Emphasis setting
  2026-01-19 12:37 [PATCH v2] drm/msm/dp: Correct LeMans/Monaco DP phy Swing/Emphasis setting Yongxing Mou
@ 2026-01-19 12:55 ` Dmitry Baryshkov
  2026-01-20  2:43   ` Yongxing Mou
  0 siblings, 1 reply; 6+ messages in thread
From: Dmitry Baryshkov @ 2026-01-19 12:55 UTC (permalink / raw)
  To: Yongxing Mou
  Cc: Vinod Koul, Neil Armstrong, linux-arm-msm, linux-phy,
	linux-kernel, stable, Abel Vesa

On Mon, Jan 19, 2026 at 08:37:20PM +0800, Yongxing Mou wrote:
> Currently, the LeMans/Monaco devices and their derivative platforms
> operate in DP mode rather than eDP mode. Per the PHY HPG, the Swing and
> Emphasis settings need to be corrected to the proper values.

No, they need to be configured dynamically. I wrote earlier that the
driver needs refactoring. 

> 
> This will help achieve successful link training on some dongles.
> 
> Cc: stable@vger.kernel.org
> Fixes: 3f12bf16213c ("phy: qcom: edp: Add support for eDP PHY on SA8775P")
> Reviewed-by: Abel Vesa <abel.vesa@oss.qualcomm.com>
> Signed-off-by: Yongxing Mou <yongxing.mou@oss.qualcomm.com>
> ---
> Changes in v2:
> - Separate the LDO change out.[Konrad][Dmitry]
> - Modify the commit message.[Dmitry]
> - Link to v1: https://lore.kernel.org/r/20260109-klm_dpphy-v1-1-a6b6abe382de@oss.qualcomm.com
> ---
>  drivers/phy/qualcomm/phy-qcom-edp.c | 23 ++++++++++++++++++++++-
>  1 file changed, 22 insertions(+), 1 deletion(-)
> 

-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] drm/msm/dp: Correct LeMans/Monaco DP phy Swing/Emphasis setting
  2026-01-19 12:55 ` Dmitry Baryshkov
@ 2026-01-20  2:43   ` Yongxing Mou
  2026-01-20  3:12     ` Dmitry Baryshkov
  0 siblings, 1 reply; 6+ messages in thread
From: Yongxing Mou @ 2026-01-20  2:43 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: Vinod Koul, Neil Armstrong, linux-arm-msm, linux-phy,
	linux-kernel, stable, Abel Vesa



On 1/19/2026 8:55 PM, Dmitry Baryshkov wrote:
> On Mon, Jan 19, 2026 at 08:37:20PM +0800, Yongxing Mou wrote:
>> Currently, the LeMans/Monaco devices and their derivative platforms
>> operate in DP mode rather than eDP mode. Per the PHY HPG, the Swing and
>> Emphasis settings need to be corrected to the proper values.
> 
> No, they need to be configured dynamically. I wrote earlier that the
> driver needs refactoring.
> 
Hi, Dmitry. I plan to submit them in this order: this patch → LDO patch 
→ refactor.
Since the refactor involves more platforms and may take some time, I’d 
like to get this patch merged first.
>>
>> This will help achieve successful link training on some dongles.
>>
>> Cc: stable@vger.kernel.org
>> Fixes: 3f12bf16213c ("phy: qcom: edp: Add support for eDP PHY on SA8775P")
>> Reviewed-by: Abel Vesa <abel.vesa@oss.qualcomm.com>
>> Signed-off-by: Yongxing Mou <yongxing.mou@oss.qualcomm.com>
>> ---
>> Changes in v2:
>> - Separate the LDO change out.[Konrad][Dmitry]
>> - Modify the commit message.[Dmitry]
>> - Link to v1: https://lore.kernel.org/r/20260109-klm_dpphy-v1-1-a6b6abe382de@oss.qualcomm.com
>> ---
>>   drivers/phy/qualcomm/phy-qcom-edp.c | 23 ++++++++++++++++++++++-
>>   1 file changed, 22 insertions(+), 1 deletion(-)
>>
> 


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] drm/msm/dp: Correct LeMans/Monaco DP phy Swing/Emphasis setting
  2026-01-20  2:43   ` Yongxing Mou
@ 2026-01-20  3:12     ` Dmitry Baryshkov
  2026-01-20  7:56       ` Yongxing Mou
  0 siblings, 1 reply; 6+ messages in thread
From: Dmitry Baryshkov @ 2026-01-20  3:12 UTC (permalink / raw)
  To: Yongxing Mou
  Cc: Vinod Koul, Neil Armstrong, linux-arm-msm, linux-phy,
	linux-kernel, stable, Abel Vesa

On Tue, Jan 20, 2026 at 10:43:46AM +0800, Yongxing Mou wrote:
> 
> 
> On 1/19/2026 8:55 PM, Dmitry Baryshkov wrote:
> > On Mon, Jan 19, 2026 at 08:37:20PM +0800, Yongxing Mou wrote:
> > > Currently, the LeMans/Monaco devices and their derivative platforms
> > > operate in DP mode rather than eDP mode. Per the PHY HPG, the Swing and
> > > Emphasis settings need to be corrected to the proper values.
> > 
> > No, they need to be configured dynamically. I wrote earlier that the
> > driver needs refactoring.
> > 
> Hi, Dmitry. I plan to submit them in this order: this patch → LDO patch →
> refactor.
> Since the refactor involves more platforms and may take some time, I’d like
> to get this patch merged first.

This patch is incorrect. It trades working on some platforms (DP) vs
working of someo ther platforms (eDP). I don't think it is a proper fix
for any problem.

> > > 
> > > This will help achieve successful link training on some dongles.
> > > 
> > > Cc: stable@vger.kernel.org
> > > Fixes: 3f12bf16213c ("phy: qcom: edp: Add support for eDP PHY on SA8775P")
> > > Reviewed-by: Abel Vesa <abel.vesa@oss.qualcomm.com>
> > > Signed-off-by: Yongxing Mou <yongxing.mou@oss.qualcomm.com>
> > > ---
> > > Changes in v2:
> > > - Separate the LDO change out.[Konrad][Dmitry]
> > > - Modify the commit message.[Dmitry]
> > > - Link to v1: https://lore.kernel.org/r/20260109-klm_dpphy-v1-1-a6b6abe382de@oss.qualcomm.com
> > > ---
> > >   drivers/phy/qualcomm/phy-qcom-edp.c | 23 ++++++++++++++++++++++-
> > >   1 file changed, 22 insertions(+), 1 deletion(-)
> > > 
> > 
> 
> 
> -- 
> linux-phy mailing list
> linux-phy@lists.infradead.org
> https://lists.infradead.org/mailman/listinfo/linux-phy

-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] drm/msm/dp: Correct LeMans/Monaco DP phy Swing/Emphasis setting
  2026-01-20  3:12     ` Dmitry Baryshkov
@ 2026-01-20  7:56       ` Yongxing Mou
  2026-01-20  9:28         ` Dmitry Baryshkov
  0 siblings, 1 reply; 6+ messages in thread
From: Yongxing Mou @ 2026-01-20  7:56 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: Vinod Koul, Neil Armstrong, linux-arm-msm, linux-phy,
	linux-kernel, stable, Abel Vesa



On 1/20/2026 11:12 AM, Dmitry Baryshkov wrote:
> On Tue, Jan 20, 2026 at 10:43:46AM +0800, Yongxing Mou wrote:
>>
>>
>> On 1/19/2026 8:55 PM, Dmitry Baryshkov wrote:
>>> On Mon, Jan 19, 2026 at 08:37:20PM +0800, Yongxing Mou wrote:
>>>> Currently, the LeMans/Monaco devices and their derivative platforms
>>>> operate in DP mode rather than eDP mode. Per the PHY HPG, the Swing and
>>>> Emphasis settings need to be corrected to the proper values.
>>>
>>> No, they need to be configured dynamically. I wrote earlier that the
>>> driver needs refactoring.
>>>
>> Hi, Dmitry. I plan to submit them in this order: this patch → LDO patch →
>> refactor.
>> Since the refactor involves more platforms and may take some time, I’d like
>> to get this patch merged first.
> 
> This patch is incorrect. It trades working on some platforms (DP) vs
> working of someo ther platforms (eDP). I don't think it is a proper fix
> for any problem.
> 
Got it.. will post refactor series.
>>>>
>>>> This will help achieve successful link training on some dongles.
>>>>
>>>> Cc: stable@vger.kernel.org
>>>> Fixes: 3f12bf16213c ("phy: qcom: edp: Add support for eDP PHY on SA8775P")
>>>> Reviewed-by: Abel Vesa <abel.vesa@oss.qualcomm.com>
>>>> Signed-off-by: Yongxing Mou <yongxing.mou@oss.qualcomm.com>
>>>> ---
>>>> Changes in v2:
>>>> - Separate the LDO change out.[Konrad][Dmitry]
>>>> - Modify the commit message.[Dmitry]
>>>> - Link to v1: https://lore.kernel.org/r/20260109-klm_dpphy-v1-1-a6b6abe382de@oss.qualcomm.com
>>>> ---
>>>>    drivers/phy/qualcomm/phy-qcom-edp.c | 23 ++++++++++++++++++++++-
>>>>    1 file changed, 22 insertions(+), 1 deletion(-)
>>>>
>>>
>>
>>
>> -- 
>> linux-phy mailing list
>> linux-phy@lists.infradead.org
>> https://lists.infradead.org/mailman/listinfo/linux-phy
> 


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] drm/msm/dp: Correct LeMans/Monaco DP phy Swing/Emphasis setting
  2026-01-20  7:56       ` Yongxing Mou
@ 2026-01-20  9:28         ` Dmitry Baryshkov
  0 siblings, 0 replies; 6+ messages in thread
From: Dmitry Baryshkov @ 2026-01-20  9:28 UTC (permalink / raw)
  To: Yongxing Mou
  Cc: Vinod Koul, Neil Armstrong, linux-arm-msm, linux-phy,
	linux-kernel, stable, Abel Vesa

On Tue, Jan 20, 2026 at 03:56:10PM +0800, Yongxing Mou wrote:
> 
> 
> On 1/20/2026 11:12 AM, Dmitry Baryshkov wrote:
> > On Tue, Jan 20, 2026 at 10:43:46AM +0800, Yongxing Mou wrote:
> > > 
> > > 
> > > On 1/19/2026 8:55 PM, Dmitry Baryshkov wrote:
> > > > On Mon, Jan 19, 2026 at 08:37:20PM +0800, Yongxing Mou wrote:
> > > > > Currently, the LeMans/Monaco devices and their derivative platforms
> > > > > operate in DP mode rather than eDP mode. Per the PHY HPG, the Swing and
> > > > > Emphasis settings need to be corrected to the proper values.
> > > > 
> > > > No, they need to be configured dynamically. I wrote earlier that the
> > > > driver needs refactoring.
> > > > 
> > > Hi, Dmitry. I plan to submit them in this order: this patch → LDO patch →
> > > refactor.
> > > Since the refactor involves more platforms and may take some time, I’d like
> > > to get this patch merged first.
> > 
> > This patch is incorrect. It trades working on some platforms (DP) vs
> > working of someo ther platforms (eDP). I don't think it is a proper fix
> > for any problem.
> > 
> Got it.. will post refactor series.

Thanks! I don't see a good way to fix your issue without restructuring
the driver.

Note, the driver has to support both older DT (which used separate -edp
and -dp compats) and the current one.

> > > > > 
> > > > > This will help achieve successful link training on some dongles.
> > > > > 
> > > > > Cc: stable@vger.kernel.org
> > > > > Fixes: 3f12bf16213c ("phy: qcom: edp: Add support for eDP PHY on SA8775P")
> > > > > Reviewed-by: Abel Vesa <abel.vesa@oss.qualcomm.com>
> > > > > Signed-off-by: Yongxing Mou <yongxing.mou@oss.qualcomm.com>
> > > > > ---
> > > > > Changes in v2:
> > > > > - Separate the LDO change out.[Konrad][Dmitry]
> > > > > - Modify the commit message.[Dmitry]
> > > > > - Link to v1: https://lore.kernel.org/r/20260109-klm_dpphy-v1-1-a6b6abe382de@oss.qualcomm.com
> > > > > ---
> > > > >    drivers/phy/qualcomm/phy-qcom-edp.c | 23 ++++++++++++++++++++++-
> > > > >    1 file changed, 22 insertions(+), 1 deletion(-)
> > > > > 
> > > > 
> > > 
> > > 
> > > -- 
> > > linux-phy mailing list
> > > linux-phy@lists.infradead.org
> > > https://lists.infradead.org/mailman/listinfo/linux-phy
> > 
> 

-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-01-20  9:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-01-19 12:37 [PATCH v2] drm/msm/dp: Correct LeMans/Monaco DP phy Swing/Emphasis setting Yongxing Mou
2026-01-19 12:55 ` Dmitry Baryshkov
2026-01-20  2:43   ` Yongxing Mou
2026-01-20  3:12     ` Dmitry Baryshkov
2026-01-20  7:56       ` Yongxing Mou
2026-01-20  9:28         ` Dmitry Baryshkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®