RTL9047AA, RTL9044AA
RTL9044AB, RTL9043AA
REALTEK INTERNAL USE ONLY
SINGLE-CHIP AUTOMOTIVE ETHERNET SWITCH
CONTROLLER WITH 100BASE-T1 TRANSCEIVER
SDK API PROGRAMMING GUIDE
(CONFIDENTIAL: Development Partners Only)
Rev. 0.79
5 April 2017
Track ID: JATR-8275-15
Realtek Semiconductor Corp.
No. 2, Innovation Road II, Hsinchu Science Park, Hsinchu 300, Taiwan
Tel.: +886-3-578-0211. Fax: +886-3-577-6047
www.realtek.com
RTL904Xxx Series
SDK API Programming Guide
Single-Chip Automotive Ethernet Switch Controller with
100BASE-T1 Transceiver
ii Track ID: JATR-8275-15 Rev. 0.79
COPYRIGHT
©2017 Realtek Semiconductor Corp. All rights reserved. No part of this document may be reproduced,
transmitted, transcribed, stored in a retrieval system, or translated into any language in any form or by any
means without the written permission of Realtek Semiconductor Corp.
DISCLAIMER
and/or changes in this document or in the product described in this document at any time. This document
could include technical inaccuracies or typographical errors.
TRADEMARKS
Realtek is a trademark of Realtek Semiconductor Corporation. Other names mentioned in this document
are trademarks/registered trademarks of their respective owners.
LICENSE
This product is covered by one or more of the following patents: US5,307,459, US5,434,872,
US5,732,094, US6,570,884, US6,115,776, and US6,327,625.
USING THIS DOCUMENT
This document is intended fo
information.
Though every effort has been made to ensure that this document is current and accurate, more information
may have become available subsequent to the production of this guide.
REVISION HISTORY
Revision Release Date Summary
0.72 2015/11/13 Preliminary release.
0.73 2015/12/10 Add Section 4.17, page 55
0.74 2016/03/23 Revise section 3.5, page 6
0.75 2016/03/25 Add section 4.17 for RTCT
0.76 2016/06/13 Revised Section 4.1, page 7
0.77 2016/07/26 Revised Section 1, page 1
0.78 2016/09/09 Add section 4.20 for ACL
0.79 2017/01/26 Add section 4.22, Page 60
Add section 4.23, Page 61
RTL904Xxx Series
SDK API Programming Guide
Single-Chip Automotive Ethernet Switch Controller with
100BASE-T1 Transceiver
iii Track ID: JATR-8275-15 Rev. 0.79
RTL904Xxx Series
SDK API Programming Guide
Single-Chip Automotive Ethernet Switch Controller with
100BASE-T1 Transceiver
iv Track ID: JATR-8275-15 Rev. 0.79
Table of Contents
1. GENERAL DESCRIPTION .............................................................................................................................................. 1
1.1. P
ORT
I
NDEX
D
EFINITION
.............................................................................................................................................. 2
2. SDK STRUCTURE ............................................................................................................................................................ 3
3. PORTING ISSUES ............................................................................................................................................................. 4
3.1. E
NVIRONMENT
S
ETTING
.............................................................................................................................................. 4
3.2. R
EGISTER
A
CCESS
I
NTERFACE
P
ORTING
...................................................................................................................... 4
3.3. I2C
I
NTERFACE
P
ORTING
............................................................................................................................................. 4
3.4. MDC/MDIO
I
NTERFACE
P
ORTING
.............................................................................................................................. 5
3.5. SPI
I
NTERFACE
P
ORTING
............................................................................................................................................. 6
4. FUNCTION OVERVIEW ................................................................................................................................................. 7
4.1. VLAN .......................................................................................................................................................................... 7
4.1.1. Initialization ........................................................................................................................................................... 7
4.1.2. Add/Modify/Destroy a VLAN .................................................................................................................................. 8
4.1.3. Get VLANs by Port ................................................................................................................................................. 9
4.1.4. Assign Untagged Frame from Specified Port to a VLAN ..................................................................................... 10
4.1.5. VLAN Filtering ..................................................................................................................................................... 11
4.1.6. Ignore VLAN Tag ................................................................................................................................................. 12
4.1.7. IVL & SVL ............................................................................................................................................................ 13
4.1.8. Change the Spanning Tree Instance for Designated VLAN.................................................................................. 13
4.1.9. Function List......................................................................................................................................................... 14
4.2. Q
O
S ........................................................................................................................................................................... 15
4.2.1. Priority Extraction ............................................................................................................................................... 15
4.2.2. Priority & DSCP Remark ..................................................................................................................................... 17
4.2.3. Ingress Bandwidth Control & Ingress Flow Control ........................................................................................... 18
4.2.4. Queue Management .............................................................................................................................................. 19
4.2.5. Egress Port Scheduler & Bandwidth Control ...................................................................................................... 19
4.2.6. Function List......................................................................................................................................................... 20
4.3. A
DDRESS
T
ABLE
L
OOKUP
.......................................................................................................................................... 22
4.3.1. Hash Algorithm .................................................................................................................................................... 22
4.3.2. Get a L2 Entry by Table Index.............................................................................................................................. 22
4.3.3. Search a L2 Entry by MAC address ..................................................................................................................... 23
4.3.4. Get L2 Entries by Port .......................................................................................................................................... 23
4.3.5. Lookup Miss Control ............................................................................................................................................ 24
4.3.6. Function List......................................................................................................................................................... 24
4.4. MIB
C
OUNTERS
......................................................................................................................................................... 24
Function List ............................................................................................................................................................. 27
4.4.1. ................................................................................................................................................................................... 27
4.5. O
THER
C
OUNTERS
..................................................................................................................................................... 27
4.5.1. Function List......................................................................................................................................................... 28
4.6. L
OCK
M
ECHANISM
..................................................................................................................................................... 28
4.6.1. Register Fields ...................................................................................................................................................... 28
4.6.2. Table Fields .......................................................................................................................................................... 28
4.6.3. Function List......................................................................................................................................................... 29
4.7. P
ORT
P
ROPERTIES
...................................................................................................................................................... 29
4.7.1. Retrieving Port Mode ........................................................................................................................................... 29
4.7.2. Configuring Port and Get Link Status .................................................................................................................. 30
4.7.3. Function List......................................................................................................................................................... 32
4.8. M
IRROR
..................................................................................................................................................................... 33
4.8.1. Function List......................................................................................................................................................... 33
RTL904Xxx Series
SDK API Programming Guide
Single-Chip Automotive Ethernet Switch Controller with
100BASE-T1 Transceiver
v Track ID: JATR-8275-15 Rev. 0.79
4.9. P
ORT
I
SOLATION
........................................................................................................................................................ 34
4.9.1. Function List......................................................................................................................................................... 34
4.10. WOL.......................................................................................................................................................................... 34
4.10.1. WOL Initialization ........................................................................................................................................... 35
4.10.2. WOL Enter & Exit Sleep Mode ........................................................................................................................ 38
4.10.3. WOL MISC ...................................................................................................................................................... 38
4.10.4. Function List .................................................................................................................................................... 39
4.11. IGMP/MLD ............................................................................................................................................................... 40
4.11.1. Function List .................................................................................................................................................... 41
4.12. IEEE
802.1X ............................................................................................................................................................. 42
4.12.1. Function List .................................................................................................................................................... 44
4.13. S
PANNING
T
REE
P
ROTOCOL
(STP) ............................................................................................................................. 45
4.13.1. Function List .................................................................................................................................................... 46
4.14. 802.1Q
BV
.................................................................................................................................................................. 47
4.14.1. Function List .................................................................................................................................................... 49
4.15. A
UDIO
V
IDEO
B
RIDGE
............................................................................................................................................... 49
4.15.1. Function List .................................................................................................................................................... 53
4.16. SPI
F
LASH
.................................................................................................................................................................. 54
4.16.1. Function List .................................................................................................................................................... 55
4.17. OCP
C
HANNEL
.......................................................................................................................................................... 55
4.17.1. Function List .................................................................................................................................................... 56
4.18. S
WITCH
S
LEEP AND
W
AKEUP
F
UNCTION
................................................................................................................... 56
4.18.1. Global OP-FSM ............................................................................................................................................... 56
4.18.2. Function List .................................................................................................................................................... 57
4.19. R
EALTEK
C
ABLE
T
EST
D
IAGNOSTICS
(RTCT) ........................................................................................................... 58
4.19.1. Function List .................................................................................................................................................... 58
4.20. A
CCESS
C
ONTROL
L
IST
(ACL) .................................................................................................................................. 58
4.20.1. Function List .................................................................................................................................................... 59
4.21. I
NTERRUPT
................................................................................................................................................................. 59
4.21.1. Function List .................................................................................................................................................... 60
4.22. S
ET
C
ONFIGURATION FOR
F
LASH
-
LESS
D
ESIGN
......................................................................................................... 60
4.22.1. Function List .................................................................................................................................................... 61
4.23. F
IRMWARE
V
ERSION
.................................................................................................................................................. 61
4.23.1. Function List .................................................................................................................................................... 61
评论0