Matthias Schiffer 4b10bcfdef net: ethernet: ti: am65-cpsw: fix up PHY mode for fixed RGMII TX delay
The am65-cpsw driver currently sets the SEL_RGMII_IDMODE flag in a MAC's
mode register to enable or disable the TX delay. While this was supported
for earlier generations of the CPSW controller, the datasheets of all
modern TI SoCs using the am65-cpsw MAC state that the TX delay is fixed,
and the SEL_RGMII_IDMODE bit is documented as reserved in most of them.
Furthermore, while it was found that this bit does in fact disable the TX
delay, [1] states that this setting is truly unsupported by TI and not
just undocumented.

Following the clarification of the rgmii* phy-mode values in the Linux
DT bindings in [2], the Linux am65-cpsw driver was changed in [3] to
account for the fixed TX delay by fixing up the mode passed to the PHY
driver; a similar fixup already existed in the TI icssg-prueth driver.
[4] followed up on this by explicitly clearing the SEL_RGMII_IDMODE flag
to handle the case where it is set by the bootloader or other firmware
before Linux.

With the above changes, Device Trees that set the recommended "rgmii-id"
mode are now appearing in Linux 6.17+. Avoid setting the unsupported
SEL_RGMII_IDMODE flag for such Device Trees, and instead fix up the PHY
interface mode, thus aligning the U-Boot driver with the Linux kernel.

[1] https://www.spinics.net/lists/netdev/msg1112647.html
[2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c360eb0c3ccb95306704fd221442283ee82f1f58
[3] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ca13b249f291f4920466638d1adbfb3f9c8db6e9
[4] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a22d3b0d49d411e64ed07e30c2095035ecb30ed2

Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
2025-10-10 11:07:44 -06:00
..
2025-08-27 15:39:58 +08:00
2021-09-28 18:50:56 +03:00
2025-05-05 14:16:50 -06:00
2025-05-05 14:16:50 -06:00
2022-12-07 16:04:17 -05:00
2025-09-30 12:01:36 +02:00
2022-11-28 10:25:17 -05:00
2024-07-22 10:53:05 -06:00
2025-08-01 09:30:47 +02:00
2022-12-22 10:31:48 -05:00
2025-05-04 20:25:03 +02:00
2025-08-06 16:52:27 +02:00
2025-07-10 19:26:55 +02:00
2024-01-29 22:35:02 -05:00