Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 May 2016 08:22:07 +0200
From:      Emmanuel Vadot <manu@bidouilliste.com>
To:        Neal Horman <neal@wanlink.com>
Cc:        freebsd-usb@freebsd.org, freebsd-arm@freebsd.org
Subject:   Re: ehci_disown - Olimex ARM A20 Lime & USB FTDI RS-485 shuts down USB port
Message-ID:  <20160512082207.eb5d6f4f51e65262f9a35246@bidouilliste.com>
In-Reply-To: <57325AB8.9010108@wanlink.com>
References:  <57325AB8.9010108@wanlink.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 10 May 2016 17:03:36 -0500
Neal Horman <neal@wanlink.com> 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=0x00001801
>          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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160512082207.eb5d6f4f51e65262f9a35246>