1
linux/drivers/phy/freescale
Richard Zhu f89263b697 phy: freescale: imx8m-pcie: Do CMN_RST just before PHY PLL lock check
When enable initcall_debug together with higher debug level below.
CONFIG_CONSOLE_LOGLEVEL_DEFAULT=9
CONFIG_CONSOLE_LOGLEVEL_QUIET=9
CONFIG_MESSAGE_LOGLEVEL_DEFAULT=7

The initialization of i.MX8MP PCIe PHY might be timeout failed randomly.
To fix this issue, adjust the sequence of the resets refer to the power
up sequence listed below.

i.MX8MP PCIe PHY power up sequence:
                          /---------------------------------------------
1.8v supply     ---------/
                    /---------------------------------------------------
0.8v supply     ---/

                ---\ /--------------------------------------------------
                    X        REFCLK Valid
Reference Clock ---/ \--------------------------------------------------
                             -------------------------------------------
                             |
i_init_restn    --------------
                                    ------------------------------------
                                    |
i_cmn_rstn      ---------------------
                                         -------------------------------
                                         |
o_pll_lock_done --------------------------

Logs:
imx6q-pcie 33800000.pcie: host bridge /soc@0/pcie@33800000 ranges:
imx6q-pcie 33800000.pcie:       IO 0x001ff80000..0x001ff8ffff -> 0x0000000000
imx6q-pcie 33800000.pcie:      MEM 0x0018000000..0x001fefffff -> 0x0018000000
probe of clk_imx8mp_audiomix.reset.0 returned 0 after 1052 usecs
probe of 30e20000.clock-controller returned 0 after 32971 usecs
phy phy-32f00000.pcie-phy.4: phy poweron failed --> -110
probe of 30e10000.dma-controller returned 0 after 10235 usecs
imx6q-pcie 33800000.pcie: waiting for PHY ready timeout!
dwhdmi-imx 32fd8000.hdmi: Detected HDMI TX controller v2.13a with HDCP (samsung_dw_hdmi_phy2)
imx6q-pcie 33800000.pcie: probe with driver imx6q-pcie failed with error -110

Fixes: dce9edff16 ("phy: freescale: imx8m-pcie: Add i.MX8MP PCIe PHY support")
Cc: stable@vger.kernel.org
Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Frank Li <Frank.Li@nxp.com>

v2 changes:
- Rebase to latest fixes branch of linux-phy git repo.
- Richard's environment have problem and can't sent out patch. So I help
post this fix patch.

Link: https://lore.kernel.org/r/20241021155241.943665-1-Frank.Li@nxp.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
2024-10-21 23:18:29 +05:30
..
Kconfig phy: freescale: imx8qm-hsio: Add i.MX8QM HSIO PHY driver support 2024-06-15 17:52:01 +05:30
Makefile phy: freescale: imx8qm-hsio: Add i.MX8QM HSIO PHY driver support 2024-06-15 17:52:01 +05:30
phy-fsl-imx8-mipi-dphy.c
phy-fsl-imx8m-pcie.c phy: freescale: imx8m-pcie: Do CMN_RST just before PHY PLL lock check 2024-10-21 23:18:29 +05:30
phy-fsl-imx8mq-usb.c phy: fsl-imx8mq-usb: fix tuning parameter name 2024-08-04 22:12:26 +05:30
phy-fsl-imx8qm-hsio.c phy: freescale: imx8qm-hsio: Include bitfield.h for FIELD_PREP 2024-06-20 21:56:11 +05:30
phy-fsl-imx8qm-lvds-phy.c phy: constify of_phandle_args in xlate 2024-02-23 17:43:14 +05:30
phy-fsl-lynx-28g.c phy: constify of_phandle_args in xlate 2024-02-23 17:43:14 +05:30
phy-fsl-samsung-hdmi.c phy: freescale: fsl-samsung-hdmi: Convert to platform remove callback returning void 2024-04-12 15:18:42 +05:30