Skip to content

Commit 7f7315d

Browse files
LorenzoBianconivinodkoul
authored andcommitted
phy: airoha: adjust initialization delay in airoha_pcie_phy_init()
Align phy-pcie initialization delay to the vendor sdk in airoha_pcie_phy_init routine and allow the hw to complete required configuration before proceeding Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Signed-off-by: Lorenzo Bianconi <[email protected]> Link: https://lore.kernel.org/r/8af6f27857619f1e0dd227f08b8584ae8fb22fb2.1722959625.git.lorenzo@kernel.org Signed-off-by: Vinod Koul <[email protected]>
1 parent 45a4237 commit 7f7315d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

drivers/phy/phy-airoha-pcie.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
#define LEQ_LEN_CTRL_MAX_VAL 7
1919
#define FREQ_LOCK_MAX_ATTEMPT 10
2020

21+
/* PCIe-PHY initialization time in ms needed by the hw to complete */
22+
#define PHY_HW_INIT_TIME_MS 30
23+
2124
enum airoha_pcie_port_gen {
2225
PCIE_PORT_GEN1 = 1,
2326
PCIE_PORT_GEN2,
@@ -1181,7 +1184,8 @@ static int airoha_pcie_phy_init(struct phy *phy)
11811184
airoha_phy_pma1_set_bits(pcie_phy, REG_PCIE_PMA_SS_DA_XPON_PWDB0,
11821185
PCIE_DA_XPON_CDR_PR_PWDB);
11831186

1184-
usleep_range(100, 200);
1187+
/* Wait for the PCIe PHY to complete initialization before returning */
1188+
msleep(PHY_HW_INIT_TIME_MS);
11851189

11861190
return 0;
11871191
}

0 commit comments

Comments
 (0)