From owner-freebsd-arm@freebsd.org Mon Jul 8 17:46:32 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 7C32015E4C08 for ; Mon, 8 Jul 2019 17:46:32 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic308-55.consmr.mail.gq1.yahoo.com (sonic308-55.consmr.mail.gq1.yahoo.com [98.137.68.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0EE9B82149 for ; Mon, 8 Jul 2019 17:46:30 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: YIwr5sgVM1nheqlvwIx9znvxpFUDkatgWLdbW3k3ngc4hEnEE0tkwxn9JAM53sF QwmBBrj9Z1wQ9ob_frfXKRq4.rBOgL4krfKVsN8PpS9lXK8MbofQTNatN19KUG_OdFWI4G00flAp gZy6wfeqwLEqcMoTOAuSOLKikk0qw.ITi19jaoBsc4AAvVkzpy0PYm9vxpFToIxMXYMmmXtxU914 _8RlAPdJWyDR2FfD_NinWk0X9B30JNblrJe9z6YuEQ2nmGMyWg6qfMuyUJvM_hDdPHunviIYnzE8 cYG9ya7JpF11SvIT_0rCYlN1lIGAVTL7V4vTFtXX9y0VInVZUydqV7A5nsEKcKCjIoXJlMWIsf1u XZ0WdXVgnpeDNONrztey20haIYTB0XjWHpmNQaKLIUN53msUlNfYOJ.10G1_AXG1PTmYnGf9_ZQy yJfE6x_hkDl0kRxFizUHqsRLHXkn4xNf1ZHgNJye9PHKs6xZhKoNrEp9CzuCAPYyKqS1zVbQwvje hFYxNeiDSQXelt8e1wsMgN5CoE9LYbJx4u50i5_1vRj8yRhmQclIUMYlm_.qQRjJHhhyvaE1lURn qJh7RgxBipOcu0MDG_kjZy65yozhVTVl6g3I3vDRLWymawRJJO1ocJCQv2EVwuose37MNYCe6Ulm Lubhge.gdQx1zxg6wWnL2feoLaxQbHfxR.ObrZIbxUiR.TYe7bx_1IYFxkd6puCceAr70ssgqxxM O1jRPl9GtChY2yGah4Nz5aeR7WFk065YvvU2WnNdtZ0VPv1T9S4lTjFM5IkK3rVr8LgpcvpjV0p9 tuy4lMOPlGOYyqIhisum7T5NlXuEpDAObLxytBPwLLqZSowflN0KH3Yqc25NNyJjBeXFL28zUFMg GbVe75VzfjAB4tlKpaYK6KpDKc9AHkasqsOQ2KcXdAqLqCiK7v.sXMomV.0A0qBAulnVHVDTljqC XE6LzdqH6cJJlipmnYLo3prgjT8ZRj1s4Mz0IPeXy4NUjeQwKolbQixD7inye7jzGq5SKnjCjYf5 GNW6o.ctzg_9wkmPjVO6X1vJobfyuRgTr4luTUfayEjYe_A0IwDtjpsA6RJVzFrXLQWnNRsLdjFr M7CBQD_UQzOpBYtpFUDudM4nPrTGsrZEpTP4m_RMiEtFwGGTgA.xcKjBZaN9h7gjVa.Dqve0Gq33 HzfqyDhCKVfsP9qvXrLkmfxTmpFwDpGRYGivr0tMZjTQnCH1.1qf4DXzRXJpGCQ-- Received: from sonic.gate.mail.ne1.yahoo.com by sonic308.consmr.mail.gq1.yahoo.com with HTTP; Mon, 8 Jul 2019 17:46:24 +0000 Received: by smtp405.mail.gq1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID dc893b8db21516530bd4193277ee882d; Mon, 08 Jul 2019 17:46:22 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: Pine64 and USB bug From: Mark Millard In-Reply-To: <20190708113918.4b5b87cf@zeta.dino.sk> Date: Mon, 8 Jul 2019 10:46:21 -0700 Cc: freebsd-arm@freebsd.org Content-Transfer-Encoding: 7bit Message-Id: <32BA5EF7-D708-419A-B86A-9D2584071E89@yahoo.com> References: <20190707220812.78f98dd9@zeta.dino.sk> <74062CDB-825B-40B1-9D46-0212F932B681@yahoo.com> <20190708113918.4b5b87cf@zeta.dino.sk> To: Milan Obuch X-Mailer: Apple Mail (2.3445.104.11) X-Rspamd-Queue-Id: 0EE9B82149 X-Spamd-Bar: ++ X-Spamd-Result: default: False [2.36 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; MV_CASE(0.50)[]; FREEMAIL_FROM(0.00)[yahoo.com]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[yahoo.com:+]; MX_GOOD(-0.01)[cached: mta6.am0.yahoodns.net]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/21, country:US]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; FROM_HAS_DN(0.00)[]; NEURAL_SPAM_SHORT(0.69)[0.695,0]; MIME_GOOD(-0.10)[text/plain]; IP_SCORE(1.09)[ip: (3.84), ipnet: 98.137.64.0/21(0.91), asn: 36647(0.73), country: US(-0.06)]; NEURAL_SPAM_MEDIUM(0.83)[0.828,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(0.26)[0.264,0]; RCVD_IN_DNSWL_NONE(0.00)[31.68.137.98.list.dnswl.org : 127.0.5.0] 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 17:46:32 -0000 On 2019-Jul-8, at 02:39, Milan Obuch wrote: > 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. I'm not a FreeBSD developer, so I've a rather limited view of the possibilities. > 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. The Pine64+ 2GB also externally has only 2 type A connectors (given the usual power connection's use anyway). But I'm not aware of OTG restricting the allowed connector types. In other words: I can not infer "host controller" from "type A connector". As far as I know OTG is valid for that type of connector, even if it might not be typical overall. > For device side there should be other connector > type. Any comments? See above. > 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? I take the original author's note that I quoted as accurate --but it is not a subject area where I'd be likely to notice an error if there was one. I've used a powered hub for the most part when I've used USB on the Pine64+ 2GB. But the extra equipment, space, etc. is not a problem for my context. === Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)