Skip to content

Commit 34e9a23

Browse files
committed
fix patch
1 parent d1d0404 commit 34e9a23

1 file changed

Lines changed: 19 additions & 9 deletions

File tree

openwrt-24.10/patches/target/linux/rockchip/patches-6.6/402-2-rk3399-fix-pci-lanes.patch renamed to openwrt-24.10/patches/target/linux/rockchip/patches-6.6/032-06-v6.17-phy-rockchip-pcie-Enable-all-four-lanes-if-required.patch

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,41 @@
1-
From 77f6dfcb20c2dc6a4a2f5303709c6fa0c7b65f30 Mon Sep 17 00:00:00 2001
1+
From c3fe7071e196e25789ecf90dbc9e8491a98884d7 Mon Sep 17 00:00:00 2001
22
From: Valmantas Paliksa <walmis@gmail.com>
3-
Date: Thu, 12 Dec 2024 12:24:33 +0200
4-
Subject: [PATCH] Disable PHY_LANE_IDLE_OFF for each instance of rockchip_pcie_phy_power_one
3+
Date: Mon, 30 Jun 2025 19:25:14 -0300
4+
Subject: [PATCH] phy: rockchip-pcie: Enable all four lanes if required
55

6-
This patch fixes an issue in the Rockchip PCIe PHY driver where, after a warm restart of the rockchip_pcie_phy module, PCIe lanes other than lane 0 could remain stuck in the PHY_LANE_IDLE_OFF state. This resulted in the PCIe link being restricted to x1 mode, even in configurations designed to use multiple lanes.
6+
Current code enables only Lane 0 because pwr_cnt will be incremented on
7+
first call to the function. Let's reorder the enablement code to enable
8+
all 4 lanes through GRF.
9+
10+
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
11+
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
712

813
Signed-off-by: Valmantas Paliksa <walmis@gmail.com>
14+
Signed-off-by: Geraldo Nascimento <geraldogabriel@gmail.com>
15+
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
16+
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
17+
Link: https://lore.kernel.org/r/16b610aab34e069fd31d9f57260c10df2a968f80.1751322015.git.geraldogabriel@gmail.com
18+
Signed-off-by: Vinod Koul <vkoul@kernel.org>
919
---
1020
drivers/phy/rockchip/phy-rockchip-pcie.c | 12 ++++++------
1121
1 file changed, 6 insertions(+), 6 deletions(-)
1222

1323
--- a/drivers/phy/rockchip/phy-rockchip-pcie.c
1424
+++ b/drivers/phy/rockchip/phy-rockchip-pcie.c
15-
@@ -166,6 +166,12 @@ static int rockchip_pcie_phy_power_on(st
16-
unsigned long timeout;
25+
@@ -165,6 +165,12 @@ static int rockchip_pcie_phy_power_on(st
1726

1827
mutex_lock(&rk_phy->pcie_mutex);
19-
+
28+
2029
+ regmap_write(rk_phy->reg_base,
2130
+ rk_phy->phy_data->pcie_laneoff,
2231
+ HIWORD_UPDATE(!PHY_LANE_IDLE_OFF,
2332
+ PHY_LANE_IDLE_MASK,
2433
+ PHY_LANE_IDLE_A_SHIFT + inst->index));
25-
34+
+
2635
if (rk_phy->pwr_cnt++)
2736
goto err_out;
28-
@@ -181,12 +187,6 @@ static int rockchip_pcie_phy_power_on(st
37+
38+
@@ -179,12 +185,6 @@ static int rockchip_pcie_phy_power_on(st
2939
PHY_CFG_ADDR_MASK,
3040
PHY_CFG_ADDR_SHIFT));
3141

0 commit comments

Comments
 (0)