Skip to content

Fix PCI SATA link training instability on rock-5-itx#382

Merged
igorpecovnik merged 2 commits intoarmbian:rk-6.1-rkr5.1from
prahal:fix-rock5itx-pcie-link-training
Aug 11, 2025
Merged

Fix PCI SATA link training instability on rock-5-itx#382
igorpecovnik merged 2 commits intoarmbian:rk-6.1-rkr5.1from
prahal:fix-rock5itx-pcie-link-training

Conversation

@prahal
Copy link
Contributor

@prahal prahal commented Aug 10, 2025

From upstrea:

Disable common refclk for the pcie phy on rock-5-itx.
On Radxa rock-5-itx the SATA endpoint was unstable. Most of the time, the drives attached to it were not detected.

Jira reference number AR-2561 (though this fix is only applied for the vendor kernel on rock-5-itx)

floatious and others added 2 commits August 11, 2025 00:23
…n-refclk-mode

>From the RK3588 Technical Reference Manual, Part1,
section 6.19 PCIe3PHY_GRF Register Description:
"rxX_cmn_refclk_mode"
RX common reference clock mode for lane X. This mode should be enabled
only when the far-end and near-end devices are running with a common
reference clock.

The hardware reset value for this field is 0x1 (enabled).
Note that this register field is only available on RK3588, not on RK3568.

The link training either fails or is highly unstable (link state will jump
continuously between L0 and recovery) when this mode is enabled while
using an endpoint running in Separate Reference Clock with No SSC (SRNS)
mode or Separate Reference Clock with SSC (SRIS) mode.
(Which is usually the case when using a real SoC as endpoint, e.g. the
RK3588 PCIe controller can run in both Root Complex and Endpoint mode.)

Add support for the device tree property rockchip,rx-common-refclk-mode,
such that the PCIe PHY can be used in configurations where the Root
Complex and Endpoint are not using a common reference clock.

Signed-off-by: Niklas Cassel <cassel@kernel.org>
Link: https://lore.kernel.org/r/20240412125818.17052-3-cassel@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Alban Browaeys <alban.browaeys@gmail.com>
Based on upstream initial dts definition.

Signed-off-by: Alban Browaeys <alban.browaeys@gmail.com>
@igorpecovnik igorpecovnik merged commit fcd6317 into armbian:rk-6.1-rkr5.1 Aug 11, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Comments