From owner-freebsd-arm@freebsd.org Mon Jul 8 09:39:24 2019 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1180015D9448 for ; Mon, 8 Jul 2019 09:39:24 +0000 (UTC) (envelope-from freebsd-arm@dino.sk) Received: from mailhost.netlabit.sk (mailhost.netlabit.sk [84.245.65.72]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AEE3194705 for ; Mon, 8 Jul 2019 09:39:22 +0000 (UTC) (envelope-from freebsd-arm@dino.sk) Received: from zeta.dino.sk (fw3.dino.sk [84.245.95.254]) (AUTH: LOGIN milan) by mailhost.netlabit.sk with ESMTPA; Mon, 08 Jul 2019 11:39:18 +0200 id 00F40540.5D230F46.00008992 Date: Mon, 8 Jul 2019 11:39:18 +0200 From: Milan Obuch To: Mark Millard Cc: freebsd-arm@freebsd.org Subject: Re: Pine64 and USB bug Message-ID: <20190708113918.4b5b87cf@zeta.dino.sk> In-Reply-To: <74062CDB-825B-40B1-9D46-0212F932B681@yahoo.com> References: <20190707220812.78f98dd9@zeta.dino.sk> <74062CDB-825B-40B1-9D46-0212F932B681@yahoo.com> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; i386-portbld-freebsd11.2) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: AEE3194705 X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; spf=pass (mx1.freebsd.org: domain of freebsd-arm@dino.sk designates 84.245.65.72 as permitted sender) smtp.mailfrom=freebsd-arm@dino.sk X-Spamd-Result: default: False [-5.26 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[dino.sk]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[cached: mail.dino.sk]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[72.65.245.84.list.dnswl.org : 127.0.10.0]; NEURAL_HAM_SHORT(-0.54)[-0.538,0]; IP_SCORE(-2.41)[ip: (-7.32), ipnet: 84.245.64.0/18(-3.66), asn: 16160(-1.15), country: SK(0.07)]; FREEMAIL_TO(0.00)[yahoo.com]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:16160, ipnet:84.245.64.0/18, country:SK]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jul 2019 09:39:24 -0000 On Mon, 8 Jul 2019 01:03:43 -0700 Mark Millard wrote: > On 2019-Jul-7, at 13:08, Milan Obuch wrote: > > > Hi, > > > > on both Pine64 and Pine64-LTS I observed a problem with USB ports. > > Both board have two ports, lower one (nearer to PCB) works, but > > upper one does not. > > [ snip ] > > But, ss I remember, the 1-USB-port-usable status has been true > much longer than that . . . Looking . . . > > Head -r324563 is where ECHI was (re-)enabled on the lower port. > The note from -r323641 still applied back then: > > QUOTE: > This (plus 323640) re-enable OHCI on Pine64 on the bottom USB port. > The top USB port is routed to the OHCI0/EHCI0 which is by default in > OTG mode. While the phy code can handle the re-route to standard > OHCI/EHCI we still need a driver for musb to probe and configure it > in host mode. :END QUOTE > Thanks, Mark, this explains why... The question is, what could be done to fix it. By the way, in /boot/loader.conf, there are lines # Configure USB OTG; see usb_template(4). hw.usb.template=3 Looking in man page, this is for USB device... and as (for Pine64-LTS case at least) there are just two USB type A connectors, i. e. only for host controllers. For device side there should be other connector type. Any comments? And looking for musb, there seems to be just one implementation in current src tree, for TI's am335x. So for Allwinner's SoC we have nothing. Any hint? Could OHCI0/EHCI0 be switched from default OTG mode? Or is the musb driver for A64 the only way? Regards, Milan