From patchwork Thu Mar 17 02:26:40 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Lechner X-Patchwork-Id: 8606921 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 5F75B9F54C for ; Thu, 17 Mar 2016 03:45:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6F82C20204 for ; Thu, 17 Mar 2016 03:45:06 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7C35D2020F for ; Thu, 17 Mar 2016 03:45:05 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1agOqU-0007vL-5n; Thu, 17 Mar 2016 03:43:34 +0000 Received: from [50.115.127.205] (helo=vern.gendns.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1agOpF-0006YI-2t for linux-arm-kernel@lists.infradead.org; Thu, 17 Mar 2016 03:42:32 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lechnology.com; s=default; h=References:In-Reply-To:Message-Id:Date:Subject :Cc:To:From; bh=f+t+sn+sM7CulQkyOKoclbWbppz5aqVMbpx6bUBPcBs=; b=lDqFn2x0anp9X lgIP44MLGGGW4AJCTagcudsbOrM5qk8xh52berlVMMiBVAIFZ4SpJSV0k4xTC55isyxCcWIgDp6QS jR/n38x+9EjO9ypV1xji0MZmPK0jGXsZTjNDfIbqKMBvoSKj3t0xc3/9JB9ulikBUbvVXUZAjPP7c LgY7zAyRAd7hI5HT+o61auNvMyIDWvmiGeUgRoq86zUoLTCsKpvNc4CFfoz0kMMhbKq/Pog3MoHx2 ARgsJ3yW18VCJeEK9g5Fi+L7o4c6a0bR9Mlw5KI43xagk6NitykqUpgkW5dv4UUThiuzLOhnwxnIO YBzafA+X6d6WJ0yt9ycTw==; Received: from 108-198-5-147.lightspeed.okcbok.sbcglobal.net ([108.198.5.147]:51099 helo=freyr.lechnology.com) by vern.gendns.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-SHA256:128) (Exim 4.86_1) (envelope-from ) id 1agNgk-003yue-1G; Wed, 16 Mar 2016 22:29:26 -0400 From: David Lechner To: Subject: [PATCH v2 07/11] ARM: davinci: da8xx: Add USB PHY platform declaration Date: Wed, 16 Mar 2016 21:26:40 -0500 Message-Id: <1458181615-27782-8-git-send-email-david@lechnology.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1458181615-27782-1-git-send-email-david@lechnology.com> References: <1458181615-27782-1-git-send-email-david@lechnology.com> X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vern.gendns.com X-AntiAbuse: Original Domain - lists.infradead.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lechnology.com X-Get-Message-Sender-Via: vern.gendns.com: authenticated_id: davidmain+lechnology.com/only user confirmed/virtual account not confirmed X-Authenticated-Sender: vern.gendns.com: davidmain@lechnology.com X-Source: X-Source-Args: X-Source-Dir: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160316_204217_751227_91B419A9 X-CRM114-Status: GOOD ( 10.85 ) X-Spam-Score: -0.5 (/) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Tony Lindgren , Sekhar Nori , Robert Jarzmik , Russell King , Kevin Hilman , Kishon Vijay Abraham I , Alan Stern , devicetree@vger.kernel.org, David Lechner , Pawel Moll , Ian Campbell , Rob Herring , Bin Liu , linux-arm-kernel@lists.infradead.org, Sergei Shtylyov , Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Petr Kulhavy , Kumar Gala , =?UTF-8?q?Andreas=20F=C3=A4rber?= MIME-Version: 1.0 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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,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 There is now a proper phy driver for the DA8XX SoC USB PHY. This adds the platform device declarations needed to use it. Signed-off-by: David Lechner --- v2 changes: This is new patch in v2. arch/arm/mach-davinci/include/mach/da8xx.h | 1 + arch/arm/mach-davinci/usb.c | 24 +++++++++++++++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-davinci/include/mach/da8xx.h b/arch/arm/mach-davinci/include/mach/da8xx.h index f9f9713..049d26f 100644 --- a/arch/arm/mach-davinci/include/mach/da8xx.h +++ b/arch/arm/mach-davinci/include/mach/da8xx.h @@ -88,6 +88,7 @@ int da850_register_edma(struct edma_rsv_info *rsv[2]); int da8xx_register_i2c(int instance, struct davinci_i2c_platform_data *pdata); int da8xx_register_spi_bus(int instance, unsigned num_chipselect); int da8xx_register_watchdog(void); +int da8xx_register_usbphy(void); int da8xx_register_usb20(unsigned mA, unsigned potpgt); int da8xx_register_usb11(struct da8xx_ohci_root_hub *pdata); int da8xx_register_emac(void); diff --git a/arch/arm/mach-davinci/usb.c b/arch/arm/mach-davinci/usb.c index b0a6b52..6a0802e 100644 --- a/arch/arm/mach-davinci/usb.c +++ b/arch/arm/mach-davinci/usb.c @@ -4,7 +4,7 @@ #include #include #include - +#include #include #include @@ -18,6 +18,28 @@ #define DA8XX_USB0_BASE 0x01e00000 #define DA8XX_USB1_BASE 0x01e25000 +#ifdef CONFIG_ARCH_DAVINCI_DA8XX +static struct resource da8xx_usbphy_resources[] = { + [0] = { + .start = DA8XX_SYSCFG0_BASE + DA8XX_CFGCHIP2_REG, + .end = DA8XX_SYSCFG0_BASE + DA8XX_CFGCHIP2_REG + 4 - 1, + .flags = IORESOURCE_MEM, + }, +}; + +static struct platform_device da8xx_usbphy = { + .name = "da8xx-usbphy", + .id = 0, + .num_resources = ARRAY_SIZE(da8xx_usbphy_resources), + .resource = da8xx_usbphy_resources, +}; + +int __init da8xx_register_usbphy(void) +{ + return platform_device_register(&da8xx_usbphy); +} +#endif /* CONFIG_ARCH_DAVINCI_DA8XX */ + #if IS_ENABLED(CONFIG_USB_MUSB_HDRC) static struct musb_hdrc_eps_bits musb_eps[] = { { "ep1_tx", 8, },