Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| mii_and_mdio [2018/10/06 18:04] – [Overview] rpjday | mii_and_mdio [2018/10/09 11:06] (current) – [Files] rpjday | ||
|---|---|---|---|
| Line 5: | Line 5: | ||
| ===== Links ===== | ===== Links ===== | ||
| - | * [[https://git.kernel.org/pub/scm/ | + | * [[https://www.electronicdesign.com/microcontrollers/use-mdio-bus-interrogate-complex-devices|Use The MDIO Bus To Interrogate Complex Devices]] |
| - | * [[https://git.kernel.org/pub/scm/linux/ | + | * [[https://www.totalphase.com/support/articles/200349206-MDIO-Background|MDIO Background]] |
| - | * [[https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/ | + | * [[http://www.ieee802.org/3/efm/public/nov02/oam/pannell_oam_1_1102.pdf|Clause 22 Access to |
| - | * [[https:// | + | Clause 45 Registers]] |
| - | * [[https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/uapi/ | + | * [[https://www.intel.com/content/www/us/en/programmable/documentation/sfo1400787952932/iga1401395383139/iga1401395383732/iga1401395384075.html|Intel MDIO Clause 45]] |
| ===== Files ===== | ===== Files ===== | ||
| - | ==== include/uapi/linux/mii.h ==== | + | * [[https:// |
| - | + | * [[https:// | |
| - | < | + | * [[https:// |
| - | #include | + | * [[https:// |
| - | #include | + | * [[https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/ |
| - | + | * [[https:// | |
| - | /* Generic MII registers. | + | * [[https:// |
| - | #define MII_BMCR | + | * [[https:// |
| - | #define MII_BMSR | + | * [[https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/linux/of_mdio.h|of_mdio.h]] |
| - | #define MII_PHYSID1 | + | * [[https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/ |
| - | #define MII_PHYSID2 | + | * [[https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers|drivers/ |
| - | </code> | + | * [[https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/ |
| - | + | * [[https://git.kernel.org/pub/scm/linux/ | |
| - | ==== include/ | + | * [[https://git.kernel.org/ |
| - | + | * [[https://git.kernel.org/pub/ | |
| - | === DEVADs === | + | * [[https://git.kernel.org/pub/scm/ |
| - | + | ||
| - | < | + | |
| - | #include <linux/types.h> | + | |
| - | #include | + | |
| - | + | ||
| - | /* MDIO Manageable Devices (MMDs). */ | + | |
| - | #define MDIO_MMD_PMAPMD | + | |
| - | * Physical Medium Dependent | + | |
| - | #define MDIO_MMD_WIS | + | |
| - | #define MDIO_MMD_PCS | + | |
| - | #define MDIO_MMD_PHYXS | + | |
| - | #define MDIO_MMD_DTEXS | + | |
| - | #define MDIO_MMD_TC | + | |
| - | #define MDIO_MMD_AN | + | |
| - | #define MDIO_MMD_C22EXT | + | |
| - | #define MDIO_MMD_VEND1 | + | |
| - | #define MDIO_MMD_VEND2 | + | |
| - | </code> | + | |
| - | + | ||
| - | === DEVAD = 1 (PMA/PMD) === | + | |
| - | + | ||
| - | < | + | |
| - | /* Generic MDIO registers. */ | + | |
| - | #define MDIO_CTRL1 | + | |
| - | #define MDIO_STAT1 | + | |
| - | #define MDIO_DEVID1 | + | |
| - | #define MDIO_DEVID2 | + | |
| - | #define MDIO_SPEED | + | |
| - | #define MDIO_DEVS1 | + | |
| - | #define MDIO_DEVS2 | + | |
| - | #define MDIO_CTRL2 | + | |
| - | #define MDIO_STAT2 | + | |
| - | #define MDIO_PMA_TXDIS | + | |
| - | #define MDIO_PMA_RXDET | + | |
| - | #define MDIO_PMA_EXTABLE | + | |
| - | #define MDIO_PKGID1 | + | |
| - | #define MDIO_PKGID2 | + | |
| - | </code> | + | |
| - | + | ||
| - | === DEVAD = 7 (AN) === | + | |
| - | + | ||
| - | < | + | |
| - | #define MDIO_AN_ADVERTISE | + | |
| - | #define MDIO_AN_LPA | + | |
| - | </code> | + | |
| - | + | ||
| - | === DEVAD = 3 (PCS) === | + | |
| - | + | ||
| - | < | + | |
| - | #define MDIO_PCS_EEE_ABLE | + | |
| - | #define MDIO_PCS_EEE_WK_ERR | + | |
| - | </code> | + | |
| - | + | ||
| - | === Don't know === | + | |
| - | + | ||
| - | < | + | |
| - | #define MDIO_PHYXS_LNSTAT | + | |
| - | </code> | + | |
| - | + | ||
| - | === DEVAD = 7 (AN) === | + | |
| - | + | ||
| - | What's with 61? Not in data sheet. | + | |
| - | + | ||
| - | < | + | |
| - | #define MDIO_AN_EEE_ADV | + | |
| - | #define MDIO_AN_EEE_LPABLE | + | |
| - | </code> | + | |
| - | + | ||
| - | === DEVAD = 1 (PMA) === | + | |
| - | + | ||
| - | < | + | |
| - | /* Media-dependent registers. */ | + | |
| - | #define MDIO_PMA_10GBT_SWAPPOL | + | |
| - | #define MDIO_PMA_10GBT_TXPWR | + | |
| - | #define MDIO_PMA_10GBT_SNR | + | |
| - | * Lanes B-D are numbered 134-136. */ | + | |
| - | | + | |
| - | + | ||
| - | === Don't know === | + | |
| - | + | ||
| - | < | + | |
| - | #define MDIO_PMA_10GBR_FECABLE | + | |
| - | </code> | + | |
| - | + | ||
| - | === Don't know === | + | |
| - | < | + | ===== MII ===== |
| - | #define MDIO_PCS_10GBX_STAT1 | + | |
| - | #define MDIO_PCS_10GBRT_STAT1 | + | |
| - | #define MDIO_PCS_10GBRT_STAT2 | + | |
| - | </ | + | |
| - | === DEVAD = 7 (AN) === | ||
| - | < | ||
| - | #define MDIO_AN_10GBT_CTRL | ||
| - | #define MDIO_AN_10GBT_STAT | ||
| - | </ | ||