linux/drivers/phy
Richard Zhu 163e632379 phy: freescale: imx8m-pcie: Do CMN_RST just before PHY PLL lock check
[ Upstream commit f89263b697 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-08 16:28:24 +01:00
..
allwinner
amlogic
broadcom
cadence phy: cadence-torrent: Check return value on register read 2024-08-03 08:54:35 +02:00
freescale phy: freescale: imx8m-pcie: Do CMN_RST just before PHY PLL lock check 2024-11-08 16:28:24 +01:00
hisilicon
ingenic
intel
lantiq
marvell phy: marvell: a3700-comphy: Fix hardcoded array size 2024-05-02 16:32:48 +02:00
mediatek
microchip
motorola
mscc
qualcomm phy: qcom: qmp-usb-legacy: fix NULL-deref on runtime suspend 2024-11-08 16:28:22 +01:00
ralink
renesas phy: renesas: rcar-gen3-usb2: Fix returning wrong error code 2024-02-16 19:10:42 +01:00
rockchip phy: rockchip: naneng-combphy: Fix mux on rk3588 2024-05-02 16:32:48 +02:00
samsung
socionext
st
starfive
sunplus phy: sunplus: return negative error code in sp_usb_phy_probe 2024-01-10 17:16:57 +01:00
tegra phy: tegra: xusb: Add API to retrieve the port number of phy 2024-04-03 15:28:28 +02:00
ti phy: ti: tusb1210: Resolve charger-det crash if charger psy is unregistered 2024-05-02 16:32:49 +02:00
xilinx phy: zynqmp: Take the phy mutex in xlate 2024-09-12 11:11:35 +02:00
Kconfig
Makefile
phy-can-transceiver.c
phy-core-mipi-dphy.c
phy-core.c
phy-lgm-usb.c
phy-lpc18xx-usb-otg.c
phy-pistachio-usb.c
phy-xgene.c