linux-stable/drivers/phy
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
..
allwinner phy: constify of_phandle_args in xlate 2024-02-23 17:43:14 +05:30
amlogic phy: constify of_phandle_args in xlate 2024-02-23 17:43:14 +05:30
broadcom phy: usb: disable COMMONONN for dual mode 2024-10-11 13:56:25 +05:30
cadence phy: cadence: Sierra: Fix offset of DEQ open eye algorithm control register 2024-10-07 11:55:34 +05:30
freescale phy: freescale: imx8m-pcie: Do CMN_RST just before PHY PLL lock check 2024-10-21 23:18:29 +05:30
hisilicon phy: hisilicon: usb2: Simplify with scoped for each OF child loop 2024-08-30 13:26:37 +05:30
ingenic phy: Explicitly include correct DT includes 2023-07-17 11:52:56 +05:30
intel phy: constify of_phandle_args in xlate 2024-02-23 17:43:14 +05:30
lantiq phy: constify of_phandle_args in xlate 2024-02-23 17:43:14 +05:30
marvell phy: marvell: phy-mvebu-cp110-comphy: improve eth_port1 on comphy4 2024-08-04 22:52:11 +05:30
mediatek phy: mediatek: xsphy: Simplify with scoped for each OF child loop 2024-08-30 13:26:37 +05:30
microchip phy-for-6.9 2024-03-16 11:24:51 -07:00
motorola phy: Drop unnecessary of_match_device() calls 2023-10-13 15:47:53 +05:30
mscc phy: constify of_phandle_args in xlate 2024-02-23 17:43:14 +05:30
nuvoton phy: nuvoton: add new driver for the Nuvoton MA35 SoC USB 2.0 PHY 2024-08-29 23:52:37 +05:30
qualcomm phy: qcom: qmp-pcie: drop bogus x1e80100 qref supplies 2024-10-17 20:12:05 +05:30
ralink phy: constify of_phandle_args in xlate 2024-02-23 17:43:14 +05:30
realtek phy: realtek: usb: add new driver for the Realtek RTD SoC USB 3.0 PHY 2024-01-27 17:36:14 -08:00
renesas phy: renesas: rcar-gen3-usb2: Add support for the RZ/G3S SoC 2024-08-30 13:33:44 +05:30
rockchip phy: phy-rockchip-samsung-hdptx: Depend on CONFIG_COMMON_CLK 2024-10-17 20:49:16 +05:30
samsung phy-for-6.12 2024-09-23 14:05:10 -07:00
socionext phy: constify of_phandle_args in xlate 2024-02-23 17:43:14 +05:30
st phy: miphy28lp: remove unused struct 'miphy_initval' 2024-06-03 19:29:44 +05:30
starfive phy: starfive: jh7110-usb: Fix link configuration to controller 2024-10-17 20:19:44 +05:30
sunplus phy: sunplus: return negative error code in sp_usb_phy_probe 2023-11-27 18:39:18 +05:30
tegra USB/Thunderbolt changes for 6.9-rc1 2024-03-21 12:35:20 -07:00
ti phy: ti: phy-j721e-wiz: fix usxgmii configuration 2024-10-17 20:23:02 +05:30
xilinx phy: xilinx: phy-zynqmp: Fix SGMII linkup failure on resume 2024-08-05 21:46:58 +05:30
Kconfig phy: nuvoton: add new driver for the Nuvoton MA35 SoC USB 2.0 PHY 2024-08-29 23:52:37 +05:30
Makefile phy: nuvoton: add new driver for the Nuvoton MA35 SoC USB 2.0 PHY 2024-08-29 23:52:37 +05:30
phy-airoha-pcie-regs.h phy: airoha: Add dtime and Rx AEQ IO registers 2024-07-02 18:54:28 +05:30
phy-airoha-pcie.c phy: airoha: adjust initialization delay in airoha_pcie_phy_init() 2024-08-29 23:48:51 +05:30
phy-can-transceiver.c phy: phy-can-transceiver: insert space after include 2023-12-21 22:39:59 +05:30
phy-core-mipi-dphy.c phy: dphy: add support to calculate the timing based on hs_clk_rate 2022-10-27 14:38:04 +03:00
phy-core.c phy: core: Fix documentation of of_phy_get 2024-07-02 18:49:32 +05:30
phy-lgm-usb.c phy: phy-lgm-usb: Convert to platform remove callback returning void 2023-03-20 18:14:56 +05:30
phy-lpc18xx-usb-otg.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
phy-pistachio-usb.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 422 2019-06-05 17:37:15 +02:00
phy-xgene.c phy: constify of_phandle_args in xlate 2024-02-23 17:43:14 +05:30