rockchip64: rk3399 fix pcie being stuck at 1x width after a warm phy reset #7572
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
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 thePHY_LANE_IDLE_OFF
state. This resulted in the PCIe link being restricted to x1 mode, even in configurations designed to use multiple lanes.The patch moves the
regmap_write
block, which disables thePHY_LANE_IDLE_OFF
state, to a position before theif (rk_phy->pwr_cnt++) goto err_out;
condition. This ensures that all lanes are properly re-enabled during therockchip_pcie_phy_power_on
function, which is called for each pcie lane, fixing the multi-lane handling issue.GitHub issue reference:
#6655
Documentation summary for feature / change
rockchip_pcie_phy_power_on
by addressing a warm restart issue that left non-zero lanes in thePHY_LANE_IDLE_OFF
state. This fixes scenarios where the PCIe link was incorrectly limited to x1 mode.How Has This Been Tested?
This patch has been tested with the following:
Checklist: