mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-08-30 14:52:51 +08:00
Add SMI configuration support for dual 10G Ethernet
This commit is contained in:
@@ -1666,7 +1666,11 @@ void init_smi(void)
|
|||||||
/* Set the SMI(i.e.I2C) type for PHY polling, 0b01 is 2.5/10G PHY. Disable (0b00) for the SFP-ports
|
/* Set the SMI(i.e.I2C) type for PHY polling, 0b01 is 2.5/10G PHY. Disable (0b00) for the SFP-ports
|
||||||
* which are at port 8 and additionally at port 3 for a dual SFP device
|
* which are at port 8 and additionally at port 3 for a dual SFP device
|
||||||
*/
|
*/
|
||||||
|
if (machine.n_10g == 2) {
|
||||||
|
REG_SET(RTL837X_REG_SMI_MAC_TYPE, 0x00015555);
|
||||||
|
} else {
|
||||||
REG_SET(RTL837X_REG_SMI_MAC_TYPE, machine.n_sfp == 2 ? 0x00005515 : 0x00005555);
|
REG_SET(RTL837X_REG_SMI_MAC_TYPE, machine.n_sfp == 2 ? 0x00005515 : 0x00005555);
|
||||||
|
}
|
||||||
|
|
||||||
// Configure polling of all PHYs by the MAC to detect link-state changes
|
// Configure polling of all PHYs by the MAC to detect link-state changes
|
||||||
if (machine_detected.isRTL8373) {
|
if (machine_detected.isRTL8373) {
|
||||||
@@ -1693,6 +1697,11 @@ void init_smi(void)
|
|||||||
sfr_mask_data(1, 0x80, 0);
|
sfr_mask_data(1, 0x80, 0);
|
||||||
reg_write_m(RTL837X_REG_SMI_PORT0_5_ADDR);
|
reg_write_m(RTL837X_REG_SMI_PORT0_5_ADDR);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (machine.n_10g == 2) {
|
||||||
|
// Set address of second external PHY on port 8
|
||||||
|
REG_SET(RTL837X_REG_SMI_PORT6_9_ADDR, 0x000040e6);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user