vitesse.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542
  1. /*
  2. * Driver for Vitesse PHYs
  3. *
  4. * Author: Kriston Carson
  5. *
  6. * Copyright (c) 2005, 2009, 2011 Freescale Semiconductor, Inc.
  7. *
  8. * This program is free software; you can redistribute it and/or modify it
  9. * under the terms of the GNU General Public License as published by the
  10. * Free Software Foundation; either version 2 of the License, or (at your
  11. * option) any later version.
  12. *
  13. */
  14. #include <linux/kernel.h>
  15. #include <linux/module.h>
  16. #include <linux/mii.h>
  17. #include <linux/ethtool.h>
  18. #include <linux/phy.h>
  19. /* Vitesse Extended Page Magic Register(s) */
  20. #define MII_VSC82X4_EXT_PAGE_16E 0x10
  21. #define MII_VSC82X4_EXT_PAGE_17E 0x11
  22. #define MII_VSC82X4_EXT_PAGE_18E 0x12
  23. /* Vitesse Extended Control Register 1 */
  24. #define MII_VSC8244_EXT_CON1 0x17
  25. #define MII_VSC8244_EXTCON1_INIT 0x0000
  26. #define MII_VSC8244_EXTCON1_TX_SKEW_MASK 0x0c00
  27. #define MII_VSC8244_EXTCON1_RX_SKEW_MASK 0x0300
  28. #define MII_VSC8244_EXTCON1_TX_SKEW 0x0800
  29. #define MII_VSC8244_EXTCON1_RX_SKEW 0x0200
  30. /* Vitesse Interrupt Mask Register */
  31. #define MII_VSC8244_IMASK 0x19
  32. #define MII_VSC8244_IMASK_IEN 0x8000
  33. #define MII_VSC8244_IMASK_SPEED 0x4000
  34. #define MII_VSC8244_IMASK_LINK 0x2000
  35. #define MII_VSC8244_IMASK_DUPLEX 0x1000
  36. #define MII_VSC8244_IMASK_MASK 0xf000
  37. #define MII_VSC8221_IMASK_MASK 0xa000
  38. /* Vitesse Interrupt Status Register */
  39. #define MII_VSC8244_ISTAT 0x1a
  40. #define MII_VSC8244_ISTAT_STATUS 0x8000
  41. #define MII_VSC8244_ISTAT_SPEED 0x4000
  42. #define MII_VSC8244_ISTAT_LINK 0x2000
  43. #define MII_VSC8244_ISTAT_DUPLEX 0x1000
  44. /* Vitesse Auxiliary Control/Status Register */
  45. #define MII_VSC8244_AUX_CONSTAT 0x1c
  46. #define MII_VSC8244_AUXCONSTAT_INIT 0x0000
  47. #define MII_VSC8244_AUXCONSTAT_DUPLEX 0x0020
  48. #define MII_VSC8244_AUXCONSTAT_SPEED 0x0018
  49. #define MII_VSC8244_AUXCONSTAT_GBIT 0x0010
  50. #define MII_VSC8244_AUXCONSTAT_100 0x0008
  51. #define MII_VSC8221_AUXCONSTAT_INIT 0x0004 /* need to set this bit? */
  52. #define MII_VSC8221_AUXCONSTAT_RESERVED 0x0004
  53. /* Vitesse Extended Page Access Register */
  54. #define MII_VSC82X4_EXT_PAGE_ACCESS 0x1f
  55. /* Vitesse VSC8601 Extended PHY Control Register 1 */
  56. #define MII_VSC8601_EPHY_CTL 0x17
  57. #define MII_VSC8601_EPHY_CTL_RGMII_SKEW (1 << 8)
  58. #define PHY_ID_VSC8234 0x000fc620
  59. #define PHY_ID_VSC8244 0x000fc6c0
  60. #define PHY_ID_VSC8514 0x00070670
  61. #define PHY_ID_VSC8572 0x000704d0
  62. #define PHY_ID_VSC8574 0x000704a0
  63. #define PHY_ID_VSC8601 0x00070420
  64. #define PHY_ID_VSC7385 0x00070450
  65. #define PHY_ID_VSC7388 0x00070480
  66. #define PHY_ID_VSC7395 0x00070550
  67. #define PHY_ID_VSC7398 0x00070580
  68. #define PHY_ID_VSC8662 0x00070660
  69. #define PHY_ID_VSC8221 0x000fc550
  70. #define PHY_ID_VSC8211 0x000fc4b0
  71. MODULE_DESCRIPTION("Vitesse PHY driver");
  72. MODULE_AUTHOR("Kriston Carson");
  73. MODULE_LICENSE("GPL");
  74. static int vsc824x_add_skew(struct phy_device *phydev)
  75. {
  76. int err;
  77. int extcon;
  78. extcon = phy_read(phydev, MII_VSC8244_EXT_CON1);
  79. if (extcon < 0)
  80. return extcon;
  81. extcon &= ~(MII_VSC8244_EXTCON1_TX_SKEW_MASK |
  82. MII_VSC8244_EXTCON1_RX_SKEW_MASK);
  83. extcon |= (MII_VSC8244_EXTCON1_TX_SKEW |
  84. MII_VSC8244_EXTCON1_RX_SKEW);
  85. err = phy_write(phydev, MII_VSC8244_EXT_CON1, extcon);
  86. return err;
  87. }
  88. static int vsc824x_config_init(struct phy_device *phydev)
  89. {
  90. int err;
  91. err = phy_write(phydev, MII_VSC8244_AUX_CONSTAT,
  92. MII_VSC8244_AUXCONSTAT_INIT);
  93. if (err < 0)
  94. return err;
  95. if (phydev->interface == PHY_INTERFACE_MODE_RGMII_ID)
  96. err = vsc824x_add_skew(phydev);
  97. return err;
  98. }
  99. #define VSC73XX_EXT_PAGE_ACCESS 0x1f
  100. static int vsc73xx_read_page(struct phy_device *phydev)
  101. {
  102. return __phy_read(phydev, VSC73XX_EXT_PAGE_ACCESS);
  103. }
  104. static int vsc73xx_write_page(struct phy_device *phydev, int page)
  105. {
  106. return __phy_write(phydev, VSC73XX_EXT_PAGE_ACCESS, page);
  107. }
  108. static void vsc73xx_config_init(struct phy_device *phydev)
  109. {
  110. /* Receiver init */
  111. phy_write(phydev, 0x1f, 0x2a30);
  112. phy_modify(phydev, 0x0c, 0x0300, 0x0200);
  113. phy_write(phydev, 0x1f, 0x0000);
  114. /* Config LEDs 0x61 */
  115. phy_modify(phydev, MII_TPISTATUS, 0xff00, 0x0061);
  116. }
  117. static int vsc738x_config_init(struct phy_device *phydev)
  118. {
  119. u16 rev;
  120. /* This magic sequence appear in the application note
  121. * "VSC7385/7388 PHY Configuration".
  122. *
  123. * Maybe one day we will get to know what it all means.
  124. */
  125. phy_write(phydev, 0x1f, 0x2a30);
  126. phy_modify(phydev, 0x08, 0x0200, 0x0200);
  127. phy_write(phydev, 0x1f, 0x52b5);
  128. phy_write(phydev, 0x10, 0xb68a);
  129. phy_modify(phydev, 0x12, 0xff07, 0x0003);
  130. phy_modify(phydev, 0x11, 0x00ff, 0x00a2);
  131. phy_write(phydev, 0x10, 0x968a);
  132. phy_write(phydev, 0x1f, 0x2a30);
  133. phy_modify(phydev, 0x08, 0x0200, 0x0000);
  134. phy_write(phydev, 0x1f, 0x0000);
  135. /* Read revision */
  136. rev = phy_read(phydev, MII_PHYSID2);
  137. rev &= 0x0f;
  138. /* Special quirk for revision 0 */
  139. if (rev == 0) {
  140. phy_write(phydev, 0x1f, 0x2a30);
  141. phy_modify(phydev, 0x08, 0x0200, 0x0200);
  142. phy_write(phydev, 0x1f, 0x52b5);
  143. phy_write(phydev, 0x12, 0x0000);
  144. phy_write(phydev, 0x11, 0x0689);
  145. phy_write(phydev, 0x10, 0x8f92);
  146. phy_write(phydev, 0x1f, 0x52b5);
  147. phy_write(phydev, 0x12, 0x0000);
  148. phy_write(phydev, 0x11, 0x0e35);
  149. phy_write(phydev, 0x10, 0x9786);
  150. phy_write(phydev, 0x1f, 0x2a30);
  151. phy_modify(phydev, 0x08, 0x0200, 0x0000);
  152. phy_write(phydev, 0x17, 0xff80);
  153. phy_write(phydev, 0x17, 0x0000);
  154. }
  155. phy_write(phydev, 0x1f, 0x0000);
  156. phy_write(phydev, 0x12, 0x0048);
  157. if (rev == 0) {
  158. phy_write(phydev, 0x1f, 0x2a30);
  159. phy_write(phydev, 0x14, 0x6600);
  160. phy_write(phydev, 0x1f, 0x0000);
  161. phy_write(phydev, 0x18, 0xa24e);
  162. } else {
  163. phy_write(phydev, 0x1f, 0x2a30);
  164. phy_modify(phydev, 0x16, 0x0fc0, 0x0240);
  165. phy_modify(phydev, 0x14, 0x6000, 0x4000);
  166. /* bits 14-15 in extended register 0x14 controls DACG amplitude
  167. * 6 = -8%, 2 is hardware default
  168. */
  169. phy_write(phydev, 0x1f, 0x0001);
  170. phy_modify(phydev, 0x14, 0xe000, 0x6000);
  171. phy_write(phydev, 0x1f, 0x0000);
  172. }
  173. vsc73xx_config_init(phydev);
  174. return genphy_config_init(phydev);
  175. }
  176. static int vsc739x_config_init(struct phy_device *phydev)
  177. {
  178. /* This magic sequence appears in the VSC7395 SparX-G5e application
  179. * note "VSC7395/VSC7398 PHY Configuration"
  180. *
  181. * Maybe one day we will get to know what it all means.
  182. */
  183. phy_write(phydev, 0x1f, 0x2a30);
  184. phy_modify(phydev, 0x08, 0x0200, 0x0200);
  185. phy_write(phydev, 0x1f, 0x52b5);
  186. phy_write(phydev, 0x10, 0xb68a);
  187. phy_modify(phydev, 0x12, 0xff07, 0x0003);
  188. phy_modify(phydev, 0x11, 0x00ff, 0x00a2);
  189. phy_write(phydev, 0x10, 0x968a);
  190. phy_write(phydev, 0x1f, 0x2a30);
  191. phy_modify(phydev, 0x08, 0x0200, 0x0000);
  192. phy_write(phydev, 0x1f, 0x0000);
  193. phy_write(phydev, 0x1f, 0x0000);
  194. phy_write(phydev, 0x12, 0x0048);
  195. phy_write(phydev, 0x1f, 0x2a30);
  196. phy_modify(phydev, 0x16, 0x0fc0, 0x0240);
  197. phy_modify(phydev, 0x14, 0x6000, 0x4000);
  198. phy_write(phydev, 0x1f, 0x0001);
  199. phy_modify(phydev, 0x14, 0xe000, 0x6000);
  200. phy_write(phydev, 0x1f, 0x0000);
  201. vsc73xx_config_init(phydev);
  202. return genphy_config_init(phydev);
  203. }
  204. static int vsc73xx_config_aneg(struct phy_device *phydev)
  205. {
  206. /* The VSC73xx switches does not like to be instructed to
  207. * do autonegotiation in any way, it prefers that you just go
  208. * with the power-on/reset defaults. Writing some registers will
  209. * just make autonegotiation permanently fail.
  210. */
  211. return 0;
  212. }
  213. /* This adds a skew for both TX and RX clocks, so the skew should only be
  214. * applied to "rgmii-id" interfaces. It may not work as expected
  215. * on "rgmii-txid", "rgmii-rxid" or "rgmii" interfaces. */
  216. static int vsc8601_add_skew(struct phy_device *phydev)
  217. {
  218. int ret;
  219. ret = phy_read(phydev, MII_VSC8601_EPHY_CTL);
  220. if (ret < 0)
  221. return ret;
  222. ret |= MII_VSC8601_EPHY_CTL_RGMII_SKEW;
  223. return phy_write(phydev, MII_VSC8601_EPHY_CTL, ret);
  224. }
  225. static int vsc8601_config_init(struct phy_device *phydev)
  226. {
  227. int ret = 0;
  228. if (phydev->interface == PHY_INTERFACE_MODE_RGMII_ID)
  229. ret = vsc8601_add_skew(phydev);
  230. if (ret < 0)
  231. return ret;
  232. return genphy_config_init(phydev);
  233. }
  234. static int vsc824x_ack_interrupt(struct phy_device *phydev)
  235. {
  236. int err = 0;
  237. /* Don't bother to ACK the interrupts if interrupts
  238. * are disabled. The 824x cannot clear the interrupts
  239. * if they are disabled.
  240. */
  241. if (phydev->interrupts == PHY_INTERRUPT_ENABLED)
  242. err = phy_read(phydev, MII_VSC8244_ISTAT);
  243. return (err < 0) ? err : 0;
  244. }
  245. static int vsc82xx_config_intr(struct phy_device *phydev)
  246. {
  247. int err;
  248. if (phydev->interrupts == PHY_INTERRUPT_ENABLED)
  249. err = phy_write(phydev, MII_VSC8244_IMASK,
  250. (phydev->drv->phy_id == PHY_ID_VSC8234 ||
  251. phydev->drv->phy_id == PHY_ID_VSC8244 ||
  252. phydev->drv->phy_id == PHY_ID_VSC8514 ||
  253. phydev->drv->phy_id == PHY_ID_VSC8572 ||
  254. phydev->drv->phy_id == PHY_ID_VSC8574 ||
  255. phydev->drv->phy_id == PHY_ID_VSC8601) ?
  256. MII_VSC8244_IMASK_MASK :
  257. MII_VSC8221_IMASK_MASK);
  258. else {
  259. /* The Vitesse PHY cannot clear the interrupt
  260. * once it has disabled them, so we clear them first
  261. */
  262. err = phy_read(phydev, MII_VSC8244_ISTAT);
  263. if (err < 0)
  264. return err;
  265. err = phy_write(phydev, MII_VSC8244_IMASK, 0);
  266. }
  267. return err;
  268. }
  269. static int vsc8221_config_init(struct phy_device *phydev)
  270. {
  271. int err;
  272. err = phy_write(phydev, MII_VSC8244_AUX_CONSTAT,
  273. MII_VSC8221_AUXCONSTAT_INIT);
  274. return err;
  275. /* Perhaps we should set EXT_CON1 based on the interface?
  276. * Options are 802.3Z SerDes or SGMII
  277. */
  278. }
  279. /* vsc82x4_config_autocross_enable - Enable auto MDI/MDI-X for forced links
  280. * @phydev: target phy_device struct
  281. *
  282. * Enable auto MDI/MDI-X when in 10/100 forced link speeds by writing
  283. * special values in the VSC8234/VSC8244 extended reserved registers
  284. */
  285. static int vsc82x4_config_autocross_enable(struct phy_device *phydev)
  286. {
  287. int ret;
  288. if (phydev->autoneg == AUTONEG_ENABLE || phydev->speed > SPEED_100)
  289. return 0;
  290. /* map extended registers set 0x10 - 0x1e */
  291. ret = phy_write(phydev, MII_VSC82X4_EXT_PAGE_ACCESS, 0x52b5);
  292. if (ret >= 0)
  293. ret = phy_write(phydev, MII_VSC82X4_EXT_PAGE_18E, 0x0012);
  294. if (ret >= 0)
  295. ret = phy_write(phydev, MII_VSC82X4_EXT_PAGE_17E, 0x2803);
  296. if (ret >= 0)
  297. ret = phy_write(phydev, MII_VSC82X4_EXT_PAGE_16E, 0x87fa);
  298. /* map standard registers set 0x10 - 0x1e */
  299. if (ret >= 0)
  300. ret = phy_write(phydev, MII_VSC82X4_EXT_PAGE_ACCESS, 0x0000);
  301. else
  302. phy_write(phydev, MII_VSC82X4_EXT_PAGE_ACCESS, 0x0000);
  303. return ret;
  304. }
  305. /* vsc82x4_config_aneg - restart auto-negotiation or write BMCR
  306. * @phydev: target phy_device struct
  307. *
  308. * Description: If auto-negotiation is enabled, we configure the
  309. * advertising, and then restart auto-negotiation. If it is not
  310. * enabled, then we write the BMCR and also start the auto
  311. * MDI/MDI-X feature
  312. */
  313. static int vsc82x4_config_aneg(struct phy_device *phydev)
  314. {
  315. int ret;
  316. /* Enable auto MDI/MDI-X when in 10/100 forced link speeds by
  317. * writing special values in the VSC8234 extended reserved registers
  318. */
  319. if (phydev->autoneg != AUTONEG_ENABLE && phydev->speed <= SPEED_100) {
  320. ret = genphy_setup_forced(phydev);
  321. if (ret < 0) /* error */
  322. return ret;
  323. return vsc82x4_config_autocross_enable(phydev);
  324. }
  325. return genphy_config_aneg(phydev);
  326. }
  327. /* Vitesse 82xx */
  328. static struct phy_driver vsc82xx_driver[] = {
  329. {
  330. .phy_id = PHY_ID_VSC8234,
  331. .name = "Vitesse VSC8234",
  332. .phy_id_mask = 0x000ffff0,
  333. .features = PHY_GBIT_FEATURES,
  334. .flags = PHY_HAS_INTERRUPT,
  335. .config_init = &vsc824x_config_init,
  336. .config_aneg = &vsc82x4_config_aneg,
  337. .ack_interrupt = &vsc824x_ack_interrupt,
  338. .config_intr = &vsc82xx_config_intr,
  339. }, {
  340. .phy_id = PHY_ID_VSC8244,
  341. .name = "Vitesse VSC8244",
  342. .phy_id_mask = 0x000fffc0,
  343. .features = PHY_GBIT_FEATURES,
  344. .flags = PHY_HAS_INTERRUPT,
  345. .config_init = &vsc824x_config_init,
  346. .config_aneg = &vsc82x4_config_aneg,
  347. .ack_interrupt = &vsc824x_ack_interrupt,
  348. .config_intr = &vsc82xx_config_intr,
  349. }, {
  350. .phy_id = PHY_ID_VSC8514,
  351. .name = "Vitesse VSC8514",
  352. .phy_id_mask = 0x000ffff0,
  353. .features = PHY_GBIT_FEATURES,
  354. .flags = PHY_HAS_INTERRUPT,
  355. .config_init = &vsc824x_config_init,
  356. .config_aneg = &vsc82x4_config_aneg,
  357. .ack_interrupt = &vsc824x_ack_interrupt,
  358. .config_intr = &vsc82xx_config_intr,
  359. }, {
  360. .phy_id = PHY_ID_VSC8572,
  361. .name = "Vitesse VSC8572",
  362. .phy_id_mask = 0x000ffff0,
  363. .features = PHY_GBIT_FEATURES,
  364. .flags = PHY_HAS_INTERRUPT,
  365. .config_init = &vsc824x_config_init,
  366. .config_aneg = &vsc82x4_config_aneg,
  367. .ack_interrupt = &vsc824x_ack_interrupt,
  368. .config_intr = &vsc82xx_config_intr,
  369. }, {
  370. .phy_id = PHY_ID_VSC8574,
  371. .name = "Vitesse VSC8574",
  372. .phy_id_mask = 0x000ffff0,
  373. .features = PHY_GBIT_FEATURES,
  374. .flags = PHY_HAS_INTERRUPT,
  375. .config_init = &vsc824x_config_init,
  376. .config_aneg = &vsc82x4_config_aneg,
  377. .ack_interrupt = &vsc824x_ack_interrupt,
  378. .config_intr = &vsc82xx_config_intr,
  379. }, {
  380. .phy_id = PHY_ID_VSC8601,
  381. .name = "Vitesse VSC8601",
  382. .phy_id_mask = 0x000ffff0,
  383. .features = PHY_GBIT_FEATURES,
  384. .flags = PHY_HAS_INTERRUPT,
  385. .config_init = &vsc8601_config_init,
  386. .ack_interrupt = &vsc824x_ack_interrupt,
  387. .config_intr = &vsc82xx_config_intr,
  388. }, {
  389. .phy_id = PHY_ID_VSC7385,
  390. .name = "Vitesse VSC7385",
  391. .phy_id_mask = 0x000ffff0,
  392. .features = PHY_GBIT_FEATURES,
  393. .config_init = vsc738x_config_init,
  394. .config_aneg = vsc73xx_config_aneg,
  395. .read_page = vsc73xx_read_page,
  396. .write_page = vsc73xx_write_page,
  397. }, {
  398. .phy_id = PHY_ID_VSC7388,
  399. .name = "Vitesse VSC7388",
  400. .phy_id_mask = 0x000ffff0,
  401. .features = PHY_GBIT_FEATURES,
  402. .config_init = vsc738x_config_init,
  403. .config_aneg = vsc73xx_config_aneg,
  404. .read_page = vsc73xx_read_page,
  405. .write_page = vsc73xx_write_page,
  406. }, {
  407. .phy_id = PHY_ID_VSC7395,
  408. .name = "Vitesse VSC7395",
  409. .phy_id_mask = 0x000ffff0,
  410. .features = PHY_GBIT_FEATURES,
  411. .config_init = vsc739x_config_init,
  412. .config_aneg = vsc73xx_config_aneg,
  413. .read_page = vsc73xx_read_page,
  414. .write_page = vsc73xx_write_page,
  415. }, {
  416. .phy_id = PHY_ID_VSC7398,
  417. .name = "Vitesse VSC7398",
  418. .phy_id_mask = 0x000ffff0,
  419. .features = PHY_GBIT_FEATURES,
  420. .config_init = vsc739x_config_init,
  421. .config_aneg = vsc73xx_config_aneg,
  422. .read_page = vsc73xx_read_page,
  423. .write_page = vsc73xx_write_page,
  424. }, {
  425. .phy_id = PHY_ID_VSC8662,
  426. .name = "Vitesse VSC8662",
  427. .phy_id_mask = 0x000ffff0,
  428. .features = PHY_GBIT_FEATURES,
  429. .flags = PHY_HAS_INTERRUPT,
  430. .config_init = &vsc824x_config_init,
  431. .config_aneg = &vsc82x4_config_aneg,
  432. .ack_interrupt = &vsc824x_ack_interrupt,
  433. .config_intr = &vsc82xx_config_intr,
  434. }, {
  435. /* Vitesse 8221 */
  436. .phy_id = PHY_ID_VSC8221,
  437. .phy_id_mask = 0x000ffff0,
  438. .name = "Vitesse VSC8221",
  439. .features = PHY_GBIT_FEATURES,
  440. .flags = PHY_HAS_INTERRUPT,
  441. .config_init = &vsc8221_config_init,
  442. .ack_interrupt = &vsc824x_ack_interrupt,
  443. .config_intr = &vsc82xx_config_intr,
  444. }, {
  445. /* Vitesse 8211 */
  446. .phy_id = PHY_ID_VSC8211,
  447. .phy_id_mask = 0x000ffff0,
  448. .name = "Vitesse VSC8211",
  449. .features = PHY_GBIT_FEATURES,
  450. .flags = PHY_HAS_INTERRUPT,
  451. .config_init = &vsc8221_config_init,
  452. .ack_interrupt = &vsc824x_ack_interrupt,
  453. .config_intr = &vsc82xx_config_intr,
  454. } };
  455. module_phy_driver(vsc82xx_driver);
  456. static struct mdio_device_id __maybe_unused vitesse_tbl[] = {
  457. { PHY_ID_VSC8234, 0x000ffff0 },
  458. { PHY_ID_VSC8244, 0x000fffc0 },
  459. { PHY_ID_VSC8514, 0x000ffff0 },
  460. { PHY_ID_VSC8572, 0x000ffff0 },
  461. { PHY_ID_VSC8574, 0x000ffff0 },
  462. { PHY_ID_VSC7385, 0x000ffff0 },
  463. { PHY_ID_VSC7388, 0x000ffff0 },
  464. { PHY_ID_VSC7395, 0x000ffff0 },
  465. { PHY_ID_VSC7398, 0x000ffff0 },
  466. { PHY_ID_VSC8662, 0x000ffff0 },
  467. { PHY_ID_VSC8221, 0x000ffff0 },
  468. { PHY_ID_VSC8211, 0x000ffff0 },
  469. { }
  470. };
  471. MODULE_DEVICE_TABLE(mdio, vitesse_tbl);