Port-arm archive

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

Re: beagle bone. uhub2: device problem, disabling port 2



On Sat, Mar 23, 2013 at 11:00 PM, Lloyd Parkes
<lloyd%must-have-coffee.gen.nz@localhost> wrote:
> I guess you are running dmesg and cu on a PC running NetBSD and you have 
> plugged the Beagle
> Bone in to the PC with a USB cable.

Exactly, Beagle Board runs Linux. Sorry for writing to the wrong maillist.
I just thought this would be good enough.

> Trying to connect to dtyU0 won't work unless dmesg tells you that a ucom 
> device has successfully
> attached because ucom is the driver that provides dtyU0. The Beagle Bone has 
> attached as ugen0
> which is the device driver that the NetBSD kernel uses when it has no idea 
> what the USB device
> actually is. This could be as simple as the NetBSD kernel missing a device 
> IDs needed to identify
> the Beagle Bone USB as a ucom device, or it could be as complicated as the 
> Beagle Bone having
> some special setup. It's possible that you need to do something to the Beagle 
> Bone to activate the
> serial console over the USB port.

> I've had a quick look at the BeagleBone reference manual and it seems that 
> the FTDI chip that
> provides the serial console over USB functionality also provides JTAG debug 
> access and that the
> FTDI chip might not be programmed to provide the serial console over USB by 
> default.

> The BeagleBone manual says that at some point they changed the FTDI device 
> IDs to 0x0403/0x6010.

On Linux I did the following

   modprobe ftdi_sio vendor=0x0403 product=0xa6d0

(http://downloads.angstrom-distribution.org/demo/beaglebone/)

0xA6D0 corresponds to NetBSD's "usbdevs -v" output.

> These new numbers are ones that the NetBSD kernel can use to register the 
> BeagleBone as a ucom
> device (which you want) rather than a ugen device (which you don't want). 
> Obviously your
> BeagleBone doesn't have these newer IDs set. The easiest fix is to recompile 
> your NetBSD
> kernel with the device IDs that your BeagleBone actually has. You will need 
> the vendor and product
> IDs from the BeagleBone, so run "usbdevs -v" on as rock while the BeagleBone 
> is plugged in and
> it will display two hexadecimal numbers for your BeagleBone. The vendor ID is 
> clearly labelled in
> the output from usbdevs and the product ID is the other hexadecimal number in 
> the output.
> Add the IDs to the obvious places in src/sys/dev/usb/usbdevs and then also to 
> sys/dev/usb/uftdi.c.
> Rebuild your kernel and boot it. With a bit of luck the BeagleBone will now 
> who up as ucom0 and
> dtyU0 will now work.

Thank you very much for clarification!
I've applied the attached patch (Is it ok?).

Now dmesg says (--> my marks)

uhub2 at uhub1 port 3: SMSC product 0x2412, class 9/0, rev 2.00/b.b2, addr 2
uhub2: single transaction translator
uhub2: 2 ports with 2 removable, self powered
uftdi0 at uhub2 port 1
uftdi0: FTDI BeagleBone, rev 2.00/7.00, addr 3
---> ucom0 at uftdi0 portno 1
---> ucom1 at uftdi0 portno 2
umass0 at uhub2 port 2 configuration 1 interface 0
umass0: Linux 3.2.34 with musb-hdrc Mass Storage Gadget, rev 2.00/0.00, addr 4
umass0: using SCSI over Bulk-Only
scsibus0 at umass0: 2 targets, 1 lun per target
sd0 at scsibus0 target 0 lun 0: <Linux, File-CD Gadget, 0316> disk removable
sd0: fabricating a geometry
sd0: 72261 KB, 70 cyl, 64 head, 32 sec, 512 bytes/sect x 144522 sectors
sd0: fabricating a geometry
---> uhub2: illegal enable change, port 2

But cu(1) still doesn't work.

asrock# cu -115200 -l /dev/dtyU0
Connected <hangs up here>

usbdevs(8) output is below:
Controller /dev/usb0:
addr 1: full speed, self powered, config 1, OHCI root hub(0x0000),
vendor 0x10de(0x10de), rev 1.00
 port 1 addr 2: low speed, power 500 mA, config 1, KVM-221(0x020f),
D-Link(0x2101), rev 0.01
 port 2 powered
 port 3 powered
 port 4 powered
 port 5 powered
 port 6 powered
Controller /dev/usb1:
addr 1: high speed, self powered, config 1, EHCI root hub(0x0000),
vendor 0x10de(0x10de), rev 1.00
 port 1 powered
 port 2 powered
 port 3 addr 2: high speed, self powered, config 1, product
0x2412(0x2412), SMSC(0x0424), rev b.b2
  port 1 addr 3: high speed, power 500 mA, config 1,
BeagleBone(0xa6d0), FTDI(0x0403), rev 7.00
  port 2 addr 4: high speed, self powered, config 1, Mass Storage
Gadget(0xa4a5), Linux 3.2.34 with musb-hdrc(0x0525), rev 0.00
 port 4 powered
 port 5 powered
 port 6 powered

Attachment: 1.patch
Description: Binary data



Home | Main Index | Thread Index | Old Index