linux/drivers/phy/rockchip
Sebastian Reichel 1da7f6abd3 phy: rockchip: naneng-combphy: Fix mux on rk3588
[ Upstream commit d16d4002fe ]

The pcie1l0_sel and pcie1l1_sel bits in PCIESEL_CON configure the
mux for PCIe1L0 and PCIe1L1 to either the PIPE Combo PHYs or the
PCIe3 PHY. Thus this configuration interfers with the data-lanes
configuration done by the PCIe3 PHY.

RK3588 has three Combo PHYs. The first one has a dedicated PCIe
controller and is not affected by this. For the other two Combo
PHYs, there is one mux for each of them.

pcie1l0_sel selects if PCIe 1L0 is muxed to Combo PHY 1 when
bit is set to 0 or to the PCIe3 PHY when bit is set to 1.

pcie1l1_sel selects if PCIe 1L1 is muxed to Combo PHY 2 when
bit is set to 0 or to the PCIe3 PHY when bit is set to 1.

Currently the code always muxes 1L0 and 1L1 to the Combi PHYs
once one of them is being used in PCIe mode. This is obviously
wrong when at least one of the ports should be muxed to the
PCIe3 PHY.

Fix this by introducing Combo PHY identification and then only
setting up the required bit.

Fixes: a03c442772 ("phy: rockchip: Add naneng combo phy support for RK3588")
Reported-by: Michal Tomek <mtdev79b@gmail.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Link: https://lore.kernel.org/r/20240404-rk3588-pcie-bifurcation-fixes-v1-3-9907136eeafd@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-05-02 16:32:48 +02:00
..
Kconfig phy: rockchip: Support PCIe v3 2022-09-04 20:35:48 +05:30
Makefile phy: rockchip: Support PCIe v3 2022-09-04 20:35:48 +05:30
phy-rockchip-dp.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 178 2019-05-30 11:29:19 -07:00
phy-rockchip-dphy-rx0.c phy: Explicitly include correct DT includes 2023-07-17 11:52:56 +05:30
phy-rockchip-emmc.c phy: rockchip: emmc, add vendor prefix to dts properties 2021-01-13 17:28:24 +05:30
phy-rockchip-inno-csidphy.c phy: rockchip: phy-rockchip-inno-csidphy: Convert to platform remove callback returning void 2023-03-20 18:14:57 +05:30
phy-rockchip-inno-dsidphy.c phy: rockchip: inno-dsidphy: Add rv1126 support 2023-08-22 19:28:11 +05:30
phy-rockchip-inno-hdmi.c phy: Explicitly include correct DT includes 2023-07-17 11:52:56 +05:30
phy-rockchip-inno-usb2.c phy: phy-rockchip-inno-usb2: improve error message 2023-07-12 22:27:41 +05:30
phy-rockchip-naneng-combphy.c phy: rockchip: naneng-combphy: Fix mux on rk3588 2024-05-02 16:32:48 +02:00
phy-rockchip-pcie.c phy: rockchip-pcie: remove unused phy_rd_cfg function 2023-03-31 19:23:13 +05:30
phy-rockchip-snps-pcie3.c phy: rockchip-snps-pcie3: fix clearing PHP_GRF_PCIESEL_CON bits 2024-05-02 16:32:48 +02:00
phy-rockchip-typec.c phy: rockchip: phy-rockchip-typec: Use devm_platform_get_and_ioremap_resource() 2023-07-12 22:27:40 +05:30
phy-rockchip-usb.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 235 2019-06-19 17:09:07 +02:00