0023-NET-PHY-adds-driver-for-lantiq-PHY11G.patch 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537
  1. From 0a63ab263725c427051a8bbaa0732b749627da27 Mon Sep 17 00:00:00 2001
  2. From: John Crispin <blogic@openwrt.org>
  3. Date: Thu, 7 Aug 2014 18:15:36 +0200
  4. Subject: [PATCH 23/36] NET: PHY: adds driver for lantiq PHY11G
  5. Signed-off-by: John Crispin <blogic@openwrt.org>
  6. ---
  7. drivers/net/phy/Kconfig | 5 +
  8. drivers/net/phy/Makefile | 1 +
  9. drivers/net/phy/lantiq.c | 231 ++++++++++++++++++++++++++++++++++++++++++++++
  10. 3 files changed, 237 insertions(+)
  11. create mode 100644 drivers/net/phy/lantiq.c
  12. --- a/drivers/net/phy/Kconfig
  13. +++ b/drivers/net/phy/Kconfig
  14. @@ -202,6 +202,11 @@ config RTL8306_PHY
  15. tristate "Driver for Realtek RTL8306S switches"
  16. select SWCONFIG
  17. +config LANTIQ_PHY
  18. + tristate "Driver for Lantiq PHYs"
  19. + ---help---
  20. + Supports the 11G and 22F PHYs.
  21. +
  22. config FIXED_PHY
  23. tristate "Driver for MDIO Bus/PHY emulation with fixed speed/link PHYs"
  24. depends on PHYLIB
  25. --- a/drivers/net/phy/Makefile
  26. +++ b/drivers/net/phy/Makefile
  27. @@ -46,6 +46,7 @@ obj-$(CONFIG_DP83848_PHY) += dp83848.o
  28. obj-$(CONFIG_DP83867_PHY) += dp83867.o
  29. obj-$(CONFIG_STE10XP) += ste10Xp.o
  30. obj-$(CONFIG_MICREL_PHY) += micrel.o
  31. +obj-$(CONFIG_LANTIQ_PHY) += lantiq.o
  32. obj-$(CONFIG_MDIO_OCTEON) += mdio-octeon.o
  33. obj-$(CONFIG_MICREL_KS8995MA) += spi_ks8995.o
  34. obj-$(CONFIG_AT803X_PHY) += at803x.o
  35. --- /dev/null
  36. +++ b/drivers/net/phy/lantiq.c
  37. @@ -0,0 +1,278 @@
  38. +/*
  39. + * This program is free software; you can redistribute it and/or modify
  40. + * it under the terms of the GNU General Public License as published by
  41. + * the Free Software Foundation; either version 2 of the License, or
  42. + * (at your option) any later version.
  43. + *
  44. + * This program is distributed in the hope that it will be useful,
  45. + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  46. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  47. + * GNU General Public License for more details.
  48. + *
  49. + * You should have received a copy of the GNU General Public License
  50. + * along with this program; if not, write to the Free Software
  51. + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
  52. + *
  53. + * Copyright (C) 2012 Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
  54. + */
  55. +
  56. +#include <linux/module.h>
  57. +#include <linux/phy.h>
  58. +#include <linux/of.h>
  59. +
  60. +#define MII_MMDCTRL 0x0d
  61. +#define MII_MMDDATA 0x0e
  62. +
  63. +#define MII_VR9_11G_IMASK 0x19 /* interrupt mask */
  64. +#define MII_VR9_11G_ISTAT 0x1a /* interrupt status */
  65. +
  66. +#define INT_VR9_11G_WOL BIT(15) /* Wake-On-LAN */
  67. +#define INT_VR9_11G_ANE BIT(11) /* Auto-Neg error */
  68. +#define INT_VR9_11G_ANC BIT(10) /* Auto-Neg complete */
  69. +#define INT_VR9_11G_ADSC BIT(5) /* Link auto-downspeed detect */
  70. +#define INT_VR9_11G_DXMC BIT(2) /* Duplex mode change */
  71. +#define INT_VR9_11G_LSPC BIT(1) /* Link speed change */
  72. +#define INT_VR9_11G_LSTC BIT(0) /* Link state change */
  73. +#define INT_VR9_11G_MASK (INT_VR9_11G_LSTC | INT_VR9_11G_ADSC)
  74. +
  75. +#define ADVERTISED_MPD BIT(10) /* Multi-port device */
  76. +
  77. +#define MMD_DEVAD 0x1f
  78. +#define MMD_ACTYPE_SHIFT 14
  79. +#define MMD_ACTYPE_ADDRESS (0 << MMD_ACTYPE_SHIFT)
  80. +#define MMD_ACTYPE_DATA (1 << MMD_ACTYPE_SHIFT)
  81. +#define MMD_ACTYPE_DATA_PI (2 << MMD_ACTYPE_SHIFT)
  82. +#define MMD_ACTYPE_DATA_PIWR (3 << MMD_ACTYPE_SHIFT)
  83. +
  84. +static __maybe_unused int vr9_gphy_mmd_read(struct phy_device *phydev,
  85. + u16 regnum)
  86. +{
  87. + phy_write(phydev, MII_MMDCTRL, MMD_ACTYPE_ADDRESS | MMD_DEVAD);
  88. + phy_write(phydev, MII_MMDDATA, regnum);
  89. + phy_write(phydev, MII_MMDCTRL, MMD_ACTYPE_DATA | MMD_DEVAD);
  90. +
  91. + return phy_read(phydev, MII_MMDDATA);
  92. +}
  93. +
  94. +static __maybe_unused int vr9_gphy_mmd_write(struct phy_device *phydev,
  95. + u16 regnum, u16 val)
  96. +{
  97. + phy_write(phydev, MII_MMDCTRL, MMD_ACTYPE_ADDRESS | MMD_DEVAD);
  98. + phy_write(phydev, MII_MMDDATA, regnum);
  99. + phy_write(phydev, MII_MMDCTRL, MMD_ACTYPE_DATA | MMD_DEVAD);
  100. + phy_write(phydev, MII_MMDDATA, val);
  101. +
  102. + return 0;
  103. +}
  104. +
  105. +#if IS_ENABLED(CONFIG_OF_MDIO)
  106. +static int vr9_gphy_of_reg_init(struct phy_device *phydev)
  107. +{
  108. + u32 tmp;
  109. +
  110. + /* store the led values if one was passed by the devicetree */
  111. + if (!of_property_read_u32(phydev->dev.of_node, "lantiq,ledch", &tmp))
  112. + vr9_gphy_mmd_write(phydev, 0x1e0, tmp);
  113. +
  114. + if (!of_property_read_u32(phydev->dev.of_node, "lantiq,ledcl", &tmp))
  115. + vr9_gphy_mmd_write(phydev, 0x1e1, tmp);
  116. +
  117. + if (!of_property_read_u32(phydev->dev.of_node, "lantiq,led0h", &tmp))
  118. + vr9_gphy_mmd_write(phydev, 0x1e2, tmp);
  119. +
  120. + if (!of_property_read_u32(phydev->dev.of_node, "lantiq,led0l", &tmp))
  121. + vr9_gphy_mmd_write(phydev, 0x1e3, tmp);
  122. +
  123. + if (!of_property_read_u32(phydev->dev.of_node, "lantiq,led1h", &tmp))
  124. + vr9_gphy_mmd_write(phydev, 0x1e4, tmp);
  125. +
  126. + if (!of_property_read_u32(phydev->dev.of_node, "lantiq,led1l", &tmp))
  127. + vr9_gphy_mmd_write(phydev, 0x1e5, tmp);
  128. + if (!of_property_read_u32(phydev->dev.of_node, "lantiq,led2h", &tmp))
  129. + vr9_gphy_mmd_write(phydev, 0x1e6, tmp);
  130. +
  131. + if (!of_property_read_u32(phydev->dev.of_node, "lantiq,led2l", &tmp))
  132. + vr9_gphy_mmd_write(phydev, 0x1e7, tmp);
  133. +
  134. + if (!of_property_read_u32(phydev->dev.of_node, "lantiq,led3h", &tmp))
  135. + vr9_gphy_mmd_write(phydev, 0x1e8, tmp);
  136. +
  137. + if (!of_property_read_u32(phydev->dev.of_node, "lantiq,led3l", &tmp))
  138. + vr9_gphy_mmd_write(phydev, 0x1e9, tmp);
  139. +
  140. + return 0;
  141. +}
  142. +#else
  143. +static int vr9_gphy_of_reg_init(struct phy_device *phydev)
  144. +{
  145. + return 0;
  146. +}
  147. +#endif /* CONFIG_OF_MDIO */
  148. +
  149. +static int vr9_gphy_config_init(struct phy_device *phydev)
  150. +{
  151. + int err;
  152. +
  153. + dev_dbg(&phydev->dev, "%s\n", __func__);
  154. +
  155. + /* Mask all interrupts */
  156. + err = phy_write(phydev, MII_VR9_11G_IMASK, 0);
  157. + if (err)
  158. + return err;
  159. +
  160. + /* Clear all pending interrupts */
  161. + phy_read(phydev, MII_VR9_11G_ISTAT);
  162. +
  163. + vr9_gphy_mmd_write(phydev, 0x1e0, 0xc0);
  164. + vr9_gphy_mmd_write(phydev, 0x1e1, 0x00);
  165. + vr9_gphy_mmd_write(phydev, 0x1e2, 0x70);
  166. + vr9_gphy_mmd_write(phydev, 0x1e3, 0x03);
  167. + vr9_gphy_mmd_write(phydev, 0x1e4, 0x70);
  168. + vr9_gphy_mmd_write(phydev, 0x1e5, 0x03);
  169. + vr9_gphy_mmd_write(phydev, 0x1e6, 0x70);
  170. + vr9_gphy_mmd_write(phydev, 0x1e7, 0x03);
  171. + vr9_gphy_mmd_write(phydev, 0x1e8, 0x70);
  172. + vr9_gphy_mmd_write(phydev, 0x1e9, 0x03);
  173. +
  174. + vr9_gphy_of_reg_init(phydev);
  175. +
  176. + return 0;
  177. +}
  178. +
  179. +static int vr9_gphy_config_aneg(struct phy_device *phydev)
  180. +{
  181. + int reg, err;
  182. +
  183. + /* Advertise as multi-port device */
  184. + reg = phy_read(phydev, MII_CTRL1000);
  185. + reg |= ADVERTISED_MPD;
  186. + err = phy_write(phydev, MII_CTRL1000, reg);
  187. + if (err)
  188. + return err;
  189. +
  190. + return genphy_config_aneg(phydev);
  191. +}
  192. +
  193. +static int vr9_gphy_ack_interrupt(struct phy_device *phydev)
  194. +{
  195. + int reg;
  196. +
  197. + /*
  198. + * Possible IRQ numbers:
  199. + * - IM3_IRL18 for GPHY0
  200. + * - IM3_IRL17 for GPHY1
  201. + *
  202. + * Due to a silicon bug IRQ lines are not really independent from
  203. + * each other. Sometimes the two lines are driven at the same time
  204. + * if only one GPHY core raises the interrupt.
  205. + */
  206. +
  207. + reg = phy_read(phydev, MII_VR9_11G_ISTAT);
  208. +
  209. + return (reg < 0) ? reg : 0;
  210. +}
  211. +
  212. +static int vr9_gphy_did_interrupt(struct phy_device *phydev)
  213. +{
  214. + int reg;
  215. +
  216. + reg = phy_read(phydev, MII_VR9_11G_ISTAT);
  217. +
  218. + return reg > 0;
  219. +}
  220. +
  221. +static int vr9_gphy_config_intr(struct phy_device *phydev)
  222. +{
  223. + int err;
  224. +
  225. + if (phydev->interrupts == PHY_INTERRUPT_ENABLED)
  226. + err = phy_write(phydev, MII_VR9_11G_IMASK, INT_VR9_11G_MASK);
  227. + else
  228. + err = phy_write(phydev, MII_VR9_11G_IMASK, 0);
  229. +
  230. + return err;
  231. +}
  232. +
  233. +static struct phy_driver lantiq_phy[] = {
  234. + {
  235. + .phy_id = 0xd565a400,
  236. + .phy_id_mask = 0xfffffff8,
  237. + .name = "Lantiq XWAY PEF7071",
  238. + .features = (PHY_GBIT_FEATURES | SUPPORTED_Pause),
  239. + .flags = 0, /*PHY_HAS_INTERRUPT,*/
  240. + .config_init = vr9_gphy_config_init,
  241. + .config_aneg = vr9_gphy_config_aneg,
  242. + .read_status = genphy_read_status,
  243. + .ack_interrupt = vr9_gphy_ack_interrupt,
  244. + .did_interrupt = vr9_gphy_did_interrupt,
  245. + .config_intr = vr9_gphy_config_intr,
  246. + .driver = { .owner = THIS_MODULE },
  247. + }, {
  248. + .phy_id = 0x030260D0,
  249. + .phy_id_mask = 0xfffffff0,
  250. + .name = "Lantiq XWAY VR9 GPHY 11G v1.3",
  251. + .features = (PHY_GBIT_FEATURES | SUPPORTED_Pause),
  252. + .flags = 0, /*PHY_HAS_INTERRUPT,*/
  253. + .config_init = vr9_gphy_config_init,
  254. + .config_aneg = vr9_gphy_config_aneg,
  255. + .read_status = genphy_read_status,
  256. + .ack_interrupt = vr9_gphy_ack_interrupt,
  257. + .did_interrupt = vr9_gphy_did_interrupt,
  258. + .config_intr = vr9_gphy_config_intr,
  259. + .driver = { .owner = THIS_MODULE },
  260. + }, {
  261. + .phy_id = 0xd565a408,
  262. + .phy_id_mask = 0xfffffff8,
  263. + .name = "Lantiq XWAY VR9 GPHY 11G v1.4",
  264. + .features = (PHY_GBIT_FEATURES | SUPPORTED_Pause),
  265. + .flags = 0, /*PHY_HAS_INTERRUPT,*/
  266. + .config_init = vr9_gphy_config_init,
  267. + .config_aneg = vr9_gphy_config_aneg,
  268. + .read_status = genphy_read_status,
  269. + .ack_interrupt = vr9_gphy_ack_interrupt,
  270. + .did_interrupt = vr9_gphy_did_interrupt,
  271. + .config_intr = vr9_gphy_config_intr,
  272. + .driver = { .owner = THIS_MODULE },
  273. + }, {
  274. + .phy_id = 0xd565a418,
  275. + .phy_id_mask = 0xfffffff8,
  276. + .name = "Lantiq XWAY XRX PHY22F v1.4",
  277. + .features = (PHY_BASIC_FEATURES | SUPPORTED_Pause),
  278. + .flags = 0, /*PHY_HAS_INTERRUPT,*/
  279. + .config_init = vr9_gphy_config_init,
  280. + .config_aneg = vr9_gphy_config_aneg,
  281. + .read_status = genphy_read_status,
  282. + .ack_interrupt = vr9_gphy_ack_interrupt,
  283. + .did_interrupt = vr9_gphy_did_interrupt,
  284. + .config_intr = vr9_gphy_config_intr,
  285. + .driver = { .owner = THIS_MODULE },
  286. + },
  287. +};
  288. +
  289. +static int __init ltq_phy_init(void)
  290. +{
  291. + int i;
  292. +
  293. + for (i = 0; i < ARRAY_SIZE(lantiq_phy); i++) {
  294. + int err = phy_driver_register(&lantiq_phy[i]);
  295. + if (err)
  296. + pr_err("lantiq_phy: failed to load %s\n", lantiq_phy[i].name);
  297. + }
  298. +
  299. + return 0;
  300. +}
  301. +
  302. +static void __exit ltq_phy_exit(void)
  303. +{
  304. + int i;
  305. +
  306. + for (i = 0; i < ARRAY_SIZE(lantiq_phy); i++)
  307. + phy_driver_unregister(&lantiq_phy[i]);
  308. +}
  309. +
  310. +module_init(ltq_phy_init);
  311. +module_exit(ltq_phy_exit);
  312. +
  313. +MODULE_DESCRIPTION("Lantiq PHY drivers");
  314. +MODULE_AUTHOR("Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>");
  315. +MODULE_LICENSE("GPL");
  316. --- /dev/null
  317. +++ b/Documentation/devicetree/bindings/phy/phy-lanitq.txt
  318. @@ -0,0 +1,216 @@
  319. +Lanitq PHY binding
  320. +============================================
  321. +
  322. +This devicetree binding controls the lantiq ethernet phys led functionality.
  323. +
  324. +Example:
  325. + mdio@0 {
  326. + #address-cells = <1>;
  327. + #size-cells = <0>;
  328. + compatible = "lantiq,xrx200-mdio";
  329. + phy5: ethernet-phy@5 {
  330. + reg = <0x1>;
  331. + compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
  332. + };
  333. + phy11: ethernet-phy@11 {
  334. + reg = <0x11>;
  335. + compatible = "lantiq,phy22f", "ethernet-phy-ieee802.3-c22";
  336. + lantiq,led2h = <0x00>;
  337. + lantiq,led2l = <0x03>;
  338. + };
  339. + phy12: ethernet-phy@12 {
  340. + reg = <0x12>;
  341. + compatible = "lantiq,phy22f", "ethernet-phy-ieee802.3-c22";
  342. + lantiq,led1h = <0x00>;
  343. + lantiq,led1l = <0x03>;
  344. + };
  345. + phy13: ethernet-phy@13 {
  346. + reg = <0x13>;
  347. + compatible = "lantiq,phy22f", "ethernet-phy-ieee802.3-c22";
  348. + lantiq,led2h = <0x00>;
  349. + lantiq,led2l = <0x03>;
  350. + };
  351. + phy14: ethernet-phy@14 {
  352. + reg = <0x14>;
  353. + compatible = "lantiq,phy22f", "ethernet-phy-ieee802.3-c22";
  354. + lantiq,led1h = <0x00>;
  355. + lantiq,led1l = <0x03>;
  356. + };
  357. + };
  358. +
  359. +Register Description
  360. +============================================
  361. +
  362. +LEDCH:
  363. +
  364. +Name Hardware Reset Value
  365. +LEDCH 0x00C5
  366. +
  367. +| 15 | | | | | | | 8 |
  368. +=========================================
  369. +| RES |
  370. +=========================================
  371. +
  372. +| 7 | | | | | | | 0 |
  373. +=========================================
  374. +| FBF | SBF |RES | NACS |
  375. +=========================================
  376. +
  377. +Field Bits Type Description
  378. +FBF 7:6 RW Fast Blink Frequency
  379. + ---
  380. + 0x0 (00b) F02HZ 2 Hz blinking frequency
  381. + 0x1 (01b) F04HZ 4 Hz blinking frequency
  382. + 0x2 (10b) F08HZ 8 Hz blinking frequency
  383. + 0x3 (11b) F16HZ 16 Hz blinking frequency
  384. +
  385. +SBF 5:4 RW Slow Blink Frequency
  386. + ---
  387. + 0x0 (00b) F02HZ 2 Hz blinking frequency
  388. + 0x1 (01b) F04HZ 4 Hz blinking frequency
  389. + 0x2 (10b) F08HZ 8 Hz blinking frequency
  390. + 0x3 (11b) F16HZ 16 Hz blinking frequency
  391. +
  392. +NACS 2:0 RW Inverse of Scan Function
  393. + ---
  394. + 0x0 (000b) NONE No Function
  395. + 0x1 (001b) LINK Complex function enabled when link is up
  396. + 0x2 (010b) PDOWN Complex function enabled when device is powered-down
  397. + 0x3 (011b) EEE Complex function enabled when device is in EEE mode
  398. + 0x4 (100b) ANEG Complex function enabled when auto-negotiation is running
  399. + 0x5 (101b) ABIST Complex function enabled when analog self-test is running
  400. + 0x6 (110b) CDIAG Complex function enabled when cable diagnostics are running
  401. + 0x7 (111b) TEST Complex function enabled when test mode is running
  402. +
  403. +LEDCL:
  404. +
  405. +Name Hardware Reset Value
  406. +LEDCL 0x0067
  407. +
  408. +| 15 | | | | | | | 8 |
  409. +=========================================
  410. +| RES |
  411. +=========================================
  412. +
  413. +| 7 | | | | | | | 0 |
  414. +=========================================
  415. +|RES | SCAN |RES | CBLINK |
  416. +=========================================
  417. +
  418. +Field Bits Type Description
  419. +SCAN 6:4 RW Complex Scan Configuration
  420. + ---
  421. + 000 B NONE No Function
  422. + 001 B LINK Complex function enabled when link is up
  423. + 010 B PDOWN Complex function enabled when device is powered-down
  424. + 011 B EEE Complex function enabled when device is in EEE mode
  425. + 100 B ANEG Complex function enabled when auto-negotiation is running
  426. + 101 B ABIST Complex function enabled when analog self-test is running
  427. + 110 B CDIAG Complex function enabled when cable diagnostics are running
  428. + 111 B TEST Complex function enabled when test mode is running
  429. +
  430. +CBLINK 2:0 RW Complex Blinking Configuration
  431. + ---
  432. + 000 B NONE No Function
  433. + 001 B LINK Complex function enabled when link is up
  434. + 010 B PDOWN Complex function enabled when device is powered-down
  435. + 011 B EEE Complex function enabled when device is in EEE mode
  436. + 100 B ANEG Complex function enabled when auto-negotiation is running
  437. + 101 B ABIST Complex function enabled when analog self-test is running
  438. + 110 B CDIAG Complex function enabled when cable diagnostics are running
  439. + 111 B TEST Complex function enabled when test mode is running
  440. +
  441. +LEDxH:
  442. +
  443. +Name Hardware Reset Value
  444. +LED0H 0x0070
  445. +LED1H 0x0020
  446. +LED2H 0x0040
  447. +LED3H 0x0040
  448. +
  449. +| 15 | | | | | | | 8 |
  450. +=========================================
  451. +| RES |
  452. +=========================================
  453. +
  454. +| 7 | | | | | | | 0 |
  455. +=========================================
  456. +| CON | BLINKF |
  457. +=========================================
  458. +
  459. +Field Bits Type Description
  460. +CON 7:4 RW Constant On Configuration
  461. + ---
  462. + 0x0 (0000b) NONE LED does not light up constantly
  463. + 0x1 (0001b) LINK10 LED is on when link is 10 Mbit/s
  464. + 0x2 (0010b) LINK100 LED is on when link is 100 Mbit/s
  465. + 0x3 (0011b) LINK10X LED is on when link is 10/100 Mbit/s
  466. + 0x4 (0100b) LINK1000 LED is on when link is 1000 Mbit/s
  467. + 0x5 (0101b) LINK10_0 LED is on when link is 10/1000 Mbit/s
  468. + 0x6 (0110b) LINK100X LED is on when link is 100/1000 Mbit/s
  469. + 0x7 (0111b) LINK10XX LED is on when link is 10/100/1000 Mbit/s
  470. + 0x8 (1000b) PDOWN LED is on when device is powered-down
  471. + 0x9 (1001b) EEE LED is on when device is in EEE mode
  472. + 0xA (1010b) ANEG LED is on when auto-negotiation is running
  473. + 0xB (1011b) ABIST LED is on when analog self-test is running
  474. + 0xC (1100b) CDIAG LED is on when cable diagnostics are running
  475. +
  476. +BLINKF 3:0 RW Fast Blinking Configuration
  477. + ---
  478. + 0x0 (0000b) NONE No Blinking
  479. + 0x1 (0001b) LINK10 Blink when link is 10 Mbit/s
  480. + 0x2 (0010b) LINK100 Blink when link is 100 Mbit/s
  481. + 0x3 (0011b) LINK10X Blink when link is 10/100 Mbit/s
  482. + 0x4 (0100b) LINK1000 Blink when link is 1000 Mbit/s
  483. + 0x5 (0101b) LINK10_0 Blink when link is 10/1000 Mbit/s
  484. + 0x6 (0110b) LINK100X Blink when link is 100/1000 Mbit/s
  485. + 0x7 (0111b) LINK10XX Blink when link is 10/100/1000 Mbit/s
  486. + 0x8 (1000b) PDOWN Blink when device is powered-down
  487. + 0x9 (1001b) EEE Blink when device is in EEE mode
  488. + 0xA (1010b) ANEG Blink when auto-negotiation is running
  489. + 0xB (1011b) ABIST Blink when analog self-test is running
  490. + 0xC (1100b) CDIAG Blink when cable diagnostics are running
  491. +
  492. +LEDxL:
  493. +
  494. +Name Hardware Reset Value
  495. +LED0L 0x0003
  496. +LED1L 0x0000
  497. +LED2L 0x0000
  498. +LED3L 0x0020
  499. +
  500. +| 15 | | | | | | | 8 |
  501. +=========================================
  502. +| RES |
  503. +=========================================
  504. +
  505. +| 7 | | | | | | | 0 |
  506. +=========================================
  507. +| BLINKS | PULSE |
  508. +=========================================
  509. +
  510. +Field Bits Type Description
  511. +BLINKS 7:4 RW Slow Blinkin Configuration
  512. + ---
  513. + 0x0 (0000b) NONE No Blinking
  514. + 0x1 (0001b) LINK10 Blink when link is 10 Mbit/s
  515. + 0x2 (0010b) LINK100 Blink when link is 100 Mbit/s
  516. + 0x3 (0011b) LINK10X Blink when link is 10/100 Mbit/s
  517. + 0x4 (0100b) LINK1000 Blink when link is 1000 Mbit/s
  518. + 0x5 (0101b) LINK10_0 Blink when link is 10/1000 Mbit/s
  519. + 0x6 (0110b) LINK100X Blink when link is 100/1000 Mbit/s
  520. + 0x7 (0111b) LINK10XX Blink when link is 10/100/1000 Mbit/s
  521. + 0x8 (1000b) PDOWN Blink when device is powered-down
  522. + 0x9 (1001b) EEE Blink when device is in EEE mode
  523. + 0xA (1010b) ANEG Blink when auto-negotiation is running
  524. + 0xB (1011b) ABIST Blink when analog self-test is running
  525. + 0xC (1100b) CDIAG Blink when cable diagnostics are runningning
  526. +
  527. +PULSE 3:0 RW Pulsing Configuration
  528. + The pulse field is a mask field by which certain events can be combined
  529. + ---
  530. + 0x0 (0000b) NONE No pulsing
  531. + 0x1 (0001b) TXACT Transmit activity
  532. + 0x2 (0010b) RXACT Receive activity
  533. + 0x4 (0100b) COL Collision
  534. + 0x8 (1000b) RES Reserved