Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
mii_and_mdio [2018/10/03 12:11] – [include/uapi/linux/mdio.h] rpjdaymii_and_mdio [2018/10/09 11:06] (current) – [Files] rpjday
Line 3: Line 3:
 In-kernel structures for MII and MDIO. In-kernel structures for MII and MDIO.
  
-===== Files =====+===== Links =====
  
-==== include/uapi/linux/mii.h ====+  * [[https://www.electronicdesign.com/microcontrollers/use-mdio-bus-interrogate-complex-devices|Use The MDIO Bus To Interrogate Complex Devices]] 
 +  * [[https://www.totalphase.com/support/articles/200349206-MDIO-Background|MDIO Background]] 
 +  * [[http://www.ieee802.org/3/efm/public/nov02/oam/pannell_oam_1_1102.pdf|Clause 22 Access to 
 +Clause 45 Registers]] 
 +  * [[https://www.intel.com/content/www/us/en/programmable/documentation/sfo1400787952932/iga1401395383139/iga1401395383732/iga1401395384075.html|Intel MDIO Clause 45]]
  
-<code> +===== Files =====
-#include <linux/types.h> +
-#include <linux/ethtool.h> +
- +
-/* Generic MII registers. */ +
-#define MII_BMCR                0x00    /* Basic mode control register */ +
-#define MII_BMSR                0x01    /* Basic mode status register  */ +
-#define MII_PHYSID1             0x02    /* PHYS ID 1                   */ +
-#define MII_PHYSID2             0x03    /* PHYS ID 2                   */ +
-</code> +
- +
-==== include/uapi/linux/mdio.h ==== +
- +
-=== DEVADs === +
- +
-<code> +
-#include <linux/types.h> +
-#include <linux/mii.h> +
- +
-/* MDIO Manageable Devices (MMDs). */ +
-#define MDIO_MMD_PMAPMD               /* Physical Medium Attachment/ +
-                                         * Physical Medium Dependent */ +
-#define MDIO_MMD_WIS            2       /* WAN Interface Sublayer */ +
-#define MDIO_MMD_PCS            3       /* Physical Coding Sublayer */ +
-#define MDIO_MMD_PHYXS          4       /* PHY Extender Sublayer */ +
-#define MDIO_MMD_DTEXS          5       /* DTE Extender Sublayer */ +
-#define MDIO_MMD_TC                   /* Transmission Convergence */ +
-#define MDIO_MMD_AN                   /* Auto-Negotiation */ +
-#define MDIO_MMD_C22EXT         29      /* Clause 22 extension */ +
-#define MDIO_MMD_VEND1          30      /* Vendor specific 1 */ +
-#define MDIO_MMD_VEND2          31      /* Vendor specific 2 */ +
-</code> +
- +
-=== DEVAD = 1 (PMA/PMD) === +
- +
-<code> +
-/* Generic MDIO registers. */ +
-#define MDIO_CTRL1              MII_BMCR +
-#define MDIO_STAT1              MII_BMSR +
-#define MDIO_DEVID1             MII_PHYSID1 +
-#define MDIO_DEVID2             MII_PHYSID2 +
-#define MDIO_SPEED              4       /* Speed ability */ +
-#define MDIO_DEVS1              5       /* Devices in package */ +
-#define MDIO_DEVS2              6 +
-#define MDIO_CTRL2              7       /* 10G control 2 */ +
-#define MDIO_STAT2              8       /* 10G status 2 */ +
-#define MDIO_PMA_TXDIS          9       /* 10G PMA/PMD transmit disable */ +
-#define MDIO_PMA_RXDET          10      /* 10G PMA/PMD receive signal detect */ +
-#define MDIO_PMA_EXTABLE        11      /* 10G PMA/PMD extended ability */ +
-#define MDIO_PKGID1             14      /* Package identifier */ +
-#define MDIO_PKGID2             15 +
-</code> +
- +
-=== DEVAD = 7 (AN) === +
- +
-<code> +
-#define MDIO_AN_ADVERTISE       16      /* AN advertising (base page) */ +
-#define MDIO_AN_LPA             19      /* AN LP abilities (base page) */ +
-</code> +
- +
-=== DEVAD = 3 (PCS) === +
- +
-<code> +
-#define MDIO_PCS_EEE_ABLE       20      /* EEE Capability register */ +
-#define MDIO_PCS_EEE_WK_ERR     22      /* EEE wake error counter */ +
-</code> +
- +
-=== Don't know === +
- +
-<code> +
-#define MDIO_PHYXS_LNSTAT       24      /* PHY XGXS lane state */ +
-</code> +
- +
-=== DEVAD = 7 (AN) === +
- +
-What's with 61? Not in data sheet. +
- +
-<code> +
-#define MDIO_AN_EEE_ADV         60      /* EEE advertisement */ +
-#define MDIO_AN_EEE_LPABLE      61      /* EEE link partner ability */ +
-</code> +
- +
-=== DEVAD = 1 (PMA) === +
- +
-<code> +
-/* Media-dependent registers. */ +
-#define MDIO_PMA_10GBT_SWAPPOL  130     /* 10GBASE-T pair swap & polarity */ +
-#define MDIO_PMA_10GBT_TXPWR    131     /* 10GBASE-T TX power control */ +
-#define MDIO_PMA_10GBT_SNR      133     /* 10GBASE-T SNR margin, lane A. +
-                                         * Lanes B-D are numbered 134-136. */ +
-                                         * </code> +
- +
-=== Don't know === +
- +
-<code> +
-#define MDIO_PMA_10GBR_FECABLE  170     /* 10GBASE-R FEC ability */ +
-</code>+
  
-=== Don't know ===+  * [[https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include|include/]] 
 +    * [[https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/uapi|uapi/]] 
 +      * [[https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/uapi/linux|linux/]] 
 +        * [[https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/uapi/linux/mii.h|mii.h]] 
 +        * [[https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/uapi/linux/mdio.h|mdio.h]] 
 +    * [[https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/linux|linux/]] 
 +      * [[https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/linux/mii.h|mii.h]] 
 +      * [[https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/linux/mdio.h|mdio.h]] 
 +      * [[https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/linux/of_mdio.h|of_mdio.h]] 
 +      * [[https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/linux/phy.h|phy.h]] 
 +  * [[https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers|drivers/]] 
 +    * [[https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net|net/]] 
 +      * [[https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/mii.c|mii.c]] 
 +      * [[https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/mdio.c|mdio.c]] 
 +    * [[https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/of|of/]] 
 +      * [[https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/of/of_mdio.c|of_mdio.c]]
  
-<code> +===== MII =====
-#define MDIO_PCS_10GBX_STAT1    24      /* 10GBASE-X PCS status 1 */ +
-#define MDIO_PCS_10GBRT_STAT1   32      /* 10GBASE-R/-T PCS status 1 */ +
-#define MDIO_PCS_10GBRT_STAT2   33      /* 10GBASE-R/-T PCS status 2 */ +
-</code>+
  
-=== DEVAD = 7 (AN) === 
  
-<code> 
-#define MDIO_AN_10GBT_CTRL      32      /* 10GBASE-T auto-negotiation control */ 
-#define MDIO_AN_10GBT_STAT      33      /* 10GBASE-T auto-negotiation status */ 
-</code> 
  • mii_and_mdio.1538568692.txt.gz
  • Last modified: 2018/10/03 12:11
  • by rpjday