April 18, 2026

Allwinner H5 network driver -- IEEE 802.3 standards

Working with PHY and in particular MDIO, we fairly often encounter the phrases "clause 22" and "clause 45". It turns out these cryptic references are to specific sections of the IEEE 802.3 standard that defines ethernet. It turns out I have most of these documents on my machine at /u2/Projects/OrangePi/MDIO/802.3
-rw-r--r-- 1 tom tom 6433848 Jan  9  2023 802.3-2005_section1.pdf
-rw-r--r-- 1 tom tom 3865205 Jan  9  2023 802.3-2005_section3.pdf
-rw-r--r-- 1 tom tom 7926079 Jan  9  2023 Ch3_802.3-2005_section2.pdf
-rw-r--r-- 1 tom tom 4869758 Jan  9  2023 Ch3_802.3-2005_section4.pdf
-rw-r--r-- 1 tom tom  380302 Jan 19 08:21 clause22.pdf
-rw-r--r-- 1 tom tom  630084 Jan 19 08:23 clause45.pdf
The clause 22 and 45 documents I extracted using "qpdf".

History

Long long ago, ethernet was 10 Mbit only. It used a coaxial cable which was essentially a "party line". Hosts would transmit, then detect collisions and try again. An ethernet hub is a miniature version of this. It is hard to believe this even worked, but it did, and was much much better and faster than serial ports and modems which was all there was before this.

Along came twisted pair ethernet, 100 Mbit, and switches. Somehow all of this worked without MDIO.

MDIO came along in the form of clause 22 with the advent of gigabit ethernet. MDIO is a 2 wire serial bus that allows a PHY layer device to be managed. Clause 22 standardizes a basic set of registers, and these are my focus as a software developer. It also standardizes the electrical signals, but all of that just works once I get my hands on it.

Clause 45 intoduces extensions to support 10 Gigabit ethernet, so we don't need to dive into that here.

Registers

Clause 22 introduces a system with 32 registers. The first 16 (0-15) are standardized. The second 16 are vendor specific and optional.


Have any comments? Questions? Drop me a line!

Tom's electronics pages / tom@mmto.org