Skip to contentSkip to conversation

phy: qcom: qmp-combo: fix VCO div offset on v5_5nm and v6

PATCH Applied Johan Hovold 5 participants 5 messages Apr 8, 2024 – Apr 12, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 phy: qcom: qmp-combo: fix VCO div offset on v5_5nm and v6

Commit 5abed58a8bde ("phy: qcom: qmp-combo: Fix VCO div offset on v3") fixed a regression introduced in 6.5 by making sure that the correct offset is used for the DP_PHY_VCO_DIV register on v3 hardware.

Unfortunately, that fix instead broke DisplayPort on v5_5nm and v6 hardware as it failed to add the corresponding offsets also to those register tables.

Fixes 815891eee668 ("phy: qcom-qmp-combo: Introduce orientation variable")
Fixes 5abed58a8bde ("phy: qcom: qmp-combo: Fix VCO div offset on v3")
Cc [email protected] # 6.5: 5abed58a8bde
Cc Stephen Boyd <[email protected]>
Cc Abhinav Kumar <[email protected]>
Cc Dmitry Baryshkov <[email protected]>
---
 drivers/phy/qualcomm/phy-qcom-qmp-combo.c     | 2 ++
 drivers/phy/qualcomm/phy-qcom-qmp-dp-phy-v5.h | 1 +
 drivers/phy/qualcomm/phy-qcom-qmp-dp-phy-v6.h | 1 +
 3 files changed, 4 insertions(+)
drivers/phy/qualcomm/phy-qcom-qmp-combo.c +2 -0
index a03b6f6881df..e48e87c3cb05 100644
@@ -153,6 +153,7 @@ static const unsigned int qmp_v5_5nm_usb3phy_regs_layout[QPHY_LAYOUT_SIZE] = {
 	[QPHY_COM_BIAS_EN_CLKBUFLR_EN]	= QSERDES_V5_COM_BIAS_EN_CLKBUFLR_EN,
 
 	[QPHY_DP_PHY_STATUS]		= QSERDES_V5_DP_PHY_STATUS,
+	[QPHY_DP_PHY_VCO_DIV]		= QSERDES_V5_DP_PHY_VCO_DIV,
 
 	[QPHY_TX_TX_POL_INV]		= QSERDES_V5_5NM_TX_TX_POL_INV,
 	[QPHY_TX_TX_DRV_LVL]		= QSERDES_V5_5NM_TX_TX_DRV_LVL,
@@ -177,6 +178,7 @@ static const unsigned int qmp_v6_usb3phy_regs_layout[QPHY_LAYOUT_SIZE] = {
 	[QPHY_COM_BIAS_EN_CLKBUFLR_EN]	= QSERDES_V6_COM_PLL_BIAS_EN_CLK_BUFLR_EN,
 
 	[QPHY_DP_PHY_STATUS]		= QSERDES_V6_DP_PHY_STATUS,
+	[QPHY_DP_PHY_VCO_DIV]		= QSERDES_V6_DP_PHY_VCO_DIV,
 
 	[QPHY_TX_TX_POL_INV]		= QSERDES_V6_TX_TX_POL_INV,
 	[QPHY_TX_TX_DRV_LVL]		= QSERDES_V6_TX_TX_DRV_LVL,
drivers/phy/qualcomm/phy-qcom-qmp-dp-phy-v5.h +1 -0
index f5cfacf9be96..181057421c11 100644
@@ -7,6 +7,7 @@
 #define QCOM_PHY_QMP_DP_PHY_V5_H_
 
 /* Only for QMP V5 PHY - DP PHY registers */
+#define QSERDES_V5_DP_PHY_VCO_DIV			0x070
 #define QSERDES_V5_DP_PHY_AUX_INTERRUPT_STATUS		0x0d8
 #define QSERDES_V5_DP_PHY_STATUS			0x0dc
 
drivers/phy/qualcomm/phy-qcom-qmp-dp-phy-v6.h +1 -0
index 01a20d3be4b8..fa967a1af058 100644
@@ -7,6 +7,7 @@
 #define QCOM_PHY_QMP_DP_PHY_V6_H_
 
 /* Only for QMP V6 PHY - DP PHY registers */
+#define QSERDES_V6_DP_PHY_VCO_DIV			0x070
 #define QSERDES_V6_DP_PHY_AUX_INTERRUPT_STATUS		0x0e0
 #define QSERDES_V6_DP_PHY_STATUS			0x0e4
 
Signature · 1 line
2.43.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 16 lines · Johan Hovold

Commit 5abed58a8bde ("phy: qcom: qmp-combo: Fix VCO div offset on v3") fixed a regression introduced in 6.5 by making sure that the correct offset is used for the DP_PHY_VCO_DIV register on v3 hardware.

Unfortunately, that fix instead broke DisplayPort on v5_5nm and v6 hardware as it failed to add the corresponding offsets also to those register tables.

Fixes 815891eee668 ("phy: qcom-qmp-combo: Introduce orientation variable")
Fixes 5abed58a8bde ("phy: qcom: qmp-combo: Fix VCO div offset on v3")
Cc [email protected] # 6.5: 5abed58a8bde
Cc Stephen Boyd <[email protected]>
Cc Abhinav Kumar <[email protected]>
Cc Dmitry Baryshkov <[email protected]>
Quoted 5 lines
---
 drivers/phy/qualcomm/phy-qcom-qmp-combo.c     | 2 ++
 drivers/phy/qualcomm/phy-qcom-qmp-dp-phy-v5.h | 1 +
 drivers/phy/qualcomm/phy-qcom-qmp-dp-phy-v6.h | 1 +
 3 files changed, 4 insertions(+)
Signature · 2 lines
With best wishes
Dmitry
Reviewed-by on v1 1/1
#2 lore raw
In reply to Johan Hovold

Quoting Johan Hovold (2024-04-08 02:30:23)

Quoted 8 lines

Commit 5abed58a8bde ("phy: qcom: qmp-combo: Fix VCO div offset on v3") fixed a regression introduced in 6.5 by making sure that the correct offset is used for the DP_PHY_VCO_DIV register on v3 hardware.

Unfortunately, that fix instead broke DisplayPort on v5_5nm and v6 hardware as it failed to add the corresponding offsets also to those register tables.

Quoted 8 lines
Fixes 815891eee668 ("phy: qcom-qmp-combo: Introduce orientation variable")
Fixes 5abed58a8bde ("phy: qcom: qmp-combo: Fix VCO div offset on v3")
Cc [email protected] # 6.5: 5abed58a8bde
Cc Stephen Boyd <[email protected]>
Cc Abhinav Kumar <[email protected]>
Cc Dmitry Baryshkov <[email protected]>

---

Thanks! I didn't know the qmp_v4_configure_dp_phy() function was used by v5 or v6, but upon further inspection that seems to be the case. Maybe that should be renamed to qmp_v456_configure_dp_phy() to match and then qmp_v456_configure_dp_phy() get inlined into qmp_v4_configure_dp_phy(). Either way:

Reviewed-by on v1 1/1
#3 lore raw
In reply to Johan Hovold
Quoted 15 lines · Johan Hovold

Commit 5abed58a8bde ("phy: qcom: qmp-combo: Fix VCO div offset on v3") fixed a regression introduced in 6.5 by making sure that the correct offset is used for the DP_PHY_VCO_DIV register on v3 hardware.

Unfortunately, that fix instead broke DisplayPort on v5_5nm and v6 hardware as it failed to add the corresponding offsets also to those register tables.

Fixes 815891eee668 ("phy: qcom-qmp-combo: Introduce orientation variable")
Fixes 5abed58a8bde ("phy: qcom: qmp-combo: Fix VCO div offset on v3")
Cc [email protected] # 6.5: 5abed58a8bde
Cc Stephen Boyd <[email protected]>
Cc Abhinav Kumar <[email protected]>
Cc Dmitry Baryshkov <[email protected]>
Quoted 6 lines
---
  drivers/phy/qualcomm/phy-qcom-qmp-combo.c     | 2 ++
  drivers/phy/qualcomm/phy-qcom-qmp-dp-phy-v5.h | 1 +
  drivers/phy/qualcomm/phy-qcom-qmp-dp-phy-v6.h | 1 +
  3 files changed, 4 insertions(+)
maintainer Applied
#4 lore raw
In reply to Johan Hovold
Quoted 9 lines · Johan Hovold

Commit 5abed58a8bde ("phy: qcom: qmp-combo: Fix VCO div offset on v3") fixed a regression introduced in 6.5 by making sure that the correct offset is used for the DP_PHY_VCO_DIV register on v3 hardware.

Unfortunately, that fix instead broke DisplayPort on v5_5nm and v6 hardware as it failed to add the corresponding offsets also to those register tables.

[...]

Applied, thanks!

[1/1] phy: qcom: qmp-combo: fix VCO div offset on v5_5nm and v6

      commit: 025a6f7448f7bb5f4fceb62498ee33d89ae266bb

Best regards,

Signature · 1 line
~Vinod