Re: ehci_disown - Olimex ARM A20 Lime & USB FTDI RS-485 shuts down USB port

2016-05-14 Thread Neal Horman

On 5/12/16 7:00 AM, freebsd-usb-requ...@freebsd.org wrote:


ehci_disown() means that there should be a full speed controller that should
handle the device, because it is not high-speed. Does your board have
OHCI/UHCI or only EHCI? How are the USB parts wired. Is there a High-Speed TT
(USB HUB chip) connected to the EHCI port?

The A20 SoC has an OHCI controller but the ALLWINNER kernel is missing the
ohci driver. There is a patch for review here: https://reviews.freebsd.org/D5481

Cheers,
Jared


Jared:
Thanks for pointing me to the patch, that was very helpful.

All:
I can report that I was able to apply the D5481 patch to svn.head 
revision 298609 after changing the kernel conf A20 patched file name to 
ALLWINNER.

The kernel built without errors.
I installed the kernel, and the ohci driver appears to attach and 
work correctly with my FTDI devices.


Emanuel:
Overall, I'd like to see this committed because it appears to be 
functional.
Although, I wouldn't / don't expect to have to include the "device 
ohci" and "device generic_ohc" drivers for the kernel to work correctly 
on the platform.

It just doesn't make sense in my mind and doesn't feel right.

Thanks for the work that your doing on the Allwinner SOCs !

Regards
Neal Horman



smime.p7s
Description: S/MIME Cryptographic Signature


Re: ehci_disown - Olimex ARM A20 Lime & USB FTDI RS-485 shuts down USB port

2016-05-11 Thread Emmanuel Vadot
On Tue, 10 May 2016 17:03:36 -0500
Neal Horman  wrote:

> Hello,
>  Sorry for the cross post, but I'm not sure were this should land.
>  I posted on https://forums.freebsd.org/threads/56211/ and it was 
> suggested that I ask here.
> 
> 
>  I'm having problems trying to get my host to recognize a USB FTDI 
> RS-485 serial port on an Olimex ARM A20 Lime host.
> 
>  To be clear, this is not a "I need to connect to the host console 
> port" problem, that is done and works.
> 
>  I'm trying to use the RS-485 port to talk to Modbus devices with a 
> custom application.
> 
>  The FTDI device has been tested on other hosts, and it works.
>  When I use the same device on this host running Linux, it works 
> just fine.
> 
>  When I insert the FTDI RS-485 device (or any other FTDI or Prolific 
> serial device) into the FreeBSD host USB connector with 
> hw.usb.ehci.debug = 1 I get:
> 
>  ehci_roothub_exec: ehci after reset, status=0x1801
>  ehci_disown: index=1 lowspeed=0
> 
>  and then the port is unresponsive to any device plug events afterwards.
> 
>  I used svn.head -r 298609 and crochet w/ a derived version of 
> cubieboard2 board profile and the ALLWINNER kernel.
>  I've tried the Olimex DTBs that get built from that profile, but 
> the cubieboard2 DTB is the only one that gets me to a login prompt, 
> which isn't 100%, so I ran down the "build a DTB" road.
>  I've successfully created a DTB, using 
> gnu/dts/arm/sun7i-a20-olinuxino-lime.dts, but commenting out the usb otg 
> port (I won't be using that port anyway) vbus detect pin configuration 
> that causes the kernel to panic on boot, which gets me mmm... about 98% 
> I'd say of what I think is a correct DTB for this host platform.
> 
>  Can anybody clue me into what is happening when I plug in the USB 
> serial device, and how to deal with it ?
> 
> Any help with this would be appreciated !
>  Without any suggestions, I'm at the end of the road, and I'll have 
> to go back to Linux, which I'd rather not do.
> 
> 
> TIA, regards
> 
> Neal Horman

 As other said the OHCI support is currently in phab, I need to look
what's missing (if anything is missing) and commit it.
 For the DTS part you should be able to use the dts from
sys/gnu/dts/arm/sun7i-a20-olinuxino-lime2.dts without any problem.
 I don't have a lime2 myself but I've been using the a20-som-evb for
Allwinner dev for some times now.

-- 
Emmanuel Vadot
___
freebsd-usb@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"


Re: ehci_disown - Olimex ARM A20 Lime & USB FTDI RS-485 shuts down USB port

2016-05-10 Thread Hans Petter Selasky

Hi,

ehci_disown() means that there should be a full speed controller that 
should handle the device, because it is not high-speed. Does your board 
have OHCI/UHCI or only EHCI? How are the USB parts wired. Is there a 
High-Speed TT (USB HUB chip) connected to the EHCI port?


Can you compare dmesg from Linux and FreeBSD and look for the USB parts.

--HPS
___
freebsd-usb@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"