public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Kever Yang <kever.yang@rock-chips.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] xhci USB controller driver for x86 board
Date: Thu, 10 Nov 2016 10:16:50 +0800	[thread overview]
Message-ID: <5823D892.6090107@rock-chips.com> (raw)
In-Reply-To: <FBBD98403E9C0B4AA00BFB8657163F851A4BCCB2@IRSMSX108.ger.corp.intel.com>

Hi Chi,

On 11/10/2016 12:51 AM, Ding, ChiX wrote:
> Hi there
> I'm having problem getting USB 3.0 controller working properly on the Intel Denverton x86 board.
> First I tried to use xhci driver, but there doesn't seem to be any xhci driver or generic driver for x86
> I only found the following
> xhci-exynos5.c:   { .compatible = "samsung,exynos5250-xhci" },
> xhci-mvebu.c:     { .compatible = "marvell,armada3700-xhci" },
> xhci-rockchip.c:  { .compatible = "rockchip,rk3399-xhci" },

The xhci.c and xhci-dwc3.c in U-Boot is generic driver, but you may need 
one driver for x86,
this is very like what kernel did, so you can reference to how kernel 
enable the x86 dwc3.

Thanks,
- Kever
> Then I tried to use ehci driver, as there is generic driver for ehci-pci
> ehci-pci.c:     { .compatible = "ehci-pci" },
>
> I added the section into device tree file
>                  usb_0: usb at 15,0 {
>                          reg = <0x0000a800 0 0 0 0>;
>                          compatible = "ehci-pci";
>                  };
>
> When I run "usb start", U-boot is able to find the controller, but doesn't detect the usb keyboard or
> Pendrive which are plugged to the USB ports.
>
> => 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
>
> I see the following in the log. It doesn't find child devices when scanning.
> scanning bus 0 for devices...
> Calling usb_setup_device(), portnr=0
> usb_control_msg: request: 0x6, requesttype: 0x80, value 0x100 index 0x0 length 0x40
> ehci_submit_control_msg: dev='usb at 15,0', udev=7f4ef080, udev->dev='usb at 15,0', portnr=0
> req=6 (0x6), type=128 (0x80), value=256, index=0
> USB_DT_DEVICE request
> set address 1
> usb_control_msg: request: 0x5, requesttype: 0x0, value 0x1 index 0x0 length 0x0
> ehci_submit_control_msg: dev='usb at 15,0', udev=7f4ef080, udev->dev='usb at 15,0', portnr=0
> req=5 (0x5), type=0 (0x0), value=1, index=0
> USB_REQ_SET_ADDRESS
> Len is 0
> usb_control_msg: request: 0x6, requesttype: 0x80, value 0x100 index 0x0 length 0x12
> ehci_submit_control_msg: dev='usb at 15,0', udev=7f4ef080, udev->dev='usb at 15,0', portnr=0
> req=6 (0x6), type=128 (0x80), value=256, index=0
> USB_DT_DEVICE request
> usb_control_msg: request: 0x6, requesttype: 0x80, value 0x200 index 0x0 length 0x9
> ehci_submit_control_msg: dev='usb at 15,0', udev=7f4ef080, udev->dev='usb at 15,0', portnr=0
> req=6 (0x6), type=128 (0x80), value=512, index=0
> USB_DT_CONFIG config
> usb_control_msg: request: 0x6, requesttype: 0x80, value 0x200 index 0x0 length 0x19
> ehci_submit_control_msg: dev='usb at 15,0', udev=7f4ef080, udev->dev='usb at 15,0', portnr=0
> req=6 (0x6), type=128 (0x80), value=512, index=0
> USB_DT_CONFIG config
> get_conf_no 0 Result 25, wLength 25
> if 0, ep 0
> ##EP epmaxpacketin[1] = 8
> set configuration 1
> usb_control_msg: request: 0x9, requesttype: 0x0, value 0x1 index 0x0 length 0x0
> ehci_submit_control_msg: dev='usb at 15,0', udev=7f4ef080, udev->dev='usb at 15,0', portnr=0
> req=9 (0x9), type=0 (0x0), value=1, index=0
> USB_REQ_SET_CONFIGURATION
> Len is 0
> new device strings: Mfr=1, Product=2, SerialNumber=0
> usb_control_msg: request: 0x6, requesttype: 0x80, value 0x300 index 0x0 length 0xFF
> ehci_submit_control_msg: dev='usb at 15,0', udev=7f4ef080, udev->dev='usb at 15,0', portnr=0
> req=6 (0x6), type=128 (0x80), value=768, index=0
> USB_DT_STRING config
> USB device number 1 default language ID 0x1
> usb_control_msg: request: 0x6, requesttype: 0x80, value 0x301 index 0x1 length 0xFF
> ehci_submit_control_msg: dev='usb at 15,0', udev=7f4ef080, udev->dev='usb at 15,0', portnr=0
> req=6 (0x6), type=128 (0x80), value=769, index=1
> USB_DT_STRING config
> usb_control_msg: request: 0x6, requesttype: 0x80, value 0x302 index 0x1 length 0xFF
> ehci_submit_control_msg: dev='usb at 15,0', udev=7f4ef080, udev->dev='usb at 15,0', portnr=0
> req=6 (0x6), type=128 (0x80), value=770, index=1
> USB_DT_STRING config
> Manufacturer u-boot
> Product      EHCI Host Controller
> SerialNumber
> read_descriptor for 'usb at 15,0': ret=0
> ** usb_find_child returns -2
> usb_find_and_bind_driver: Searching for driver
> Bound device usb_hub to usb at 15,0
> usb_find_and_bind_driver: Match found: usb_hub
> usb_scan_device: Probing 'usb_hub', plat=7f4f53c0
> uclass_find_device_by_seq: 0 -1
> uclass_find_device_by_seq: 0 0
>     - -1 -1
>     - not found
> usb_hub_post_probe
> usb_control_msg: request: 0x6, requesttype: 0xA0, value 0x2900 index 0x0 length 0x4
> ehci_submit_control_msg: dev='usb at 15,0', udev=7f4f5400, udev->dev='usb_hub', portnr=0
> req=6 (0x6), type=160 (0xa0), value=10496, index=0
> USB_DT_HUB config
> usb_control_msg: request: 0x6, requesttype: 0xA0, value 0x2900 index 0x0 length 0x8
> ehci_submit_control_msg: dev='usb at 15,0', udev=7f4f5400, udev->dev='usb_hub', portnr=0
> req=6 (0x6), type=160 (0xa0), value=10496, index=0
> USB_DT_HUB config
> 0 ports detected
>
>
> I wonder if this is caused by using ehci driver on xhci controller? And currently is there xhci controller
> Driver for x86 based board?
>
> Thanks a lot,
> Chi
> --------------------------------------------------------------
> Intel Research and Development Ireland Limited
> Registered in Ireland
> Registered Office: Collinstown Industrial Park, Leixlip, County Kildare
> Registered Number: 308263
>
>
> This e-mail and any attachments may contain confidential material for the sole
> use of the intended recipient(s). Any review or distribution by others is
> strictly prohibited. If you are not the intended recipient, please contact the
> sender and delete all copies.
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>
>
>

  reply	other threads:[~2016-11-10  2:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-09 16:51 [U-Boot] xhci USB controller driver for x86 board Ding, ChiX
2016-11-10  2:16 ` Kever Yang [this message]
2016-11-10  6:21   ` Stefan Roese
2016-11-11 19:34     ` Marek Vasut

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5823D892.6090107@rock-chips.com \
    --to=kever.yang@rock-chips.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox