Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Mar 2019 15:43:22 +0100
From:      Hans Petter Selasky <hps@selasky.org>
To:        Per Hedeland <per@hedeland.org>, freebsd-arm@freebsd.org
Cc:        freebsd-questions@freebsd.org
Subject:   Re: How to force host mode for RPi Zero USB?
Message-ID:  <cdc665f0-ed2b-a8d8-3538-f4014b057920@selasky.org>
In-Reply-To: <222dd329-e0d5-31ad-512a-898040c44c1c@hedeland.org>
References:  <222dd329-e0d5-31ad-512a-898040c44c1c@hedeland.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 3/28/19 1:50 PM, Per Hedeland wrote:
> Hi,
> 
> I have a 4-port USB hub that attaches directly to the RPi Zero board:
> http://www.uugear.com/product/zero4u/ . This seems to work fine on
> FreeBSD - as long as I have an OTG adapter/cable connected to the then
> otherwise unused data port on the Zero, which is a quite annoying
> requirement IMHO. Without it, the FreeBSD USB stack uses device mode
> (as described in the handbook), and (of course) doesn't even see the
> add-on hub.
> 
> According to the hub documentation
> (http://www.uugear.com/doc/Zero4U_UserManual.pdf), "Linux" uses host
> mode by default, and requries a DT overlay to use device mode. The
> FreeBSD automatic switching is arguably more elegant, but is IMHO
> inferior in a case like this (it's of course also impossible to make
> any USB devices work when connected to the Zero data port *without* an
> OTG adapter/cable).
> 
> So, as $SUBJECT - surely there is a way to force host mode?
> 

Hi,

You can add a "dr_mode" property to the DWC OTG driver instance and set 
it to "host".

--HPS



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?cdc665f0-ed2b-a8d8-3538-f4014b057920>