]> git.ipfire.org Git - thirdparty/linux.git/commit
phy: cadence-torrent: Add PCIe + XAUI multilink configuration for 100MHz refclk
authorSwapnil Jakhade <sjakhade@cadence.com>
Mon, 12 Jan 2026 05:46:31 +0000 (11:16 +0530)
committerVinod Koul <vkoul@kernel.org>
Wed, 14 Jan 2026 09:33:09 +0000 (15:03 +0530)
commit02cf3710c55d55d956f080e6610b841e2b6ddca0
treef52e1e233b3549168283e519dd3fa67158af55c5
parenta632a2a0db8b4d24076a03889efa25c6058d0746
phy: cadence-torrent: Add PCIe + XAUI multilink configuration for 100MHz refclk

Add register sequences for PCIe + XAUI multilink configuration for
100MHz reference clock.

The register sequences are fetched from a table by indexing entries based
on unique 'keys' generated by the Bitwise OR defined below:
REFCLK0_RATE | REFCLK1_RATE | LINK0_TYPE | LINK1_TYPE | SSC_TYPE

As of now, LINK_TYPE is a 3-bit value corresponding to the PHY type.
With the introduction of TYPE_XAUI, we need a 4-bit value to represent
the LINK_TYPE as TYPE_XAUI has the numerical value 8. Hence, extend the
LINKx_MASK macros to 4-bit masks. While at it, extend REFCLKx_MASK macros
as well to 4-bit masks to support reference clock frequencies that will be
added in the future.

Adjust the 'LINKx_SHIFT' and the 'REFCLKx_SHIFT' macros to account for
the aforementioned changes made to the masks.

Signed-off-by: Swapnil Jakhade <sjakhade@cadence.com>
[s-vadapalli: elaborated on changes made to macros in the commit message]
Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/20260112054636.108027-3-s-vadapalli@ti.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/phy/cadence/phy-cadence-torrent.c