Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758715AbcDAOiM (ORCPT ); Fri, 1 Apr 2016 10:38:12 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:38489 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751587AbcDAOiK (ORCPT ); Fri, 1 Apr 2016 10:38:10 -0400 Date: Fri, 1 Apr 2016 16:38:07 +0200 From: Pavel Machek To: Ruslan Bilovol Cc: Marek Szyprowski , pali.rohar@gmail.com, sre@kernel.org, kernel list , linux-arm-kernel , linux-omap , Tony Lindgren , khilman@kernel.org, aaro.koskinen@iki.fi, ivo.g.dimitrov.75@gmail.com, Patrik Bachan , serge@hallyn.com, Maxime Ripard , Peter Chen , Felipe Balbi Subject: Re: usb: gadget breakage on N900: bind UDC by name passed via usb_gadget_driver structure Message-ID: <20160401143807.GF11860@amd> References: <20160327202657.GA31059@amd> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2804 Lines: 73 Hi! > >> > Dmesg from the n900 is attached as /tmp/delme.gz. I did _not_ apply > >> > the patch from https://lkml.org/lkml/2016/3/24/670 , yet, as I'm using > >> > devicetree boot. > >> > >> Hmm.. don't see anything strange in the boot log related to USB, > >> I'll try your config > > > > Let me know how it went. > > I tried your config (with slight modifications) with vanilla kernel v4.5 > (modifications: cmdline changed to default; used INITRAMFS_SOURCE > for prebuilt cpio archive with rootfs) and Device Tree booting. > Works fine for me except I need to unplug-plug usb cable or issue > # echo connect > /sys/devices/platform/68000000.ocp/480ab000 > .usb_otg_hs/musb-hdrc.0.auto/udc/musb-hdrc.0.auto/soft_connect > to make connection. > The gadget driver successfully binds to the gadget, but I don't know > why the musb core doesn't issue pullup on USB lines during boot. Hmm, strange. Unplug/replug of the USB cable results in: <6>usb 1-5: new high-speed USB device number 100 using ehci-pci <3>usb 1-5: device descriptor read/64, error -32 tail: /proc/kmsg: file truncated <3>usb 1-5: device descriptor read/64, error -32 <3>usb 1-5: device descriptor read/64, error -32 <3>usb 1-5: device descriptor read/8, error -32 <3>usb 1-5: device descriptor read/8, error -32 <6>usb 1-5: new high-speed USB device number 103 using ehci-pci <3>usb 1-5: device descriptor read/8, error -32 <3>usb 1-5: device descriptor read/8, error -32 <3>usb usb1-port5: unable to enumerate USB device <6>usb 4-1: new full-speed USB device number 80 using uhci_hcd <3>usb 4-1: device descriptor read/64, error -32 <3>usb 4-1: device descriptor read/64, error -32 <6>usb 4-1: new full-speed USB device number 81 using uhci_hcd <3>usb 4-1: device descriptor read/64, error -32 <3>usb 4-1: device descriptor read/64, error -32 <3>usb usb4-port1: unable to enumerate USB device echo connect does not seem to do the trick, either: root@n900:~# echo connect > /sys/devices/platform/68000000.ocp/480ab000.usb_otg_hs/musb-hdrc.0.auto/udc/musb-hdrc.0.auto/soft_connect -bash: echo: write error: Operation not supported root@n900:~# uname -a Linux n900 4.4.0-omap3-149558-g5cf5ee5-dirty #168 PREEMPT Tue Mar 29 09:49:40 CEST 2016 armv7l GNU/Linux Hmm, documentation is not too helpful, either... What: /sys/class/udc//soft_connect Date: June 2011 KernelVersion: 3.1 Contact: Felipe Balbi Description: Allows users to disconnect data pullup resistors thus causing a logical disconnection from the USB Host. Dmesg says: [ 619.471374] udc musb-hdrc.0.auto: soft-connect without a gadget driver Any ideas? Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html