RE: linux USB dwc3 not working

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Felipe, 

See responses below. 

> -----Original Message-----
> From: Felipe Balbi [mailto:felipe.balbi@xxxxxxxxxxxxxxx]
> Sent: Tuesday, January 31, 2017 5:10 AM
> To: PURCELL,ANDY (K-Loveland,ex1) <andy_purcell@xxxxxxxxxxxx>; linux-
> usb@xxxxxxxxxxxxxxx
> Subject: Re: linux USB dwc3 not working
> 
> 
> Hi Andy,
> 
> andy_purcell@xxxxxxxxxxxx writes:
> > Hello,
> >
> > I am starting work on a board that has the Intel Skylake chipset,
> > which has hardware for doing USB-device.
> 
> Not all SKLs have dwc3 enabled. Can you provide the output of lspci?

00:00.0 Host bridge: Intel Corporation Sky Lake Host Bridge/DRAM Registers (rev 07)
00:01.0 PCI bridge: Intel Corporation Sky Lake PCIe Controller (x16) (rev 07)
00:02.0 VGA compatible controller: Intel Corporation Sky Lake Integrated Graphics (rev 06)
00:08.0 System peripheral: Intel Corporation Sky Lake Gaussian Mixture Model
00:14.0 USB controller: Intel Corporation Sunrise Point-H USB 3.0 xHCI Controller (rev 31)
00:14.1 USB controller: Intel Corporation Sunrise Point-H USB Device Controller (OTG) (rev 31)
00:14.2 Signal processing controller: Intel Corporation Sunrise Point-H Thermal subsystem (rev 31)
00:15.0 Signal processing controller: Intel Corporation Sunrise Point-H LPSS I2C Controller #0 (rev 31)
00:15.1 Signal processing controller: Intel Corporation Sunrise Point-H LPSS I2C Controller #1 (rev 31)
00:16.0 Communication controller: Intel Corporation Sunrise Point-H CSME HECI #1 (rev 31)
00:16.3 Serial controller: Intel Corporation Sunrise Point-H KT Redirection (rev 31)
00:17.0 SATA controller: Intel Corporation Sunrise Point-H SATA controller [AHCI mode] (rev 31)
00:1d.0 PCI bridge: Intel Corporation Sunrise Point-H PCI Express Root Port #11 (rev f1)
00:1d.3 PCI bridge: Intel Corporation Sunrise Point-H PCI Express Root Port #12 (rev f1)
00:1e.0 Signal processing controller: Intel Corporation Sunrise Point-H LPSS UART #0 (rev 31)
00:1f.0 ISA bridge: Intel Corporation Sunrise Point-H LPC Controller (rev 31)
00:1f.2 Memory controller: Intel Corporation Sunrise Point-H PMC (rev 31)
00:1f.3 Audio device: Intel Corporation Sunrise Point-H HD Audio (rev 31)
00:1f.4 SMBus: Intel Corporation Sunrise Point-H SMBus (rev 31)
00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (2) I219-LM (rev 31)
02:00.0 PCI bridge: PLX Technology, Inc. Device 3380 (rev ab)
03:02.0 PCI bridge: PLX Technology, Inc. Device 3380 (rev ab)

> 
> I need to ask you to try a newer kernel. Can you try v4.9.6 or v4.10-rc6?
> 

I am now running Ubuntu 4.10.0-999-generic. 
Same results - USB device not working, test modes still not working.  

> > Using a script, I set up the USB-device to be RNDIS, using functionfs.
> 
> functionfs needs a userspace component, do you have that? Can you try any
> other gadget driver like mass storage, for instance? Here's a quick script for
> mass storage:
> 
> #!/bin/sh
> 
> dd if=/dev/zero of=/dev/shm/file bs=1M count=1024
> 
> mount -t configfs none /c
> mkdir /c/usb_gadget/g1
> echo 0x18d1 > /c/usb_gadget/g1/idVendor
> echo 0xbeef > /c/usb_gadget/g1/idProduct mkdir
> /c/usb_gadget/g1/strings/0x409 echo 123456789012 >
> /c/usb_gadget/g1/strings/0x409/serialnumber
> echo "Intel Corporation" > /c/usb_gadget/g1/strings/0x409/manufacturer
> echo "Joule" > /c/usb_gadget/g1/strings/0x409/product
> mkdir /c/usb_gadget/g1/functions/mass_storage.1
> mkdir /c/usb_gadget/g1/configs/b.1
> mkdir /c/usb_gadget/g1/configs/b.1/strings/0x409
> echo 500 > /c/usb_gadget/g1/configs/b.1/MaxPower
> echo /dev/shm/file > /c/usb_gadget/g1/functions/mass_storage.1/lun.0/file
> ln -s /c/usb_gadget/g1/functions/mass_storage.1
> /c/usb_gadget/g1/configs/b.1/f1 echo dwc3.0.auto > /c/usb_gadget/g1/UDC
> 

I run this script, slightly modified, as you suggested. 
After running this script, I see these 2 lines added to the dmesg output: 
[   93.096773] Mass Storage Function, version: 2009/09/11
[   93.096777] LUN: removable file: (no medium)

> > I connect a USB cable from my board to a USB-host.
> > My USB analyzer shows nothing happens. No connection, no SETUP
> > packets, nothing.
> 
> right, I'm assuming you don't have userspace component for functionfs, so -
> >pullup() is never called.
> 

What is the userspace component for functionfs, given that I am setting up mass storage? 
How do I get it for Ubuntu 4.10.0-999-generic? 


> 
> Can you also get the output of:
> 
> grep DCTL regdump
> 

root@apub1:/sys/kernel/debug/dwc3.0.auto# grep DCTL regdump 
DCTL = 0x80f00000


> 
> --
> balbi
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux