From owner-freebsd-arm@FreeBSD.ORG Sat Mar 23 02:17:16 2013 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 51E6BDD2 for ; Sat, 23 Mar 2013 02:17:16 +0000 (UTC) (envelope-from ganbold@gmail.com) Received: from mail-ia0-x22c.google.com (mail-ia0-x22c.google.com [IPv6:2607:f8b0:4001:c02::22c]) by mx1.freebsd.org (Postfix) with ESMTP id 1D55596B for ; Sat, 23 Mar 2013 02:17:16 +0000 (UTC) Received: by mail-ia0-f172.google.com with SMTP id l29so4119377iag.31 for ; Fri, 22 Mar 2013 19:17:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=xrxNYcS7cG7MN0PR3Gp3qgW9oPBifLIAKFCnUExOmWA=; b=fT2j7uXzvswlTku+GrAYTFQvNyEeWSrApS1/pT2HwExKv+v0c/FWXMMHrQrc58JP+A zhD1lG84Y25iXi7eL2oOsJMM0/ODfVK7IO7D9zv5fx3O6kbaXFCR+V/rhQ/AZK8A2PuX 3ybGTlDE15MLogUQeGcoefcvPabenIjvnD/CzHL7B+ul7pG6x7NA2wxmNdwNwDmHByoV SZwLLHd74fn8o8sNXVJoNJO63eXn3+Ck+OLIErkvMFfC+vfOGIPNLyNqhCuUC/ro3Gws iSDLzSbzYLYnftusQ9Dg4zYy7D0qaf6xSVLzRpoeqD9dmTurHOkhgWohTUAA9IredkOs 7cVw== MIME-Version: 1.0 X-Received: by 10.50.6.202 with SMTP id d10mr2658077iga.28.1364005035748; Fri, 22 Mar 2013 19:17:15 -0700 (PDT) Received: by 10.64.6.230 with HTTP; Fri, 22 Mar 2013 19:17:15 -0700 (PDT) In-Reply-To: References: Date: Sat, 23 Mar 2013 10:17:15 +0800 Message-ID: Subject: Re: HACKBERRY USB problem From: Ganbold Tsagaankhuu To: Alexander Fedorov Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-arm@freebsd.org X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Mar 2013 02:17:16 -0000 On Sat, Mar 23, 2013 at 12:29 AM, Alexander Fedorov wrote: >> It seems like hackberry's usb2 gpio pin is different than cubieboard one. > > Yes, this is why I edit a10_ehci.c > >> Did you try to use 2 usb devices for both usb port same time? > > Hackberry has two external USB connectors in one package, and two not soldered > connectors. One on top, and one on bottom side of the board. I > soldered one (howto: > http://jas-hacks.blogspot.ru/2012/10/hackberry-a10-extra-usb-ports.html). > I think USB configuration looks like: > A10 USB1 -> GL850G (4-port HUB) -> upper port on external connector > and not soldered connectors. > A10 USB2 -> RTL8188CUS (WiFi chip) > And I assume, A10 USB0 OTG -> bottom port on external connector. I see. > > I tried to use all available ports: > root@:~ # usbconfig > ugen1.1: at usbus1, cfg=0 md=HOST spd=HIGH > (480Mbps) pwr=SAVE (0mA) > ugen0.1: at usbus0, cfg=0 md=HOST spd=HIGH > (480Mbps) pwr=SAVE (0mA) > ugen1.2: at usbus1, cfg=0 md=HOST spd=HIGH > (480Mbps) pwr=ON (500mA) > ugen0.2: at usbus0, cfg=0 md=HOST spd=HIGH > (480Mbps) pwr=SAVE (100mA) > ugen0.3: at usbus0, cfg=0 md=HOST > spd=HIGH (480Mbps) pwr=ON (500mA) > ugen0.4: at usbus0, cfg=0 md=HOST spd=LOW > (1.5Mbps) pwr=ON (100mA) > > As expected, all ports work, except USB0 OTG (bottom port on external > connector). Very cool. > >> Somehow I observed both works at boot time, but had some problem >> attaching after boot. >> > > No, I haven't this problem. All ports work correctly at boot and after. Ok, good. > >> I never managed to make usb0 work, since it supports both host and otg >> mode in cubieboard. >> As some docs say it is based on MentorGraphics USB-OTG IP and >> currently iirc we only have support of otg mode in musb. >> gonzo@ may be working on improving musb driver some time ago, so he >> maybe has better ideas. >> As for pins, probably right place would be the dts, where we should >> separate hackberry and cubieboard specific configs and make general >> config for sun4i's SoC. > > And/or, maybe do it something like it done for OMAP4: > sys/arm/ti/omap4/pandaboard/pandaboard.c Something like separating dts for boards the way linux does: https://github.com/mripard/linux/blob/sunxi-3.9-wip-wemac/arch/arm/boot/dts/sunxi.dtsi https://github.com/mripard/linux/blob/sunxi-3.9-wip-wemac/arch/arm/boot/dts/sun4i-a10.dtsi https://github.com/mripard/linux/blob/sunxi-3.9-wip-wemac/arch/arm/boot/dts/sun4i-a10-hackberry.dts https://github.com/mripard/linux/blob/sunxi-3.9-wip-wemac/arch/arm/boot/dts/sun4i-a10-cubieboard.dts And then maybe we should check just to make sure some of existing gpio handling in other SoC's dts like: sys/boot/fdt/dts/bcm2835-rpi-b.dts and, yes, usb_hub_init could be done based on corresponding dts. My thinking could be missing something or wrong, but I think other arm folks could also comment on that. thanks, Ganbold > >> >> Ganbold >> >> >> >>> >>> Alexander Fedorov >>> _______________________________________________ >>> freebsd-arm@freebsd.org mailing list >>> http://lists.freebsd.org/mailman/listinfo/freebsd-arm >>> To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org" > _______________________________________________ > freebsd-arm@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-arm > To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org"