All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] xhci USB controller driver for x86 board
@ 2016-11-09 16:51 Ding, ChiX
  2016-11-10  2:16 ` Kever Yang
  0 siblings, 1 reply; 4+ messages in thread
From: Ding, ChiX @ 2016-11-09 16:51 UTC (permalink / raw)
  To: u-boot

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" },

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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] xhci USB controller driver for x86 board
  2016-11-09 16:51 [U-Boot] xhci USB controller driver for x86 board Ding, ChiX
@ 2016-11-10  2:16 ` Kever Yang
  2016-11-10  6:21   ` Stefan Roese
  0 siblings, 1 reply; 4+ messages in thread
From: Kever Yang @ 2016-11-10  2:16 UTC (permalink / raw)
  To: u-boot

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
>
>
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] xhci USB controller driver for x86 board
  2016-11-10  2:16 ` Kever Yang
@ 2016-11-10  6:21   ` Stefan Roese
  2016-11-11 19:34     ` Marek Vasut
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Roese @ 2016-11-10  6:21 UTC (permalink / raw)
  To: u-boot

Hi Chi,

On 10.11.2016 03:16, Kever Yang wrote:
> 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.

Please take a look at this patch:

https://patchwork.ozlabs.org/patch/649489/

You do not need to change anything in the dts with this patch. Only
enable the correct Kconfig options for your board.

I've been able to enable xHCI support on BayTrail with this. But as
mentioned in the commit text, this still had some problems on my
board. Unfortunately I've not had the time to dig into it in the
meantime. It should be a good starting point for you. Perhaps it
even works for you out-of-the-box.

Marek, could you perhaps queue this patch for the next merge
window? It has a Reviewed-by from Simon.

Thanks,
Stefan

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] xhci USB controller driver for x86 board
  2016-11-10  6:21   ` Stefan Roese
@ 2016-11-11 19:34     ` Marek Vasut
  0 siblings, 0 replies; 4+ messages in thread
From: Marek Vasut @ 2016-11-11 19:34 UTC (permalink / raw)
  To: u-boot

On 11/10/2016 07:21 AM, Stefan Roese wrote:
> Hi Chi,
> 
> On 10.11.2016 03:16, Kever Yang wrote:
>> 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.
> 
> Please take a look at this patch:
> 
> https://patchwork.ozlabs.org/patch/649489/
> 
> You do not need to change anything in the dts with this patch. Only
> enable the correct Kconfig options for your board.
> 
> I've been able to enable xHCI support on BayTrail with this. But as
> mentioned in the commit text, this still had some problems on my
> board. Unfortunately I've not had the time to dig into it in the
> meantime. It should be a good starting point for you. Perhaps it
> even works for you out-of-the-box.
> 
> Marek, could you perhaps queue this patch for the next merge
> window? It has a Reviewed-by from Simon.

Sure, done.

-- 
Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-11-11 19:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-09 16:51 [U-Boot] xhci USB controller driver for x86 board Ding, ChiX
2016-11-10  2:16 ` Kever Yang
2016-11-10  6:21   ` Stefan Roese
2016-11-11 19:34     ` Marek Vasut

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.