Ksz8873Mll/Fll/Rll: Integrated 3-Port 10/100 Managed Switch With Phys
Ksz8873Mll/Fll/Rll: Integrated 3-Port 10/100 Managed Switch With Phys
Ksz8873Mll/Fll/Rll: Integrated 3-Port 10/100 Managed Switch With Phys
Errata
An errata sheet, describing minor operational differences from the data sheet and recommended workarounds, may exist for cur-
rent devices. As device/documentation issues become known to us, we will publish an errata sheet. The errata will specify the
revision of silicon and revision of document to which it applies.
To determine if an errata sheet exists for a particular device, please check with one of the following:
• Microchip’s Worldwide Web site; http://www.microchip.com
• Your local Microchip sales office (see last page)
When contacting a sales office, please specify which device, revision of silicon and data sheet (include -literature number) you are
using.
1K LOOK-UP
ENGINE
FIFO, FLOW CONTROL, VLAN TAGGING, PRIORITY
10/100
HP AUTO 10/100
T/TX/FX
MDIX MAC 1
PHY 1
QUEUE
MANAGEMENT
10/100
HP AUTO 10/100
T/TX/FX
MDIX MAC 2
PHY 2
BUFFER
MANAGEMENT
10/100
MII/SNI MAC 3
FRAME
BUFFERS
MIB
SPI SPI
COUNTERS
MIIM
CONTROL EEPROM
REGISTERS INTERFACE
SMI
I2C
VDDA_1.8
P2LED0
P2LED1
P1LED0
P1LED1
VDDCO
P3SPD
FXSD1
P1FFC
VDDIO
VDDC
RSTN
GND
NC
NC
NC
64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49
RXM1 1 48 GND
RXP1 2 47 P1DPX
AGND 3 46 P1SPD
TXM1 4 45 P1ANEN
TXP1 5 44 NC
VDDA_3.3 6 43 SDA_MDIO
AGND 7 42 SCL_MDC
ISET 8 41 INTRN
VDDA_1.8 9 40 SPISN
RXM2 10 39 SPIQ
RXP2 11 38 VDDC
AGND 12 37 GND
TXM2 13 36 SMRXC3
TXP2 14 35 SCOL3
FXSD2 15 34 SCRS3
PWRDN 16 33 SMRXD30
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
SMRXD31
X1
X2
SMTXEN3
SMTXD33/EN_REFCLKO_3
SMTXD32
SMTXD31
SMTXD30
GND
VDDIO
SMTXC3/REFCLKI_3
SMTXER3/MII_LINK_3
SMRXDV3
SMRXD33/REFCLKO_3
SMRXD32
GND
Type
Pin Pin
Note Description
Number Name
2-1
9 VDDA_1.8 P 1.8V analog core power input from VDDCO (pin 56).
3.3V, 2.5V, or 1.8V digital VDD input power supply for IO with well decoupling
25 VDDIO P
capacitors.
Type
Pin Pin
Note Description
Number Name
2-1
Type
Pin Pin
Note Description
Number Name
2-1
38 VDDC P 1.8V digital core power input from VDDCO (pin 56).
Interrupt
41 INTRN Opu Active-low signal to host CPU to indicate an interrupt status bit is set when
lost link. Refer to register 187 and 188.
Unused pin, only this NC pin can be pulled down by a pull-down resistor for
44 NC NC
better EMI.
49 VDDC P 1.8V digital core power input from VDDCO (Pin 56).
Type
Pin Pin
Note Description
Number Name
2-1
3.3V, 2.5V or 1.8V digital VDD input power supply for IO with well decoupling
54 VDDIO P
capacitors.
1.8V core power voltage output (internal 1.8V LDO regulator output), this
1.8V output pin provides power to both VDDA_1.8 and VDDC input pins.
56 VDDCO P Note: Internally 1.8V LDO regulator input comes from VDDIO. Do not connect
an external power supply to VDDCO pin. The ferrite bead is requested
between analog and digital 1.8V core power.
Type
Pin Pin
Note Description
Number Name
2-1
Type
Pin Pin
Note Description
Number Name
2-1
1.8V analog VDD input power supply from VDDCO (Pin 56) through external
64 VDDA_1.8 P
ferrite bead and capacitors.
Note 2-1 P = power supply
GND = ground
I = input
O = output
I/O = bi-directional
Ipu/O = Input with internal pull-up during reset; output pin otherwise.
Ipu = Input with internal pull-up.
Ipd = Input with internal pull-down.
Opu = Output with internal pull-up.
Opd = Output with internal pull-down.
Speed: Low (100BASE-TX), High (10BASE-T)
Full-Duplex: Low (full-duplex), High (half-duplex)
Activity: Toggle (transmit/receive activity)
Link: Low (link), High (no link)
1 1
Transmit Pair Receive Pair
2 2
Straight
3 3
Cable
4 4
Receive Pair Transmit Pair
5 5
6 6
7 7
8 8
1 Crossover 1
Receive Pair Cable Receive Pair
2 2
3 3
4 4
Transmit Pair Transmit Pair
5 5
6 6
7 7
8 8
3.1.11 AUTO-NEGOTIATION
The KSZ8873MLL/FLL/RLL conforms to the auto-negotiation protocol, defined in Clause 28 of the IEEE 802.3u speci-
fication.
Auto-negotiation allows unshielded twisted pair (UTP) link partners to select the best common mode of operation. In
auto-negotiation, link partners advertise their capabilities across the link to each other. If auto-negotiation is not sup-
ported or the KSZ8873MLL/FLL/RLL link partner is forced to bypass auto-negotiation, the KSZ8873MLL/FLL/RLL sets
its operating mode by observing the signal at its receiver. This is known as parallel detection, and allows the
KSZ8873MLL/FLL/RLL to establish link by listening for a fixed signal protocol in the absence of auto-negotiation adver-
tisement protocol.
The link up process is shown in Figure 3-3.
START AUTO-NEGOTIATION
PARALLEL
FORCE LINK SETTING NO OPERATION
YES
BYPASS AUTO-NEGOTIATION ATTEMPT AUTO- LISTEN FOR 100BASE-TX LISTEN FOR 10BASE-T
AND SET LINK MODE NEGOTIATION IDLES LINK PULSES
NO
JOIN FLOW
YES
3.1.12.1 Access
LinkMD is initiated by accessing the PHY special control/status registers {26, 42} and the LinkMD result registers {27,
43} for ports 1 and 2 respectively; and in conjunction with the port registers control 13 for ports 1 and 2 respectively to
disable Auto MDI/MDIX.
Alternatively, the MIIM PHY registers 0 and 29 can be used for LinkMD access.
3.1.12.2 Usage
The following is a sample procedure for using LinkMD with registers {42,43,45} on port 2.
1. Disable auto MDI/MDI-X by writing a ‘1’ to register 45, bit [2] to enable manual control over the differential pair
used to transmit the LinkMD pulse.
EQUATION 3-1:
·
D Dis tan ce to cable fault in meters = 0.4 Register 26 bit [0] Register 27 bits [7:0]
Concatenated values of registers 42 and 43 are converted to decimal before multiplying by 0.4.
The constant (0.4) may be calibrated for different cabling conditions, including cables with a velocity of propagation that
varies significantly from the norm.
3.3.3 MIGRATION
The internal lookup engine also monitors whether a station has moved. If a station has moved, it will update the table
accordingly. Migration happens when the following conditions are met:
• The received packet’s SA is in the table, but the associated source port information is different.
• The received packet is good; the packet has no receiving errors, and is of legal length.
The lookup engine will update the existing record in the table with the new source port information.
3.3.4 AGING
The lookup engine updates the time stamp information of a record whenever the corresponding SA appears. The time
stamp is used in the aging process. If a record is not updated for a period of time, the lookup engine removes the record
from the table. The lookup engine constantly performs the aging process and will continuously remove aging records.
The aging period is about 200 seconds. This feature can be enabled or disabled through register 3 (0x03) bit [2].
3.3.5 FORWARDING
The KSZ8873MLL/FLL/RLL forwards packets using the algorithm that is depicted in the following flowcharts. Figure 3-
4 shows stage one of the forwarding algorithm where the search engine looks up the VLAN ID, static table, and dynamic
table for the destination address, and comes up with “port to forward 1” (PTF1). PTF1 is then further modified by span-
ning tree, IGMP snooping, port mirroring, and port VLAN processes to come up with “port to forward 2” (PTF2), as
shown in Figure 3-5. The packet is sent to PTF2.
Start
YES
NOT
FOUND
Search complete.
Get PTF1 from FOUND
Dynamic Table This search is based on
Dynamic MAC Search DA+FID
Table
NOT
FOUND
Search complete.
Get PTF1 from
VLAN Table
PTF1
PTF1
- RX Mirror
Port Mirror - TX Mirror
Process - RX or TX Mirror
- RX and TX Mirror
Port VLAN
Membership
Check
PTF2
Bytes 8 6 6 2 2 2 46-1500 4
Bits 16 3 1 12
802.1p-based priority is enabled by bit [5] of registers 16, 32, and 48 for ports 1, 2, and 3, respectively.
The KSZ8873MLL/FLL/RLL provides the option to insert or remove the priority tagged frame's header at each individual
egress port. This header, consisting of the 2 bytes VLAN Protocol ID (VPID) and the 2-byte Tag Control Information field
(TCI), is also referred to as the IEEE 802.1Q VLAN tag.
Tag Insertion is enabled by bit [2] of the port registers control 0 and the register 194 to select which source port (ingress
port) PVID can be inserted on the egress port for ports 1, 2, and 3, respectively. At the egress port, untagged packets
are tagged with the ingress port’s default tag. The default tags are programmed in register sets {19,20}, {35,36}, and
{51,52} for ports 1, 2, and 3, respectively, and the source port VID has to be inserted at selected egress ports by bit[5:0]
of register 194. The KSZ8873MLL/FLL/RLL will not add tags to already tagged packets.
Tag Removal is enabled by bit [1] of registers 16, 32, and 48 for ports 1, 2, and 3, respectively. At the egress port, tagged
packets will have their 802.1Q VLAN Tags removed. The KSZ8873MLL/FLL/RLL will not modify untagged packets.
The CRC is recalculated for both tag insertion and tag removal.
802.1p Priority Field Re-mapping is a QoS feature that allows the KSZ8873MLL/FLL/RLL to set the “User Priority Ceil-
ing” at any ingress port. If the ingress packet’s priority field has a higher priority value than the default tag’s priority field
of the ingress port, the packet’s priority field is replaced with the default tag’s priority field.
Bytes 8 6 6 2 2 2 46-1500 1 4
RST_N ....
SCL ....
SDA ....
tprgm<15 ms
The following is a sample procedure for programming the KSZ8873MLL/FLL/RLL with a pre-configured EEPROM:
1. Connect the KSZ8873MLL/FLL/RLL to the EEPROM by joining the SCL and SDA signals of the respective
devices.
2. Enable I2C master mode by setting the KSZ8873MLL/FLL/RLL strap-in pins, P2LED[1:0] to “00”.
3. Check to ensure that the KSZ8873MLL/FLL/RLL reset signal input, RSTN, is properly connected to the external
reset source at the board level.
4. Program the desired configuration data into the EEPROM.
SPIS_N
SPIC
SPID X 0 0 0 0 0 0 1 0 A7 A6 A5 A4 A3 A2 A1 A0 D7 D6 D5 D4 D3 D2 D1 D0
SPIQ
SPIS_N
SPIC
SPID X 0 0 0 0 0 0 1 0 A7 A6 A5 A4 A3 A2 A1 A0
SPIQ D7 D6 D5 D4 D3 D2 D1 D0
SPIS_N
SPIC
SPID X 0 0 0 0 0 0 1 0 A7 A6 A5 A4 A3 A2 A1 A0 D7 D6 D5 D4 D3 D2 D1 D0
SPIQ
SPIS_N
SPIC
SPID D7 D6 D5 D4 D4 D2 D1 D0 D7 D6 D5 D4 D3 D2 D1 D0 D7 D6 D5 D4 D3 D2 D1 D0
SPIQ
SPIS_N
SPIC
SPID X 0 0 0 0 0 0 1 1 A7 A6 A5 A4 A3 A2 A1 A0 X X X X X X X X
SPIQ D7 D6 D5 D4 D3 D2 D1 D0
SPIS_N
SPIC
SPID X X X X X X X X X X X X X X X X X X X X X X X X
SPIQ D7 D6 D5 D4 D3 D2 D1 D0 D7 D6 D5 D4 D3 D2 D1 D0 D7 D6 D5 D4 D3 D2 D1 D0
PMD/PMA
PCS
MAC
Switch
MAC
PCS
PMD/PMA
Loop Back
PHY Port
PMD/PMA
PCS
MAC
Switch
MAC
PCS
PMD/PMA
PHY
RXP2/ TXP2/
RXM2 Port 2 TXM2
Note:
Port 2 PHY address = (Port 1 PHY address) + 1
Reserved
2-0 Reserved RO 000
Do not change the default values.
TABLE 4-14: PORT 1’S “PER PORT” MIB COUNTERS INDIRECT MEMORY OFFSETS
Offset Counter Name Description
0x0 RxLoPriorityByte Rx lo-priority (default) octet count including bad packets
0x1 RxHiPriorityByte Rx hi-priority octet count including bad packets
0x2 RxUndersizePkt Rx undersize packets w/ good CRC
0x3 RxFragments Rx fragment packets w/ bad CRC, symbol errors or alignment errors
0x4 RxOversize Rx oversize packets w/ good CRC (max: 1536 or 1522 bytes)
Rx packets longer than 1522 bytes w/ either CRC errors, alignment
0x5 RxJabbers
errors, or symbol errors (depends on max packet size setting)
0x6 RxSymbolError Rx packets w/ invalid data symbol and legal packet size.
Rx packets within (64,1522) bytes w/ an integral number of bytes and a
0x7 RxCRCError
bad CRC (upper limit depends on max packet size setting)
Rx packets within (64,1522) bytes w/ a non-integral number of bytes
0x8 RxAlignmentError
and a bad CRC (upper limit depends on max packet size setting)
Number of MAC control frames received by a port with 88-08h in Ether-
0x9 RxControl8808Pkts
Type field
Number of PAUSE frames received by a port. PAUSE frame is qualified
0xA RxPausePkts with EtherType (88-08h), DA, control opcode (00-01), data length (64B
min), and a valid CRC
Rx good broadcast packets (not including error broadcast packets or
0xB RxBroadcast
valid multicast packets)
TABLE 4-16: “ALL PORT DROPPED PACKET” MIB COUNTERS INDIRECT MEMORY OFFSETS
Offset Counter Name Description
0x100 Port 1 TX Drop Packets TX packets dropped due to lack of resources
0x101 Port 2 TX Drop Packets TX packets dropped due to lack of resources
0x102 Port 3 TX Drop Packets TX packets dropped due to lack of resources
0x103 Port 1 RX Drop Packets RX packets dropped due to lack of resources
0x104 Port 2 RX Drop Packets RX packets dropped due to lack of resources
Note: Do not drive input signals without power supplied to the device.
SCL
SDA
tcyc1
Transmit Timing
SCL
tov1
SDA
FIGURE 7-3: MAC MODE MII TIMING - DATA RECEIVED FROM MII
FIGURE 7-5: PHY MODE MII TIMING - DATA RECEIVED FROM MII
Transmit tcyc
Timing
REFCLK
t1
t2
MTXD [1 :0 ]
MTXEN
Receive tcyc
Timing
REFCLK
MRXD [1: 0]
MRXDV
t od
Note that data is only allowed to change during SCL low-time, except the start and stop bits.
tSHSL
SPIS_N
tCHSL tSLCH tCHSH tSHCH
SPIC
tDVCH tCHCL
tCHDX tCLCH
High Impedance
SPIQ
SPIS_N
tCH
SPIC
tCLQX
SPIQ LSB
tQLQH
tQHQL
SPID
FLP FLP
Burst Burst
TX+/TX-
t FLPW
t BTB
TX+/TX-
t PW t PW
t CTD
t CTC
SUPPLY
VOLTAGES
tVR tSR
RST#
tCS tCH
STRAP-IN
VALUE
tRC
STRAP-IN /
OUTPUT PIN
VCC
D1: 1N4148
D1 R
KS8873 10k
RST
C
10μF
Figure 8-2 shows a reset circuit recommended for applications where reset is driven by another device (for example,
the CPU or an FPGA). At power-on-reset, R, C, and D1 provide the necessary ramp rise time to reset the KSZ8873MLL/
FLL/RLL device. The RST_OUT_N from the CPU/FPGA provides the warm reset after power-up.
VCC
D1 R
KS8873 10k CPU/FPGA
RST RST_OUT_n
C D2
10μF
Note: For the most current package drawings, please see the Microchip Packaging Specification located at
http://www.microchip.com/packaging.
CUSTOMER SUPPORT
Users of Microchip products can receive assistance through several channels:
• Distributor or Representative
• Local Sales Office
• Field Application Engineer (FAE)
• Technical Support
Customers should contact their distributor, representative or field application engineer (FAE) for support. Local sales
offices are also available to help customers. A listing of sales offices and locations is included in the back of this docu-
ment.
Technical support is available through the web site at: http://microchip.com/support
• Microchip believes that its family of products is one of the most secure families of its kind on the market today, when used in the
intended manner and under normal conditions.
• There are dishonest and possibly illegal methods used to breach the code protection feature. All of these methods, to our
knowledge, require using the Microchip products in a manner outside the operating specifications contained in Microchip’s Data
Sheets. Most likely, the person doing so is engaged in theft of intellectual property.
• Microchip is willing to work with the customer who is concerned about the integrity of their code.
• Neither Microchip nor any other semiconductor manufacturer can guarantee the security of their code. Code protection does not
mean that we are guaranteeing the product as “unbreakable.”
Code protection is constantly evolving. We at Microchip are committed to continuously improving the code protection features of our
products. Attempts to break Microchip’s code protection feature may be a violation of the Digital Millennium Copyright Act. If such acts
allow unauthorized access to your software or other copyrighted work, you may have a right to sue for relief under that Act.
Information contained in this publication regarding device applications and the like is provided only for your convenience and may be
superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO
REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR
OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE,
MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of
Microchip devices in life support and/or safety applications is entirely at the buyer’s risk, and the buyer agrees to defend, indemnify and
hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implic-
itly or otherwise, under any Microchip intellectual property rights unless otherwise stated.
Trademarks
The Microchip name and logo, the Microchip logo, AnyRate, AVR, AVR logo, AVR Freaks, BeaconThings, BitCloud, CryptoMemory, CryptoRF,
dsPIC, FlashFlex, flexPWR, Heldo, JukeBlox, KEELOQ, KEELOQ logo, Kleer, LANCheck, LINK MD, maXStylus, maXTouch, MediaLB, megaAVR,
MOST, MOST logo, MPLAB, OptoLyzer, PIC, picoPower, PICSTART, PIC32 logo, Prochip Designer, QTouch, RightTouch, SAM-BA, SpyNIC,
SST, SST Logo, SuperFlash, tinyAVR, UNI/O, and XMEGA are registered trademarks of Microchip Technology Incorporated in the U.S.A. and
other countries.
ClockWorks, The Embedded Control Solutions Company, EtherSynch, Hyper Speed Control, HyperLight Load, IntelliMOS, mTouch, Precision
Edge, and Quiet-Wire are registered trademarks of Microchip Technology Incorporated in the U.S.A.
Adjacent Key Suppression, AKS, Analog-for-the-Digital Age, Any Capacitor, AnyIn, AnyOut, BodyCom, chipKIT, chipKIT logo, CodeGuard,
CryptoAuthentication, CryptoCompanion, CryptoController, dsPICDEM, dsPICDEM.net, Dynamic Average Matching, DAM, ECAN,
EtherGREEN, In-Circuit Serial Programming, ICSP, Inter-Chip Connectivity, JitterBlocker, KleerNet, KleerNet logo, Mindi, MiWi, motorBench,
MPASM, MPF, MPLAB Certified logo, MPLIB, MPLINK, MultiTRAK, NetDetach, Omniscient Code Generation, PICDEM, PICDEM.net, PICkit,
PICtail, PureSilicon, QMatrix, RightTouch logo, REAL ICE, Ripple Blocker, SAM-ICE, Serial Quad I/O, SMART-I.S., SQI, SuperSwitcher,
SuperSwitcher II, Total Endurance, TSHARC, USBCheck, VariSense, ViewSpan, WiperLock, Wireless DNA, and ZENA are trademarks of
Microchip Technology Incorporated in the U.S.A. and other countries.
SQTP is a service mark of Microchip Technology Incorporated in the U.S.A.
Silicon Storage Technology is a registered trademark of Microchip Technology Inc. in other countries.
GestIC is a registered trademark of Microchip Technology Germany II GmbH & Co. KG, a subsidiary of Microchip Technology Inc., in other
countries.
All other trademarks mentioned herein are property of their respective companies.
© 2017, Microchip Technology Incorporated, All Rights Reserved.
ISBN: 978-1-5224-1330-1
== ISO/TS 16949 ==
analog products. In addition, Microchip’s quality system for the design
and manufacture of development systems is ISO 9001:2000 certified.