Jiawen Wu f629acc6f2 net: pcs: xpcs: support to switch mode for Wangxun NICs
According to chapter 6 of DesignWare Cores Ethernet PCS (version 3.20a)
and custom design manual, add a configuration flow for switching interface
mode.

If the interface changes, the following setting is required:
1. wait VR_XS_PCS_DIG_STS bit(4, 2) [PSEQ_STATE] = 100b (Power-Good)
2. write SR_XS_PCS_CTRL2 to select various PCS type
3. write SR_PMA_CTRL1 and/or SR_XS_PCS_CTRL1 for link speed
4. program PMA registers
5. write VR_XS_PCS_DIG_CTRL1 bit(15) [VR_RST] = 1b (Vendor-Specific
   Soft Reset)
6. wait for VR_XS_PCS_DIG_CTRL1 bit(15) [VR_RST] to get cleared

Only 10GBASE-R/SGMII/1000BASE-X modes are planned for the current Wangxun
devices. And there is a quirk for Wangxun devices to switch mode although
the interface in phylink state has not changed, since PCS will change to
default 10GBASE-R when the ethernet driver(txgbe) do LAN reset.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2023-08-25 07:42:58 +01:00
..
2023-06-29 11:00:17 -07:00
2023-06-29 08:09:31 -06:00
2023-08-12 02:36:28 +03:00
2023-07-26 11:47:57 -07:00
2023-08-07 00:01:41 +05:30
2023-08-18 06:57:38 +10:00
2023-07-13 19:13:24 -07:00
2023-06-29 15:28:33 -07:00
2023-08-19 13:13:55 +02:00
2023-07-03 10:55:04 -07:00
2023-08-11 12:14:08 -07:00
2023-06-15 13:42:18 +02:00
2023-08-11 09:39:17 -07:00
2023-07-05 12:55:06 -07:00
2023-07-03 17:03:05 -07:00
2023-06-29 15:22:19 -07:00
2023-07-03 10:43:10 -07:00
2023-08-13 08:43:26 -07:00
2023-07-30 11:47:56 -07:00
2023-07-08 12:35:18 -07:00
2023-06-29 15:22:19 -07:00
2023-07-27 07:53:12 +02:00