0. Foreword
This project schematic and software are for learning and communication only, and may not be used for any commercial purpose. Please comply with the relevant open source agreement! The firmware is protected by REALTEK copyright and should not be used for commercial purposes or sold. The author is not responsible for any legal issues arising from this.
1. Project Description
This project is a 4-port + 1 optical Gigabit switch based on RTL8367S. It uses the native SGMII 1.25G optical port to lead out the SFP interface. It uses a double-layer board design + minimal peripheral components to save costs to the maximum extent.
Features
Single-chip 5+2-port 10/100/1000M non-blocking switch architecture
Embedded 5-Port 10/100/1000Base-T PHY
Each port supports full duplex 10/100/1000M connectivity
Extra Interface Supports High Speed Serial Interface SGMII (1.25GHz) Interface (the optical port uses this interface)
Supports 9216-byte jumbo packet length forwarding at wire speed
Realtek Cable Test (RTCT) function
2. Schematic Description
The DC-DC part
uses MT2492 DC-DC to convert 5V The USB power supply is stepped down to 3.3V, and the package is small SOT23. The peripheral circuit is simple, no freewheeling diode is required, and it has the advantages of small size and low cost.

The 1.1V power supply part
directly uses the on-chip integrated DC-DC output, and an external 2.2uH inductor is connected (note that the 10uf capacitor cannot be saved).

Configuration Strapping Pins
Pin Name
Pin No.
Description
EN_SWR
60
Enable Internal Switching Regulator.
Pull Up: 4.7K pull-up to enable internal 1.1V DC-DC output
EEPROM_MOD/
LAN4LED0
70
EEPROM Mode Selection.
Pull Up: 4.7K pull-up to select EEPROM 24Cxx capacity greater than 16Kbits (24C32~24C256), firmware uses 24C64
EN_PWRLIGHT
73
Enable Power on Light
Pull Up: 4.7K pull-up to enable power on indicator light
EN_SPIF/
LAN3LED0
74
Enable SPI FLASH Interface
Pull Down: 4.7K pull-down, Disable FLASH interface, EEPROM is used here, see the table below for specific configuration
DIS_8051/
LAN2LED0
75
Disable Embedded 8051.
Pull Up Down: 4.7K pull-down, enable internal 8051
DISAUTOLOAD
76
Disable EEPROM/FLASH Autoload.
Pull Down: 4.7K pull-down, enable automatic firmware loading
EN_PHY/
LAN1LED0
79
Enable Embedded PHY.
Pull Up: 4.7K pull-up to enable internal PHY
SMI_SEL/
LED_CK/
LAN0LED0
81
EEPROM SMI/MII Management Interface Selection
No configuration is done here
EN_EEE/
GPIO54/
SCK/
MDC
87
Enable IEEE 802.3az Energy Efficient Ethernet (EEE).
No configuration is done here, and 1.5K pull-up is required for the IIC interface

ps1: The configuration resistor needs to be configured correctly, otherwise the RTL8367S cannot read the firmware and cannot work
ps2: Some IO ports are multiplexed ports. When powered on, the level value of the pin is read to the internal register and then used as an output port. If the multiplexed port is an LED pin, when the pin is pulled low, the LED output activation level is high; when the pin is pulled high, the LED output activation level is low.
3. PCB design description
The differential routing of the network port and the optical port needs impedance matching. From the datasheet, we know that the differential impedance Typ=100ohm, ±20
uses JLC impedance calculation, when the spacing is 0.13mm, the line width is 0.142mm, and the impedance is about 100R. The differential pair can be routed as follows.

Other wiring precautions:
1. Since the network port has a built-in transformer and an isolated high-voltage capacitor, the shell ground needs to be separately coppered and isolated from the main GND.
2. Place components on the top layer, route signal lines and power lines, and the bottom layer is the ground plane. Try to ensure the integrity of the ground plane, and add a return path if necessary.
3. The SFP seat and the shell position have been matched, do not move
4. Software description
The firmware has been uploaded to the attachment "RTL8367S-4GE+SFP.bin" and burned using the CH341A programmer. (The firmware is protected by REALTEK copyright, please do not use it for commercial purposes)
5. Physical display instructions
2D and 3D preview


welding (using 0402 components more, SMT or steel mesh is recommended)
If hand welding, you can use the accessory ibom auxiliary welding tool


to power on and use


Speed test iperf is basically close to gigabit speed, stable use without packet loss, and normal delay
network topology: server host--8367 switch electrical port--8367 switch optical port--Huawei S5720 switch optical port--electrical port to client client
The following is a screenshot of the client test data.

For details, see the speed test video
6. Shell!
Update the shell, the size has been verified to be OK, and you can choose acrylic cutting or 3D printing. Model file see attachment
Stud size: M3*5+6. Acrylic thickness: 2mm. There are reserved fan fixing holes, fan specifications: 25*25*7mm (2507). There is no fan power supply interface on the board, which needs to be modified by yourself.
CAD drawings:

3D shell: Students with printers can print by themselves.

It just so happened that some time ago, LiChuang sent a panel proofing coupon, which can be used to proof (bai) acrylic shell (the panel printing was used in a strange place hhh).
You need to convert the dwg file into a dxf file, and then import it into the professional version for typesetting. You can make a layout, that is, you can cut several shells at a time.

About shell assembly: It is more convenient to fix the acrylic with a rubber band and then apply glue:

It is recommended to use acrylic special glue or light-curing glue, do not use 502!

Final product:

Notes
1. At present, the network port 911130A sold by TB has two sizes (genuine and copycat). Generally, the original hanrun network port should be able to be inserted normally, and the side buckle of the shell of some network ports on TB has a bulge, resulting in insufficient spacing between the network ports and unable to be inserted. Don't use force to create miracles, otherwise the PCB is prone to deformation. Be sure to distinguish clearly when purchasing a network port.
2. When making PCB proofs, it is necessary to note that half holes are not made, otherwise there is a chance that half-hole fees will be added after the review, which is very expensive.
3. Be sure to add a heat sink and pay attention to heat dissipation when using it. The working temperature is high, and it is easy to lose packets or other inexplicable bugs at high temperatures.
4. Do not use low-temperature solder for solder paste or solder. The working temperature is high and there is a risk of desoldering.
5. The two electrolytic capacitors must have a capacity greater than or equal to 200uf.
6. The crystal matching capacitor needs to be determined according to the crystal data manual. If you don’t know the specific value, solder it according to the schematic diagram.
7. The firmware of this project does not support VLAN. If you need network management, please move to the project of mlpzaq9998: https://oshwhub.com/mlpzaq9998/rtl8367s-wang-guan-jiao-huan-ji
8. After seeing this, don’t you like and collect it before leaving? (*╹▽╹*) Students who have successfully reproduced can show their finished products in the comment area