From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933112AbcASUdV (ORCPT ); Tue, 19 Jan 2016 15:33:21 -0500 Received: from muru.com ([72.249.23.125]:56214 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932734AbcASUdS convert rfc822-to-8bit (ORCPT ); Tue, 19 Jan 2016 15:33:18 -0500 Date: Tue, 19 Jan 2016 12:33:15 -0800 From: Tony Lindgren To: Pali =?utf-8?B?Um9ow6Fy?= Cc: Felipe Balbi , Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, Ivaylo Dimitrov , Sebastian Reichel , Aaro Koskinen , Pavel Machek , Nishanth Menon Subject: Re: Nokia N900: musb is in wrong state after boot Message-ID: <20160119203314.GE19432@atomide.com> References: <201601091616.04193@pali> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8BIT In-Reply-To: <201601091616.04193@pali> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, * Pali Rohár [160109 07:16]: > Hello, > > when I boot 4.4.0-rc7+ kernel compiled with g_nokia into zImage on Nokia > N900 into userspace then usb gadget (g_nokia) does not work. Notebook, > connected on other side does not see any usb device... Connecting and > disconnecting cable does not change anything, still not work. > > But if I run this command > $ echo peripheral > /sys/bus/platform/devices/musb-hdrc.0.auto/mode > > then gadget starts working. Other side see usb device and can use it. > Also connecting and disconnecting usb cable working fine. After > connecting it again, usb device OK. N900 had the PHY interrupt wired to the bq chip instead of twl4030, right? You can fix this issue similar to phy-twl4030-usb.c. In function twl4030_phy_power_on() we call schedule_delayed_work() that checks the state of the ID pin on boot up. I think that's only needed for the i2c based PHY's with MUSB, with the others the USB driver has a better idea of the current state. Regards, Tony