From patchwork Sat May 19 02:54:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 10412519 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4E62E601F9 for ; Sat, 19 May 2018 02:54:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3F2B027FB1 for ; Sat, 19 May 2018 02:54:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 339FA27FE4; Sat, 19 May 2018 02:54:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BD03D27FB1 for ; Sat, 19 May 2018 02:54:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751700AbeESCyy (ORCPT ); Fri, 18 May 2018 22:54:54 -0400 Received: from mail-io0-f193.google.com ([209.85.223.193]:47034 "EHLO mail-io0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751117AbeESCyx (ORCPT ); Fri, 18 May 2018 22:54:53 -0400 Received: by mail-io0-f193.google.com with SMTP id f21-v6so8422375iob.13 for ; Fri, 18 May 2018 19:54:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=1CUeAy6r+2+t44zc+7G2HNrX46PAMYuK3xeiPf+0QsU=; b=pIOLHbXT+R6Km6YzumGhf9kxlZO88vF7roh75ZpdqsZajMv6mOnOPQ57Li7saWJa0j z0+DSC4PyPToo9Z5tBAmsAq3dGilUDIJDWTBXMmQw3AicH29UxcGCZejIx67jL8CJLXB a0d38sGYnPRWdHLgYU0e+wOLv/j25yu/2yqsUL2Lvd5OCxWMiKAD+HEWzG2p7MsWKEiM o9JFeYqlznFiVJCdbPpUvaj0UHWXT+pQJDy+3G7nsooCEyJ7TJiclqg6ln38nn5+BBv0 Q0/pYp8wO7nZK4mXRQ83eNI8gRAa9YNQWgjeorF259F3EXHhWFj8kNp3vPxADGCydGG9 csBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=1CUeAy6r+2+t44zc+7G2HNrX46PAMYuK3xeiPf+0QsU=; b=ODlk+00swYjvNLDpxZ1YtlVkJKENuvmIZ3N4C4xxyECoBhNEUjsqPEFxdb96XySaFl xlPg695mfJHeH5Zw/qzzjrIJrX6M9ChB0Be8/PMICNmdjupqtux5OCQvbZYYPE/EF3jM 48TRoxyLoi9LteWJbhvqM6tB8/9S7uAxDAZosXPrx0FfBdOQS9C6KJDBlTxuZpAkIL2D +Gn+zYipr20JNIC0pWrO21vsuTCd8Sd/mecLUQ4JL1fr1CBv18KuU3CMQxlqaNDz90Jy 78AQx16hASr54rLsr0lacOgV9RBXE+rkllybSC/IaD2ioQr3XM5EqkhkVIHUgnzCywe6 eiIw== X-Gm-Message-State: ALKqPwedqKmiDcSiaaV3gDu3L0j+MNjaZtwxoqq0jMolMAg50GZ0CGic y2brKddP5i46zQkZJUR24XIrEw== X-Google-Smtp-Source: AB8JxZocayHdyeepoaIo69CPydK8ZaXe37DWkltV76wPGDOe1zcDpeZmTwgq7G0FuKX6ohFp2wXyFQ== X-Received: by 2002:a6b:9bcc:: with SMTP id d195-v6mr13065168ioe.15.1526698492159; Fri, 18 May 2018 19:54:52 -0700 (PDT) Received: from localhost.localdomain (c-73-65-120-235.hsd1.mn.comcast.net. [73.65.120.235]) by smtp.gmail.com with ESMTPSA id j200-v6sm5745346itj.9.2018.05.18.19.54.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 May 2018 19:54:51 -0700 (PDT) From: Adam Ford To: linux-omap@vger.kernel.org Cc: bcousson@baylibre.com, tony@atomide.com, t-kristo@ti.com, Adam Ford Subject: [RFC] ARM: dts: am3517-evm: Enable HSUSB1 EHCI PHY Date: Fri, 18 May 2018 21:54:41 -0500 Message-Id: <20180519025441.24372-1-aford173@gmail.com> X-Mailer: git-send-email 2.17.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The AM3517-EVM uses hsusb1 connected to a USB3320 ULPI Phy for USB Host. This patch will enable the USB host port in EHCI mode. RFC - I am getting Errors: [ 14.225754] usb 2-1: device descriptor read/64, error -71 [ 15.165746] usb 2-1: device descriptor read/64, error -71 [ 16.095806] usb 2-1: new high-speed USB device number 3 using ehci-omap [ 16.925760] usb 2-1: device descriptor read/64, error -71 [ 17.865742] usb 2-1: device descriptor read/64, error -71 [ 17.986079] usb usb2-port1: attempt power cycle [ 19.135783] usb 2-1: new high-speed USB device number 4 using ehci-omap [ 19.585737] usb 2-1: device not accepting address 4, error -71 [ 20.395752] usb 2-1: new high-speed USB device number 5 using ehci-omap [ 20.845739] usb 2-1: device not accepting address 5, error -71 [ 20.851958] usb usb2-port1: unable to enumerate USB device I was hoping someone might have some insight as to why. This doesn't seem to be any different than any OMAP3 HSUSB1 port and this method works on a Logic PD DM3730 SOM-LV with the same USB3320 ULPI Signed-off-by: Adam Ford diff --git a/arch/arm/boot/dts/am3517-evm.dts b/arch/arm/boot/dts/am3517-evm.dts index 98aadb0f81c5..135f38e6f6e2 100644 --- a/arch/arm/boot/dts/am3517-evm.dts +++ b/arch/arm/boot/dts/am3517-evm.dts @@ -168,6 +168,12 @@ ti,timers = <&timer11>; #pwm-cells = <3>; }; + + hsusb1_phy: hsusb1_phy { + compatible = "usb-nop-xceiv"; + reset-gpios = <&gpio2 25 GPIO_ACTIVE_LOW>; /* gpio_57 */ + #phy-cells = <0>; + }; }; &davinci_emac { @@ -228,7 +234,18 @@ status = "disabled"; }; +&usbhshost { + /* num-ports = <1>; */ + port1-mode = "ehci-phy"; +}; + +&usbhsehci { + phys = <&hsusb1_phy>; +}; + &omap3_pmx_core { + pinctrl-names = "default"; + pinctrl-0 = <&hsusb1_reset_pins>; leds_pins: pinmux_leds_pins { pinctrl-single,pins = < @@ -287,4 +304,33 @@ OMAP3_CORE1_IOPAD(0x20fa, PIN_OUTPUT | MUX_MODE0) /* dss_data15.dss_data15 */ >; }; + + hsusb1_reset_pins: pinmux_hsusb1_reset_pins { + pinctrl-single,pins = < + OMAP3_CORE1_IOPAD(0x20ba, PIN_OUTPUT | MUX_MODE4) /* gpmc_ncs6.gpio_57 */ + >; + }; +}; + +&omap3_pmx_core2 { + + pinctrl-names = "default"; + pinctrl-0 = <&hsusb1_phy_pins>; + + hsusb1_phy_pins: pinmux_hsusb1_phy_pins { + pinctrl-single,pins = < + OMAP3430_CORE2_IOPAD(0x25d8, PIN_OUTPUT | MUX_MODE3) /* etk_clk.hsusb1_stp */ + OMAP3430_CORE2_IOPAD(0x25da, PIN_OUTPUT | MUX_MODE3) /* etk_ctl.hsusb1_clk */ + OMAP3430_CORE2_IOPAD(0x25dc, PIN_INPUT | MUX_MODE3) /* etk_d0.hsusb1_data0 */ + OMAP3430_CORE2_IOPAD(0x25de, PIN_INPUT | MUX_MODE3) /* etk_d1.hsusb1_data1 */ + OMAP3430_CORE2_IOPAD(0x25e0, PIN_INPUT | MUX_MODE3) /* etk_d2.hsusb1_data2 */ + OMAP3430_CORE2_IOPAD(0x25e2, PIN_INPUT | MUX_MODE3) /* etk_d3.hsusb1_data7 */ + OMAP3430_CORE2_IOPAD(0x25e4, PIN_INPUT | MUX_MODE3) /* etk_d4.hsusb1_data4 */ + OMAP3430_CORE2_IOPAD(0x25e6, PIN_INPUT | MUX_MODE3) /* etk_d5.hsusb1_data5 */ + OMAP3430_CORE2_IOPAD(0x25e8, PIN_INPUT | MUX_MODE3) /* etk_d6.hsusb1_data6 */ + OMAP3430_CORE2_IOPAD(0x25ea, PIN_INPUT | MUX_MODE3) /* etk_d7.hsusb1_data3 */ + OMAP3430_CORE2_IOPAD(0x25ec, PIN_INPUT | MUX_MODE3) /* etk_d8.hsusb1_dir */ + OMAP3430_CORE2_IOPAD(0x25ee, PIN_INPUT | MUX_MODE3) /* etk_d9.hsusb1_nxt */ + >; + }; };