mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-08-30 14:52:51 +08:00
N-type SOC need to swap some Serdes lines to make it work.
Without this fix N-type SOC devices like RTL8372N, RTL8383N and also the 4-port PHY RTL8224N, don't have a functional Serdes. Although the SOC sees a link, there is no packet flow on both SFP-port nor RTL8224 ports. Added helper functions to read/write to the RTL8224. RTL8224 has the same register layout so we can use the same register defines as for the main SOC.
This commit is contained in:
+15
-2
@@ -2,7 +2,7 @@
|
||||
#define _RTL837X_REGS_H_
|
||||
|
||||
#define RTL837X_REG_CHIP_ID 0x0004
|
||||
#define RTL837X_REG_CHIP_INFO 0x000c
|
||||
#define RTL837X_REG_CHIP_INFO 0x000c
|
||||
#define RTL837X_REG_RESET 0x0024
|
||||
#define RESET_SOC_BIT 0
|
||||
#define RESET_NIC_BIT 2
|
||||
@@ -36,7 +36,20 @@
|
||||
#define RTL837X_REG_SEC_COUNTER2 0x06f8
|
||||
// Used for counting seconds
|
||||
|
||||
#define RTL837X_REG_SDS_MODES 0x7b20
|
||||
|
||||
/*
|
||||
* SDS
|
||||
*/
|
||||
#define RTL837X_SDS_INDACS_CMD 0x3F8
|
||||
#define RTL837X_SDS_INDACS_WRITE_DATA 0x400
|
||||
#define RTL837X_REG_SDS_MODES 0x7b20
|
||||
|
||||
/*
|
||||
* PHY
|
||||
*/
|
||||
#define RTL837X_CFG_PHY_TX_POLARITY_SWAP 0xA94
|
||||
#define RTL837X_CFG_PHY_MDI_REVERSE 0xA90
|
||||
|
||||
/*
|
||||
* 5 Bits each give the state of the 2 SerDes of the RTL8372
|
||||
* Values are:
|
||||
|
||||
Reference in New Issue
Block a user