[PATCH v1 17/23] phy: marvell: fix handling of unconnected comphy

Stefan Roese sr at denx.de
Wed Mar 24 15:06:43 CET 2021


From: Christine Gharzuzi <chrisg at marvell.com>

- the default value of comphy pipe selector is set to PCIe (x4)
  in case of unconnected comphy the default value remains 0x4
  which may lead to several issues with comphy initialization.

- this patch adds SMC call that powers off the comphy lane in case of
  unconnected comphy.

Signed-off-by: Christine Gharzuzi <chrisg at marvell.com>
Signed-off-by: Igal Liberman <igall at marvell.com>
Reviewed-by: Grzegorz Jaszczyk <jaz at semihalf.com>
Signed-off-by: Stefan Roese <sr at denx.de>
---

 drivers/phy/marvell/comphy_cp110.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/phy/marvell/comphy_cp110.c b/drivers/phy/marvell/comphy_cp110.c
index 55202888194d..d9a94f9d0d09 100644
--- a/drivers/phy/marvell/comphy_cp110.c
+++ b/drivers/phy/marvell/comphy_cp110.c
@@ -553,6 +553,10 @@ int comphy_cp110_init(struct chip_serdes_phy_config *ptr_chip_cfg,
 		}
 		switch (ptr_comphy_map->type) {
 		case COMPHY_TYPE_UNCONNECTED:
+			ret = comphy_smc(MV_SIP_COMPHY_POWER_OFF,
+					 ptr_chip_cfg->comphy_base_addr,
+					 lane,
+					 ptr_comphy_map->type);
 		case COMPHY_TYPE_IGNORE:
 			continue;
 			break;
-- 
2.31.0



More information about the U-Boot mailing list