From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tony Lindgren Subject: Re: Nokia N900: musb is in wrong state after boot Date: Tue, 19 Jan 2016 12:33:15 -0800 Message-ID: <20160119203314.GE19432@atomide.com> References: <201601091616.04193@pali> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Content-Disposition: inline In-Reply-To: <201601091616.04193@pali> Sender: linux-usb-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Pali =?utf-8?B?Um9ow6Fy?= Cc: Felipe Balbi , Greg Kroah-Hartman , linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Ivaylo Dimitrov , Sebastian Reichel , Aaro Koskinen , Pavel Machek , Nishanth Menon List-Id: linux-omap@vger.kernel.org Hi, * Pali Roh=C3=A1r [160109 07:16]: > Hello, >=20 > when I boot 4.4.0-rc7+ kernel compiled with g_nokia into zImage on No= kia=20 > N900 into userspace then usb gadget (g_nokia) does not work. Notebook= ,=20 > connected on other side does not see any usb device... Connecting and= =20 > disconnecting cable does not change anything, still not work. >=20 > But if I run this command > $ echo peripheral > /sys/bus/platform/devices/musb-hdrc.0.auto/mode=20 =00 >=20 > then gadget starts working. Other side see usb device and can use it.= =20 > Also connecting and disconnecting usb cable working fine. After=20 > connecting it again, usb device OK. N900 had the PHY interrupt wired to the bq chip instead of twl4030, rig= ht? 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 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html