From patchwork Wed Aug 8 21:30:51 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 1297941 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 47A12DF223 for ; Wed, 8 Aug 2012 21:37:05 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1SzDtJ-0003tB-NQ; Wed, 08 Aug 2012 21:34:10 +0000 Received: from mail-ob0-f177.google.com ([209.85.214.177]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1SzDtD-0003ox-61 for linux-arm-kernel@lists.infradead.org; Wed, 08 Aug 2012 21:34:04 +0000 Received: by obbta17 with SMTP id ta17so1781135obb.36 for ; Wed, 08 Aug 2012 14:34:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=qS9C9L+44qURXvAvwt1r7HeonJ2MDOcgHbQNkbvsg1c=; b=pqwWH4bhnVqyDm4wLl37HqhDDJVN/zTPmzyj5bKL9kwYH9MAvdGhcLJE0DyMo+iP/+ K10P/Uxp7bJSkyMYiiXistdLgDXrzIwCh7jzOYYKmZN96CMhqohIKyg5nRzQcsk8iZ4p QGRKNAXg0E4Z/TXRQvAEixew1RbGJFcjSZdD+iK4F8LxILWRzVS7ow4bV5w3VgtXJgLJ p8OlVP99FoOTDzSTM9fkZdXpqfhPe1cREbuRifRJJycyfgbuHB/VnDfboUK8C1WvOCa0 fA5bLLXLH3EZI0xEbI4JiTxspta4rhYlSgK1pTdN0yOYJlY+hKaT+1XjUddu16BJKikI Sbgg== MIME-Version: 1.0 Received: by 10.182.16.3 with SMTP id b3mr1919243obd.72.1344461451296; Wed, 08 Aug 2012 14:30:51 -0700 (PDT) Received: by 10.76.7.113 with HTTP; Wed, 8 Aug 2012 14:30:51 -0700 (PDT) Date: Wed, 8 Aug 2012 18:30:51 -0300 Message-ID: Subject: USB host on mx23-olinuxino From: Fabio Estevam To: Richard Zhao , Chen Peter-B29397 , =?UTF-8?B?TWFyZWsgVmHFoXV0?= X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.214.177 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (festevam[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: Shawn Guo , Otavio Salvador , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Hi, I am trying to add USB support for mx23olinuxino board (running 3.6-rc1), but I am getting: [ 0.890000] usbcore: registered new interface driver asix [ 0.890000] usbcore: registered new interface driver cdc_ether [ 0.900000] usbcore: registered new interface driver smsc95xx [ 0.900000] usbcore: registered new interface driver net1080 [ 0.910000] usbcore: registered new interface driver cdc_subset [ 0.920000] usbcore: registered new interface driver zaurus [ 0.920000] usbcore: registered new interface driver cdc_ncm [ 0.930000] Initializing USB Mass Storage driver... [ 0.930000] usbcore: registered new interface driver usb-storage [ 0.940000] USB Mass Storage support registered. [ 0.950000] ci_hdrc ci_hdrc.0: doesn't support gadget [ 0.960000] ci_hdrc ci_hdrc.0: ChipIdea HDRC EHCI [ 0.960000] ci_hdrc ci_hdrc.0: new USB bus registered, assigned bus number 1 [ 1.020000] ci_hdrc ci_hdrc.0: USB 2.0 started, EHCI 1.00 [ 1.030000] hub 1-0:1.0: USB hub found [ 1.040000] hub 1-0:1.0: 1 port detected .... [ 1.300000] hub 1-0:1.0: unable to enumerate USB device on port 1 [ 1.520000] hub 1-0:1.0: unable to enumerate USB device on port 1 [ 1.740000] hub 1-0:1.0: unable to enumerate USB device on port 1 [ 1.960000] hub 1-0:1.0: unable to enumerate USB device on port 1 [ 2.180000] hub 1-0:1.0: unable to enumerate USB device on port 1 ... and keeps forever My changes are below. Hardware is fine as I can use USB host running the FSL 2.6.35 kernel. Schematics: https://github.com/OLIMEX/OLINUXINO/blob/master/HARDWARE/iMX233-OLinuXino-Maxi/iMX233-OLINUXINO-MAXI_Rev_B1.sch.pdf If anyone has any suggestions, I will be glad to hear. Thanks, Fabio Estevam --- arch/arm/boot/dts/imx23-olinuxino.dts | 41 +++++++++++++++++++++++++++++++++ arch/arm/boot/dts/imx23.dtsi | 8 +++++- 2 files changed, 47 insertions(+), 2 deletions(-) -- diff --git a/arch/arm/boot/dts/imx23-olinuxino.dts b/arch/arm/boot/dts/imx23-olinuxino.dts index 20912b1..3ab18c3 100644 --- a/arch/arm/boot/dts/imx23-olinuxino.dts +++ b/arch/arm/boot/dts/imx23-olinuxino.dts @@ -31,6 +31,21 @@ bus-width = <4>; status = "okay"; }; + + pinctrl@80018000 { + pinctrl-names = "default"; + pinctrl-0 = <&hog_pins_a>; + + hog_pins_a: hog-gpios@0 { + reg = <0>; + fsl,pinmux-ids = < + 0x0113 /* MX23_PAD_GPMI_ALE__GPIO_0_17 */ + >; + fsl,drive-strength = <2>; + fsl,voltage = <1>; + fsl,pull-up = <1>; + }; + }; }; apbx@80040000 { @@ -39,6 +54,32 @@ pinctrl-0 = <&duart_pins_a>; status = "okay"; }; + + usbphy0: usbphy@8007c000 { + status = "okay"; + }; + }; + + }; + + ahb@80080000 { + usb0: usb@80080000 { + vbus-supply = <®_usb0_vbus>; + status = "okay"; + }; + }; + + regulators { + compatible = "simple-bus"; + + reg_usb0_vbus: usb0_vbus { + compatible = "regulator-fixed"; + regulator-name = "usb0_vbus"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + startup-delay-us = <300>; /* LAN9215 requires a POR of 200us minimum */ + gpio = <&gpio0 17 0>; + enable-active-high; }; }; }; diff --git a/arch/arm/boot/dts/imx23.dtsi b/arch/arm/boot/dts/imx23.dtsi index e613831..83a8152 100644 --- a/arch/arm/boot/dts/imx23.dtsi +++ b/arch/arm/boot/dts/imx23.dtsi @@ -414,7 +414,8 @@ status = "disabled"; }; - usbphy@8007c000 { + usbphy0: usbphy@8007c000 { + compatible = "fsl,imx23-usbphy"; reg = <0x8007c000 0x2000>; status = "disabled"; }; @@ -428,8 +429,11 @@ reg = <0x80080000 0x80000>; ranges; - usbctrl@80080000 { + usb0: usb@80080000 { + compatible = "fsl,imx23-usb", "fsl,imx27-usb"; reg = <0x80080000 0x40000>; + interrupts = <11>; + fsl,usbphy = <&usbphy0>; status = "disabled"; }; };