[U-Boot] [PATCH 2/2] usb: eth: add Realtek RTL8152B/RTL8153 driver

Anand Moon linux.amoon at gmail.com
Sat Nov 21 05:10:03 CET 2015


Hi All,

On 20 November 2015 at 23:08, Marek Vasut <marex at denx.de> wrote:

> On Friday, November 20, 2015 at 06:35:41 PM, Simon Glass wrote:
> > Hi,
>
> Hi,
>
> > On 19 November 2015 at 06:12, Marek Vasut <marex at denx.de> wrote:
> > > On Thursday, November 19, 2015 at 01:49:16 PM, Anand Moon wrote:
> > >> Hi Marek,
> > >
> > > Hi!
> > >
> > > [...]
> > >
> > >> Sorry for the mess: Please accept my apology, I will not in the
> future.
> > >
> > > Cool, thanks! :)
> >
> > This driver should use driver model, right?
>
> Of course.
>
> Best regards,
> Marek Vasut
>

​I have just patch the driver and enable the driver.

diff --git a/include/configs/exynos5-common.h
b/include/configs/exynos5-common.h
index 4866836..7ff277f 100644
--- a/include/configs/exynos5-common.h
+++ b/include/configs/exynos5-common.h
@@ -174,6 +174,9 @@
 #define CONFIG_USB_HOST_ETHER
 #define CONFIG_USB_ETHER_ASIX
 #define CONFIG_USB_ETHER_SMSC95XX
+/* support Realtek RTL8152B/RTL8153 driver */
+#define CONFIG_USB_ETHER_RTL8152
+#define CONFIG_USB_ETHER_ASIX88179

 /* USB boot mode */
 #define CONFIG_USB_BOOTING
--------------------------------------
After doing 'usb start' and 'usb reset'

I have tested with ASIX88179 USB 3.0 Ethernet cable and the u-boot
successfully detected the device.
My fried also tested with RTL8152 USB 3.0 Ethernet cable and the u-boot
successfully detected the device.
But with this driver I am not able to detect the Ethernet USB3.0 RT8153-VB
connected to the OdroidXU4 board.

Below is the console log of u-boot.
--------------------------------------
​

​U-Boot 2015.10-25167-g439fcb9-dirty (Nov 21 2015 - 14:27:19 +1030) for
ODROID-XU3

CPU:   Exynos5422 @ 800 MHz
Model: Odroid XU3 based on EXYNOS5422
Board: Odroid XU3 based on EXYNOS5422
Type:  xu4
DRAM:  2 GiB
__of_translate_address: Bad cell count for gpx0
MMC:   EXYNOS DWMMC: 0, EXYNOS DWMMC: 1
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   No ethernet found.
Hit any key to stop autoboot:  0
ODROID-XU3 #
ODROID-XU3 #
ODROID-XU3 #
ODROID-XU3 # setenv ethaddr 00:10:75:2A:AE:E0
ODROID-XU3 # setenv gatewayip 10.0.0.1
ODROID-XU3 # setenv serverip 10.0.0.102
ODROID-XU3 # usb start
starting USB...
USB0:   USB EHCI 1.00
USB1:   Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1.00
USB2:   Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1.00
scanning bus 0 for devices... 1 USB Device(s) found
scanning bus 1 for devices... 2 USB Device(s) found
scanning bus 2 for devices... 2 USB Device(s) found
       scanning usb for ethernet devices...

USB Ethernet device detected: 0xbda:0x8153
Endpoints In 1 Out 2 Int 3
Setup ERROR: address device command for slot 1.
Unknown version 0x7cf0
Unknown Device
0 Ethernet Device(s) found
ODROID-XU3 # usb reset
resetting USB...
USB0:   USB EHCI 1.00
USB1:   Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1.00
USB2:   Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1.00
scanning bus 0 for devices... 1 USB Device(s) found
scanning bus 1 for devices... 2 USB Device(s) found
scanning bus 2 for devices... 2 USB Device(s) found
       scanning usb for ethernet devices...

USB Ethernet device detected: 0xbda:0x8153
Endpoints In 1 Out 2 Int 3
Setup ERROR: address device command for slot 1.
Unknown version 0x7cf0
Unknown Device
0 Ethernet Device(s) found
ODROID-XU3 # usb info
1: Hub,  USB Revision 2.0
 - u-boot EHCI Host Controller
 - Class: Hub
 - PacketSize: 64  Configurations: 1
 - Vendor: 0x0000  Product 0x0000 Version 1.0
   Configuration: 1
   - Interfaces: 1 Self Powered 0mA
     Interface: 0
     - Alternate Setting 0, Endpoints: 1
     - Class Hub
     - Endpoint 1 In Interrupt MaxPacket 8 Interval 255ms

1: Hub,  USB Revision 3.0
 - U-Boot XHCI Host Controller
 - Class: Hub
 - PacketSize: 9  Configurations: 1
 - Vendor: 0x0000  Product 0x0000 Version 1.0
   Configuration: 1
   - Interfaces: 1 Self Powered 0mA
     Interface: 0
     - Alternate Setting 0, Endpoints: 1
     - Class Hub
     - Endpoint 1 In Interrupt MaxPacket 8 Interval 255ms

2: Hub,  USB Revision 2.0
 - GenesysLogic USB2.0 Hub
 - Class: Hub
 - PacketSize: 64  Configurations: 1
 - Vendor: 0x05e3  Product 0x0610 Version 146.34
   Configuration: 1
   - Interfaces: 1 Self Powered Remote Wakeup 100mA
     Interface: 0
     - Alternate Setting 0, Endpoints: 1
     - Class Hub
     - Endpoint 1 In Interrupt MaxPacket 1 Interval 12ms
     - Endpoint 1 In Interrupt MaxPacket 1 Interval 12ms

1: Hub,  USB Revision 3.0
 - U-Boot XHCI Host Controller
 - Class: Hub
 - PacketSize: 9  Configurations: 1
 - Vendor: 0x0000  Product 0x0000 Version 1.0
   Configuration: 1
   - Interfaces: 1 Self Powered 0mA
     Interface: 0
     - Alternate Setting 0, Endpoints: 1
     - Class Hub
     - Endpoint 1 In Interrupt MaxPacket 8 Interval 255ms

2: Vendor specific,  USB Revision 2.10
 - Realtek USB 10/100/1000 LAN 000001000000
 - Class: (from Interface) Vendor specific
 - PacketSize: 64  Configurations: 2
 - Vendor: 0x0bda  Product 0x8153 Version 48.0
   Configuration: 1
   - Interfaces: 1 Bus Powered Remote Wakeup 180mA
     Interface: 0
     - Alternate Setting 0, Endpoints: 3
     - Class Vendor specific
     - Endpoint 1 In Bulk MaxPacket 512
     - Endpoint 2 Out Bulk MaxPacket 512
     - Endpoint 3 In Interrupt MaxPacket 2 Interval 8ms

ODROID-XU3 #
ODROID-XU3 # dhcp
No ethernet found.
ODROID-XU3 #

---------------------------------------
Please let me know if I am doing some thing wrong.

-Anand Moon​


More information about the U-Boot mailing list