Datasheet

2016-2017 Microchip Technology Inc. DS00002112B-page 109
KSZ8795CLX
To read out all the counters, the best performance over the SPI bus is (160+3) × 8 × 20 = 26 µs, where there are 160
registers, 3 overhead, 8 clocks per access, at 50 MHz. In the heaviest condition, the byte counter will overflow in 2 min-
utes. It is recommended that the software read all the counters at least every 30 seconds. All port MIB counters are
designed as “read clear.”
4.11 MIIM Registers
All the registers defined in this section can be also accessed via the SPI interface.
Note that different mapping mechanisms are used for MIIM and SPI. The “PHYAD” defined in IEEE is assigned as “0x1”
for Port 1, “0x2” for Port 2, “0x3” for Port 3 and “0x4” for Port 4. The “REGAD” supported are 0x0-0x5 (0h-5h), 0x1D
(1dh) and 0x1F (1fh).
TABLE 4-31: MIIM REGISTERS
Address Name Description Mode Default
Register 0h: Basic Control
15 Soft Reset 1 = PHY soft reset.
0 = Normal operation.
R/W
(SC)
0
14 Loopback 1 = Perform MAC loopback, loopback path as fol-
lows:
Assume the loopback is at Port 1 MAC, Port 2 is
the monitor port.
Port 1 MAC Loopback (Port 1 Reg. 0,
Bit[14] = ‘1’
Start: RXP2/RXM2 (Port 2). Can also start from
Port 3, 4, 5
Loopback: MAC/PHY interface of Port 1’s MAC
End: TXP2/TXM2 (Port 2). Can also end at Ports 3,
4, 5 respectively
Setting address 0x3, 4, 5 Reg. 0, Bit[14] = ‘1’ will
perform MAC loopback on Ports 3, 4, 5, respec-
tively.
0 = Normal Operation.
R/W 0
13 Force 100 1 = 100 Mbps.
0 = 10 Mbps.
R/W 1
12 AN Enable 1 = Auto-Negotiation enabled.
0 = Auto-Negotiation disabled.
R/W 1
11 Power Down 1 = Power down.
0 = Normal operation.
R/W 0
10 PHY Isolate 1 = Electrical PHY isolation of PHY from Tx+/Tx-.
0 = Normal operation.
R/W 0
9 Restart AN 1 = Restart Auto-Negotiation.
0 = Normal operation.
R/W 0
8 Force Full
Duplex
1 = Full duplex.
0 = Half duplex.
R/W 1
7 Reserved — RO 0
6 Reserved — RO 0
5 Hp_mdix 1 = HP Auto-MDI/MDIX mode
0 = Microchip Auto-MDI/MDIX mode
R/W 1
4 Force MDI 1 = MDI mode when disable Auto-MDI/MDIX.
0 = MDIX mode when disable Auto-MDI/MDIX.
R/W 0
3 Disable Auto
MDI/MDI-X
1 = Disable Auto-MDI/MDIX.
0 = Enable Auto-MDI/MDIX.
R/W 0
2 Disable Far
End Fault
1 = Disable far end fault detection.
0 = Normal operation.
R/W 0