1 // SPDX-License-Identifier: GPL-2.0+
3 * Copyright (c) 2015 Google, Inc
4 * Copyright (c) 2011 The Chromium OS Authors.
5 * Copyright (C) 2009 NVIDIA, Corporation
6 * Copyright (C) 2007-2008 SMSC (Steve Glendinning)
16 #include <asm/unaligned.h>
17 #include <linux/delay.h>
18 #include <linux/mii.h>
19 #include "usb_ether.h"
21 /* SMSC LAN95xx based USB 2.0 Ethernet Devices */
24 #define LED_GPIO_CFG (0x24)
25 #define LED_GPIO_CFG_SPD_LED (0x01000000)
26 #define LED_GPIO_CFG_LNK_LED (0x00100000)
27 #define LED_GPIO_CFG_FDX_LED (0x00010000)
29 /* Tx command words */
30 #define TX_CMD_A_FIRST_SEG_ 0x00002000
31 #define TX_CMD_A_LAST_SEG_ 0x00001000
34 #define RX_STS_FL_ 0x3FFF0000 /* Frame Length */
35 #define RX_STS_ES_ 0x00008000 /* Error Summary */
43 #define TX_CFG_ON_ 0x00000004
46 #define HW_CFG_BIR_ 0x00001000
47 #define HW_CFG_RXDOFF_ 0x00000600
48 #define HW_CFG_MEF_ 0x00000020
49 #define HW_CFG_BCE_ 0x00000002
50 #define HW_CFG_LRST_ 0x00000008
53 #define PM_CTL_PHY_RST_ 0x00000010
58 * Hi watermark = 15.5Kb (~10 mtu pkts)
59 * low watermark = 3k (~2 mtu pkts)
60 * backpressure duration = ~ 350us
61 * Apply FC on any frame.
63 #define AFC_CFG_DEFAULT 0x00F830A1
66 #define E2P_CMD_BUSY_ 0x80000000
67 #define E2P_CMD_READ_ 0x00000000
68 #define E2P_CMD_TIMEOUT_ 0x00000400
69 #define E2P_CMD_LOADED_ 0x00000200
70 #define E2P_CMD_ADDR_ 0x000001FF
74 #define BURST_CAP 0x38
76 #define INT_EP_CTL 0x68
77 #define INT_EP_CTL_PHY_INT_ 0x00008000
79 #define BULK_IN_DLY 0x6C
83 #define MAC_CR_MCPAS_ 0x00080000
84 #define MAC_CR_PRMS_ 0x00040000
85 #define MAC_CR_HPFILT_ 0x00002000
86 #define MAC_CR_TXEN_ 0x00000008
87 #define MAC_CR_RXEN_ 0x00000004
93 #define MII_ADDR 0x114
94 #define MII_WRITE_ 0x02
95 #define MII_BUSY_ 0x01
96 #define MII_READ_ 0x00 /* ~of MII Write bit */
98 #define MII_DATA 0x118
105 #define Tx_COE_EN_ 0x00010000
106 #define Rx_COE_EN_ 0x00000001
108 /* Vendor-specific PHY Definitions */
109 #define PHY_INT_SRC 29
111 #define PHY_INT_MASK 30
112 #define PHY_INT_MASK_ANEG_COMP_ ((u16)0x0040)
113 #define PHY_INT_MASK_LINK_DOWN_ ((u16)0x0010)
114 #define PHY_INT_MASK_DEFAULT_ (PHY_INT_MASK_ANEG_COMP_ | \
115 PHY_INT_MASK_LINK_DOWN_)
117 /* USB Vendor Requests */
118 #define USB_VENDOR_REQUEST_WRITE_REGISTER 0xA0
119 #define USB_VENDOR_REQUEST_READ_REGISTER 0xA1
121 /* Some extra defines */
122 #define HS_USB_PKT_SIZE 512
123 #define FS_USB_PKT_SIZE 64
124 /* 5/33 is lower limit for BURST_CAP to work */
125 #define DEFAULT_HS_BURST_CAP_SIZE (5 * HS_USB_PKT_SIZE)
126 #define DEFAULT_FS_BURST_CAP_SIZE (33 * FS_USB_PKT_SIZE)
127 #define DEFAULT_BULK_IN_DELAY 0x00002000
128 #define MAX_SINGLE_PACKET_SIZE 2048
129 #define EEPROM_MAC_OFFSET 0x01
130 #define SMSC95XX_INTERNAL_PHY_ID 1
131 #define ETH_P_8021Q 0x8100 /* 802.1Q VLAN Extended Header */
134 #define SMSC95XX_BASE_NAME "sms"
135 #define USB_CTRL_SET_TIMEOUT 5000
136 #define USB_CTRL_GET_TIMEOUT 5000
137 #define USB_BULK_SEND_TIMEOUT 5000
138 #define USB_BULK_RECV_TIMEOUT 5000
140 #define RX_URB_SIZE DEFAULT_HS_BURST_CAP_SIZE
141 #define PHY_CONNECT_TIMEOUT 5000
146 struct smsc95xx_private {
147 struct ueth_data ueth;
148 size_t rx_urb_size; /* maximum USB URB size */
149 u32 mac_cr; /* MAC control register value */
150 int have_hwaddr; /* 1 if we have a hardware MAC address */
154 * Smsc95xx infrastructure commands
156 static int smsc95xx_write_reg(struct usb_device *udev, u32 index, u32 data)
159 ALLOC_CACHE_ALIGN_BUFFER(u32, tmpbuf, 1);
164 len = usb_control_msg(udev, usb_sndctrlpipe(udev, 0),
165 USB_VENDOR_REQUEST_WRITE_REGISTER,
166 USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
167 0, index, tmpbuf, sizeof(data),
168 USB_CTRL_SET_TIMEOUT);
169 if (len != sizeof(data)) {
170 debug("smsc95xx_write_reg failed: index=%d, data=%d, len=%d",
177 static int smsc95xx_read_reg(struct usb_device *udev, u32 index, u32 *data)
180 ALLOC_CACHE_ALIGN_BUFFER(u32, tmpbuf, 1);
182 len = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0),
183 USB_VENDOR_REQUEST_READ_REGISTER,
184 USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
185 0, index, tmpbuf, sizeof(*data),
186 USB_CTRL_GET_TIMEOUT);
188 if (len != sizeof(*data)) {
189 debug("smsc95xx_read_reg failed: index=%d, len=%d",
198 /* Loop until the read is completed with timeout */
199 static int smsc95xx_phy_wait_not_busy(struct usb_device *udev)
201 unsigned long start_time = get_timer(0);
205 smsc95xx_read_reg(udev, MII_ADDR, &val);
206 if (!(val & MII_BUSY_))
208 } while (get_timer(start_time) < 1000);
213 static int smsc95xx_mdio_read(struct usb_device *udev, int phy_id, int idx)
217 /* confirm MII not busy */
218 if (smsc95xx_phy_wait_not_busy(udev)) {
219 debug("MII is busy in smsc95xx_mdio_read\n");
223 /* set the address, index & direction (read from PHY) */
224 addr = (phy_id << 11) | (idx << 6) | MII_READ_;
225 smsc95xx_write_reg(udev, MII_ADDR, addr);
227 if (smsc95xx_phy_wait_not_busy(udev)) {
228 debug("Timed out reading MII reg %02X\n", idx);
232 smsc95xx_read_reg(udev, MII_DATA, &val);
234 return (u16)(val & 0xFFFF);
237 static void smsc95xx_mdio_write(struct usb_device *udev, int phy_id, int idx,
242 /* confirm MII not busy */
243 if (smsc95xx_phy_wait_not_busy(udev)) {
244 debug("MII is busy in smsc95xx_mdio_write\n");
249 smsc95xx_write_reg(udev, MII_DATA, val);
251 /* set the address, index & direction (write to PHY) */
252 addr = (phy_id << 11) | (idx << 6) | MII_WRITE_;
253 smsc95xx_write_reg(udev, MII_ADDR, addr);
255 if (smsc95xx_phy_wait_not_busy(udev))
256 debug("Timed out writing MII reg %02X\n", idx);
259 static int smsc95xx_eeprom_confirm_not_busy(struct usb_device *udev)
261 unsigned long start_time = get_timer(0);
265 smsc95xx_read_reg(udev, E2P_CMD, &val);
266 if (!(val & E2P_CMD_BUSY_))
269 } while (get_timer(start_time) < 1 * 1000 * 1000);
271 debug("EEPROM is busy\n");
275 static int smsc95xx_wait_eeprom(struct usb_device *udev)
277 unsigned long start_time = get_timer(0);
281 smsc95xx_read_reg(udev, E2P_CMD, &val);
282 if (!(val & E2P_CMD_BUSY_) || (val & E2P_CMD_TIMEOUT_))
285 } while (get_timer(start_time) < 1 * 1000 * 1000);
287 if (val & (E2P_CMD_TIMEOUT_ | E2P_CMD_BUSY_)) {
288 debug("EEPROM read operation timeout\n");
294 static int smsc95xx_read_eeprom(struct usb_device *udev, u32 offset, u32 length,
300 ret = smsc95xx_eeprom_confirm_not_busy(udev);
304 for (i = 0; i < length; i++) {
305 val = E2P_CMD_BUSY_ | E2P_CMD_READ_ | (offset & E2P_CMD_ADDR_);
306 smsc95xx_write_reg(udev, E2P_CMD, val);
308 ret = smsc95xx_wait_eeprom(udev);
312 smsc95xx_read_reg(udev, E2P_DATA, &val);
313 data[i] = val & 0xFF;
320 * mii_nway_restart - restart NWay (autonegotiation) for this interface
322 * Returns 0 on success, negative on error.
324 static int mii_nway_restart(struct usb_device *udev, struct ueth_data *dev)
329 /* if autoneg is off, it's an error */
330 bmcr = smsc95xx_mdio_read(udev, dev->phy_id, MII_BMCR);
332 if (bmcr & BMCR_ANENABLE) {
333 bmcr |= BMCR_ANRESTART;
334 smsc95xx_mdio_write(udev, dev->phy_id, MII_BMCR, bmcr);
340 static int smsc95xx_phy_initialize(struct usb_device *udev,
341 struct ueth_data *dev)
343 smsc95xx_mdio_write(udev, dev->phy_id, MII_BMCR, BMCR_RESET);
344 smsc95xx_mdio_write(udev, dev->phy_id, MII_ADVERTISE,
345 ADVERTISE_ALL | ADVERTISE_CSMA |
346 ADVERTISE_PAUSE_CAP | ADVERTISE_PAUSE_ASYM);
349 smsc95xx_mdio_read(udev, dev->phy_id, PHY_INT_SRC);
351 smsc95xx_mdio_write(udev, dev->phy_id, PHY_INT_MASK,
352 PHY_INT_MASK_DEFAULT_);
353 mii_nway_restart(udev, dev);
355 debug("phy initialised succesfully\n");
359 static int smsc95xx_init_mac_address(unsigned char *enetaddr,
360 struct usb_device *udev)
364 /* try reading mac address from EEPROM */
365 ret = smsc95xx_read_eeprom(udev, EEPROM_MAC_OFFSET, ETH_ALEN, enetaddr);
369 if (is_valid_ethaddr(enetaddr)) {
370 /* eeprom values are valid so use them */
371 debug("MAC address read from EEPROM\n");
376 * No eeprom, or eeprom values are invalid. Generating a random MAC
377 * address is not safe. Just return an error.
379 debug("Invalid MAC address read from EEPROM\n");
384 static int smsc95xx_write_hwaddr_common(struct usb_device *udev,
385 struct smsc95xx_private *priv,
386 unsigned char *enetaddr)
388 u32 addr_lo = get_unaligned_le32(&enetaddr[0]);
389 u32 addr_hi = get_unaligned_le16(&enetaddr[4]);
392 /* set hardware address */
393 debug("** %s()\n", __func__);
394 ret = smsc95xx_write_reg(udev, ADDRL, addr_lo);
398 ret = smsc95xx_write_reg(udev, ADDRH, addr_hi);
402 debug("MAC %pM\n", enetaddr);
403 priv->have_hwaddr = 1;
408 /* Enable or disable Tx & Rx checksum offload engines */
409 static int smsc95xx_set_csums(struct usb_device *udev, int use_tx_csum,
413 int ret = smsc95xx_read_reg(udev, COE_CR, &read_buf);
418 read_buf |= Tx_COE_EN_;
420 read_buf &= ~Tx_COE_EN_;
423 read_buf |= Rx_COE_EN_;
425 read_buf &= ~Rx_COE_EN_;
427 ret = smsc95xx_write_reg(udev, COE_CR, read_buf);
431 debug("COE_CR = 0x%08x\n", read_buf);
435 static void smsc95xx_set_multicast(struct smsc95xx_private *priv)
437 /* No multicast in u-boot */
438 priv->mac_cr &= ~(MAC_CR_PRMS_ | MAC_CR_MCPAS_ | MAC_CR_HPFILT_);
441 /* starts the TX path */
442 static void smsc95xx_start_tx_path(struct usb_device *udev,
443 struct smsc95xx_private *priv)
447 /* Enable Tx at MAC */
448 priv->mac_cr |= MAC_CR_TXEN_;
450 smsc95xx_write_reg(udev, MAC_CR, priv->mac_cr);
452 /* Enable Tx at SCSRs */
453 reg_val = TX_CFG_ON_;
454 smsc95xx_write_reg(udev, TX_CFG, reg_val);
457 /* Starts the Receive path */
458 static void smsc95xx_start_rx_path(struct usb_device *udev,
459 struct smsc95xx_private *priv)
461 priv->mac_cr |= MAC_CR_RXEN_;
462 smsc95xx_write_reg(udev, MAC_CR, priv->mac_cr);
465 static int smsc95xx_init_common(struct usb_device *udev, struct ueth_data *dev,
466 struct smsc95xx_private *priv,
467 unsigned char *enetaddr)
474 #define TIMEOUT_RESOLUTION 50 /* ms */
477 debug("** %s()\n", __func__);
478 dev->phy_id = SMSC95XX_INTERNAL_PHY_ID; /* fixed phy id */
480 write_buf = HW_CFG_LRST_;
481 ret = smsc95xx_write_reg(udev, HW_CFG, write_buf);
487 ret = smsc95xx_read_reg(udev, HW_CFG, &read_buf);
492 } while ((read_buf & HW_CFG_LRST_) && (timeout < 100));
494 if (timeout >= 100) {
495 debug("timeout waiting for completion of Lite Reset\n");
499 write_buf = PM_CTL_PHY_RST_;
500 ret = smsc95xx_write_reg(udev, PM_CTRL, write_buf);
506 ret = smsc95xx_read_reg(udev, PM_CTRL, &read_buf);
511 } while ((read_buf & PM_CTL_PHY_RST_) && (timeout < 100));
512 if (timeout >= 100) {
513 debug("timeout waiting for PHY Reset\n");
516 if (!priv->have_hwaddr) {
517 puts("Error: SMSC95xx: No MAC address set - set usbethaddr\n");
518 return -EADDRNOTAVAIL;
520 ret = smsc95xx_write_hwaddr_common(udev, priv, enetaddr);
525 if (dev->pusb_dev->speed == USB_SPEED_HIGH) {
526 burst_cap = DEFAULT_HS_BURST_CAP_SIZE / HS_USB_PKT_SIZE;
527 priv->rx_urb_size = DEFAULT_HS_BURST_CAP_SIZE;
529 burst_cap = DEFAULT_FS_BURST_CAP_SIZE / FS_USB_PKT_SIZE;
530 priv->rx_urb_size = DEFAULT_FS_BURST_CAP_SIZE;
534 priv->rx_urb_size = MAX_SINGLE_PACKET_SIZE;
536 debug("rx_urb_size=%ld\n", (ulong)priv->rx_urb_size);
538 ret = smsc95xx_write_reg(udev, BURST_CAP, burst_cap);
542 ret = smsc95xx_read_reg(udev, BURST_CAP, &read_buf);
545 debug("Read Value from BURST_CAP after writing: 0x%08x\n", read_buf);
547 read_buf = DEFAULT_BULK_IN_DELAY;
548 ret = smsc95xx_write_reg(udev, BULK_IN_DLY, read_buf);
552 ret = smsc95xx_read_reg(udev, BULK_IN_DLY, &read_buf);
555 debug("Read Value from BULK_IN_DLY after writing: "
556 "0x%08x\n", read_buf);
558 ret = smsc95xx_read_reg(udev, HW_CFG, &read_buf);
561 debug("Read Value from HW_CFG: 0x%08x\n", read_buf);
564 read_buf |= (HW_CFG_MEF_ | HW_CFG_BCE_);
566 read_buf &= ~HW_CFG_RXDOFF_;
568 #define NET_IP_ALIGN 0
569 read_buf |= NET_IP_ALIGN << 9;
571 ret = smsc95xx_write_reg(udev, HW_CFG, read_buf);
575 ret = smsc95xx_read_reg(udev, HW_CFG, &read_buf);
578 debug("Read Value from HW_CFG after writing: 0x%08x\n", read_buf);
580 write_buf = 0xFFFFFFFF;
581 ret = smsc95xx_write_reg(udev, INT_STS, write_buf);
585 ret = smsc95xx_read_reg(udev, ID_REV, &read_buf);
588 debug("ID_REV = 0x%08x\n", read_buf);
590 /* Configure GPIO pins as LED outputs */
591 write_buf = LED_GPIO_CFG_SPD_LED | LED_GPIO_CFG_LNK_LED |
592 LED_GPIO_CFG_FDX_LED;
593 ret = smsc95xx_write_reg(udev, LED_GPIO_CFG, write_buf);
596 debug("LED_GPIO_CFG set\n");
600 ret = smsc95xx_write_reg(udev, FLOW, write_buf);
604 read_buf = AFC_CFG_DEFAULT;
605 ret = smsc95xx_write_reg(udev, AFC_CFG, read_buf);
609 ret = smsc95xx_read_reg(udev, MAC_CR, &priv->mac_cr);
613 /* Init Rx. Set Vlan */
614 write_buf = (u32)ETH_P_8021Q;
615 ret = smsc95xx_write_reg(udev, VLAN1, write_buf);
619 /* Disable checksum offload engines */
620 ret = smsc95xx_set_csums(udev, 0, 0);
622 debug("Failed to set csum offload: %d\n", ret);
625 smsc95xx_set_multicast(priv);
627 ret = smsc95xx_phy_initialize(udev, dev);
630 ret = smsc95xx_read_reg(udev, INT_EP_CTL, &read_buf);
634 /* enable PHY interrupts */
635 read_buf |= INT_EP_CTL_PHY_INT_;
637 ret = smsc95xx_write_reg(udev, INT_EP_CTL, read_buf);
641 smsc95xx_start_tx_path(udev, priv);
642 smsc95xx_start_rx_path(udev, priv);
646 link_detected = smsc95xx_mdio_read(udev, dev->phy_id, MII_BMSR)
648 if (!link_detected) {
650 printf("Waiting for Ethernet connection... ");
651 udelay(TIMEOUT_RESOLUTION * 1000);
652 timeout += TIMEOUT_RESOLUTION;
654 } while (!link_detected && timeout < PHY_CONNECT_TIMEOUT);
659 printf("unable to connect.\n");
665 static int smsc95xx_send_common(struct ueth_data *dev, void *packet, int length)
671 ALLOC_CACHE_ALIGN_BUFFER(unsigned char, msg,
672 PKTSIZE + sizeof(tx_cmd_a) + sizeof(tx_cmd_b));
674 debug("** %s(), len %d, buf %#x\n", __func__, length,
675 (unsigned int)(ulong)msg);
676 if (length > PKTSIZE)
679 tx_cmd_a = (u32)length | TX_CMD_A_FIRST_SEG_ | TX_CMD_A_LAST_SEG_;
680 tx_cmd_b = (u32)length;
681 cpu_to_le32s(&tx_cmd_a);
682 cpu_to_le32s(&tx_cmd_b);
684 /* prepend cmd_a and cmd_b */
685 memcpy(msg, &tx_cmd_a, sizeof(tx_cmd_a));
686 memcpy(msg + sizeof(tx_cmd_a), &tx_cmd_b, sizeof(tx_cmd_b));
687 memcpy(msg + sizeof(tx_cmd_a) + sizeof(tx_cmd_b), (void *)packet,
689 err = usb_bulk_msg(dev->pusb_dev,
690 usb_sndbulkpipe(dev->pusb_dev, dev->ep_out),
692 length + sizeof(tx_cmd_a) + sizeof(tx_cmd_b),
694 USB_BULK_SEND_TIMEOUT);
695 debug("Tx: len = %u, actual = %u, err = %d\n",
696 (unsigned int)(length + sizeof(tx_cmd_a) + sizeof(tx_cmd_b)),
697 (unsigned int)actual_len, err);
702 static int smsc95xx_eth_start(struct udevice *dev)
704 struct usb_device *udev = dev_get_parent_priv(dev);
705 struct smsc95xx_private *priv = dev_get_priv(dev);
706 struct eth_pdata *pdata = dev_get_plat(dev);
708 /* Driver-model Ethernet ensures we have this */
709 priv->have_hwaddr = 1;
711 return smsc95xx_init_common(udev, &priv->ueth, priv, pdata->enetaddr);
714 void smsc95xx_eth_stop(struct udevice *dev)
716 debug("** %s()\n", __func__);
719 int smsc95xx_eth_send(struct udevice *dev, void *packet, int length)
721 struct smsc95xx_private *priv = dev_get_priv(dev);
723 return smsc95xx_send_common(&priv->ueth, packet, length);
726 int smsc95xx_eth_recv(struct udevice *dev, int flags, uchar **packetp)
728 struct smsc95xx_private *priv = dev_get_priv(dev);
729 struct ueth_data *ueth = &priv->ueth;
734 len = usb_ether_get_rx_bytes(ueth, &ptr);
735 debug("%s: first try, len=%d\n", __func__, len);
737 if (!(flags & ETH_RECV_CHECK_DEVICE))
739 ret = usb_ether_receive(ueth, RX_URB_SIZE);
743 len = usb_ether_get_rx_bytes(ueth, &ptr);
744 debug("%s: second try, len=%d\n", __func__, len);
748 * 1st 4 bytes contain the length of the actual data plus error info.
749 * Extract data length.
751 if (len < sizeof(packet_len)) {
752 debug("Rx: incomplete packet length\n");
755 memcpy(&packet_len, ptr, sizeof(packet_len));
756 le32_to_cpus(&packet_len);
757 if (packet_len & RX_STS_ES_) {
758 debug("Rx: Error header=%#x", packet_len);
761 packet_len = ((packet_len & RX_STS_FL_) >> 16);
763 if (packet_len > len - sizeof(packet_len)) {
764 debug("Rx: too large packet: %d\n", packet_len);
768 *packetp = ptr + sizeof(packet_len);
769 return packet_len - 4;
772 usb_ether_advance_rxbuf(ueth, -1);
776 static int smsc95xx_free_pkt(struct udevice *dev, uchar *packet, int packet_len)
778 struct smsc95xx_private *priv = dev_get_priv(dev);
780 packet_len = ALIGN(packet_len + sizeof(u32), 4);
781 usb_ether_advance_rxbuf(&priv->ueth, sizeof(u32) + packet_len);
786 int smsc95xx_write_hwaddr(struct udevice *dev)
788 struct usb_device *udev = dev_get_parent_priv(dev);
789 struct eth_pdata *pdata = dev_get_plat(dev);
790 struct smsc95xx_private *priv = dev_get_priv(dev);
792 return smsc95xx_write_hwaddr_common(udev, priv, pdata->enetaddr);
795 int smsc95xx_read_rom_hwaddr(struct udevice *dev)
797 struct usb_device *udev = dev_get_parent_priv(dev);
798 struct eth_pdata *pdata = dev_get_plat(dev);
801 ret = smsc95xx_init_mac_address(pdata->enetaddr, udev);
803 memset(pdata->enetaddr, 0, 6);
808 static int smsc95xx_eth_probe(struct udevice *dev)
810 struct smsc95xx_private *priv = dev_get_priv(dev);
811 struct ueth_data *ueth = &priv->ueth;
813 return usb_ether_register(dev, ueth, RX_URB_SIZE);
816 static const struct eth_ops smsc95xx_eth_ops = {
817 .start = smsc95xx_eth_start,
818 .send = smsc95xx_eth_send,
819 .recv = smsc95xx_eth_recv,
820 .free_pkt = smsc95xx_free_pkt,
821 .stop = smsc95xx_eth_stop,
822 .write_hwaddr = smsc95xx_write_hwaddr,
823 .read_rom_hwaddr = smsc95xx_read_rom_hwaddr,
826 U_BOOT_DRIVER(smsc95xx_eth) = {
827 .name = "smsc95xx_eth",
829 .probe = smsc95xx_eth_probe,
830 .ops = &smsc95xx_eth_ops,
831 .priv_auto = sizeof(struct smsc95xx_private),
832 .plat_auto = sizeof(struct eth_pdata),
835 static const struct usb_device_id smsc95xx_eth_id_table[] = {
836 { USB_DEVICE(0x05ac, 0x1402) },
837 { USB_DEVICE(0x0424, 0xec00) }, /* LAN9512/LAN9514 Ethernet */
838 { USB_DEVICE(0x0424, 0x9500) }, /* LAN9500 Ethernet */
839 { USB_DEVICE(0x0424, 0x9730) }, /* LAN9730 Ethernet (HSIC) */
840 { USB_DEVICE(0x0424, 0x9900) }, /* SMSC9500 USB Ethernet (SAL10) */
841 { USB_DEVICE(0x0424, 0x9e00) }, /* LAN9500A Ethernet */
842 { } /* Terminating entry */
845 U_BOOT_USB_DEVICE(smsc95xx_eth, smsc95xx_eth_id_table);