From patchwork Thu Jul 11 17:57:19 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 2826567 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 17829C0AB2 for ; Thu, 11 Jul 2013 17:58:05 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CD4A0201D6 for ; Thu, 11 Jul 2013 17:58:03 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 03AD3201CC for ; Thu, 11 Jul 2013 17:58:02 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UxL7u-00012k-2u; Thu, 11 Jul 2013 17:57:58 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UxL7r-0006fy-Pw; Thu, 11 Jul 2013 17:57:55 +0000 Received: from mail-out.m-online.net ([212.18.0.10]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UxL7o-0006fF-7C for linux-arm-kernel@lists.infradead.org; Thu, 11 Jul 2013 17:57:53 +0000 Received: from frontend1.mail.m-online.net (frontend1.mail.intern.m-online.net [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id 3brlN15lsRz3hhTB; Thu, 11 Jul 2013 19:57:21 +0200 (CEST) X-Auth-Info: JqpGyrEf8F2AYfAhwiS8j/kp8xbC9NAyA670Uw9b1KI= Received: from mashiro.localnet (unknown [195.140.253.167]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp-auth.mnet-online.de (Postfix) with ESMTPSA id 3brlN13KBzzbbg9; Thu, 11 Jul 2013 19:57:21 +0200 (CEST) From: Marek Vasut To: Peter Chen Subject: Re: [PATCH v12 00/13] Add tested id switch and vbus connect detect support for Chipidea Date: Thu, 11 Jul 2013 19:57:19 +0200 User-Agent: KMail/1.13.7 (Linux/3.9-1-amd64; KDE/4.8.4; x86_64; ; ) References: <1373524041-10482-1-git-send-email-peter.chen@freescale.com> In-Reply-To: <1373524041-10482-1-git-send-email-peter.chen@freescale.com> MIME-Version: 1.0 Message-Id: <201307111957.19537.marex@denx.de> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130711_135752_375895_3372759C X-CRM114-Status: GOOD ( 18.39 ) X-Spam-Score: -1.9 (-) Cc: m.grzeschik@pengutronix.de, frank.li@freescale.com, alexander.shishkin@linux.intel.com, gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, mkl@pengutronix.de, kernel@pengutronix.de, maxime.ripard@free-electrons.com, shawn.guo@linaro.org, festevam@gmail.com, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi Peter, > This patchset adds tested otg id switch function and > vbus connect and disconnect detection for chipidea driver. > And fix kinds of bugs found at chipidea drivers after enabling > id and vbus detection. > > This patch is fully tested at imx6 sabresd platform. > My chipidea repo: https://github.com/hzpeterchen/linux-usb.git > > Changes for v12: > - Rebased greg's usb-next tree (3.10.0-rc7+) > - Split more small patches for single function and fix. I tested the patchset. Here are the results: - VBUS switching I'm no longer getting any ID interrupts at all when I apply the patch below. The board stays in HOST mode all the time. If I configure it as peripheral, it works as peripheral. Note with [1], I was able to switch from Peripheral->Host , not the other way around. [1] http://git.pengutronix.de/?p=mgr/linux.git;a=shortlog;h=refs/heads/v3.10/topic/usb- peterchen Best regards, Marek Vasut --- a/arch/arm/boot/dts/imx28-m28evk.dts +++ b/arch/arm/boot/dts/imx28-m28evk.dts @@ -240,6 +240,8 @@ ahb@80080000 { usb0: usb@80080000 { + dr_mode = "otg"; + phy_mode = "utmi"; vbus-supply = <®_usb0_vbus>; pinctrl-names = "default"; pinctrl-0 = <&usbphy0_pins_a>; --------------------------- - MX23 UDC issue I found a workaround. Now running 'dmesg' via telnet through USB CDC link no longer hangs the USB driver, but works as expected. I applied this small patch that enables the streaming mode. Works on MX23EVK. It's surprising this issue doesn't manifest on MX28, maybe MX28 contains a new revision of the controller. I remember there was some discussion about the streaming mode on MXS some time ago. diff --git a/drivers/usb/chipidea/ci_hdrc_imx.c b/drivers/usb/chipidea/ci_hdrc_imx.c index d06355e..bba8e25 100644 --- a/drivers/usb/chipidea/ci_hdrc_imx.c +++ b/drivers/usb/chipidea/ci_hdrc_imx.c @@ -92,8 +92,7 @@ static int ci_hdrc_imx_probe(struct platform_device *pdev) .name = "ci_hdrc_imx", .capoffset = DEF_CAPOFFSET, .flags = CI_HDRC_REQUIRE_TRANSCEIVER | - CI_HDRC_PULLUP_ON_VBUS | - CI_HDRC_DISABLE_STREAMING, + CI_HDRC_PULLUP_ON_VBUS, }; struct resource *res; int ret;