From patchwork Wed Nov 20 17:38:06 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulrich Hecht X-Patchwork-Id: 3214071 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id EC31E9F3A0 for ; Wed, 20 Nov 2013 17:39:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 49BFE20760 for ; Wed, 20 Nov 2013 17:39:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 71A362076A for ; Wed, 20 Nov 2013 17:39:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754366Ab3KTRja (ORCPT ); Wed, 20 Nov 2013 12:39:30 -0500 Received: from mail-bk0-f43.google.com ([209.85.214.43]:65331 "EHLO mail-bk0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754324Ab3KTRj1 (ORCPT ); Wed, 20 Nov 2013 12:39:27 -0500 Received: by mail-bk0-f43.google.com with SMTP id mz12so1244732bkb.30 for ; Wed, 20 Nov 2013 09:39:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=yj/bB7h/cy+U+DWdABoqqOH4ePvyNC3S/Ud7er1JTi4=; b=VZnIiBoLm6HaJ+OkNwKfXcXVRTogoTLWNz1jS4js/6To/AsR44SwpoRqwuqc+Qp4/W Zs5E9uJLHo2lRsGkhUGRAWUvjfmQp8zDGCSD1N3hrSgkfMb7Yi8lwgMbFreM1++SIMy9 w1Vxq1/0cYZT0unpGTM4TpZrlZq+oNwKr5A0Z3bjB2CW0C+bPqtfskKROphtYfItLB14 nUaBa0286fAZcGsLR9sDe22vpj4LZZi4Yc8CDimMblXMDZHJT0zTOCoZA4P/e9CRflEt DACVvAfq8w1KoPe3jNbFxF0UFKvEwDyZTF8OlXLWPx1kRWX2pQyiZeIEvBiGOcJIHs+k BOJw== X-Received: by 10.205.65.81 with SMTP id xl17mr1922bkb.66.1384969166615; Wed, 20 Nov 2013 09:39:26 -0800 (PST) Received: from groucho.site ([109.201.152.7]) by mx.google.com with ESMTPSA id no2sm24117885bkb.15.2013.11.20.09.39.25 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Nov 2013 09:39:25 -0800 (PST) From: Ulrich Hecht To: Simon Horman Cc: linux-sh@vger.kernel.org, Magnus Damm , Kuninori Morimoto , Laurent Pinchart , Valentine Barshak , linux-usb@vger.kernel.org, Felipe Balbi , Alan Stern , Ulrich Hecht Subject: [PATCH 9/9] ARM: shmobile: lager: add PCI USB host controllers Date: Wed, 20 Nov 2013 18:38:06 +0100 Message-Id: <1384969086-8920-10-git-send-email-ulrich.hecht@gmail.com> X-Mailer: git-send-email 1.8.4 In-Reply-To: <1384969086-8920-1-git-send-email-ulrich.hecht@gmail.com> References: <1384969086-8920-1-git-send-email-ulrich.hecht@gmail.com> Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham 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 Adds USB1 and 2 as hosts and binds them to the USB phy. Signed-off-by: Ulrich Hecht --- arch/arm/mach-shmobile/Kconfig | 1 + arch/arm/mach-shmobile/board-lager.c | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig index 557f55c..e93812f 100644 --- a/arch/arm/mach-shmobile/Kconfig +++ b/arch/arm/mach-shmobile/Kconfig @@ -244,6 +244,7 @@ config MACH_LAGER bool "Lager board" depends on ARCH_R8A7790 select USE_OF + select PCI config MACH_LAGER_REFERENCE bool "Lager board - Reference Device Tree Implementation" diff --git a/arch/arm/mach-shmobile/board-lager.c b/arch/arm/mach-shmobile/board-lager.c index efe242d8..71d4482 100644 --- a/arch/arm/mach-shmobile/board-lager.c +++ b/arch/arm/mach-shmobile/board-lager.c @@ -271,6 +271,17 @@ static const struct resource usbhs_phy_resources[] __initconst = { DEFINE_RES_MEM(0xe6590100, 0x100), }; +static const struct resource usbhs_pci1_resources[] __initconst = { + DEFINE_RES_MEM(0xee0b0000, 0xc00), + DEFINE_RES_MEM(0xee0a0000, 0x1100), + DEFINE_RES_IRQ(gic_spi(112)), +}; +static const struct resource usbhs_pci2_resources[] __initconst = { + DEFINE_RES_MEM(0xee0d0000, 0xc00), + DEFINE_RES_MEM(0xee0c0000, 0x1100), + DEFINE_RES_IRQ(gic_spi(113)), +}; + static const struct pinctrl_map lager_pinctrl_map[] = { /* DU (CN10: ARGB0, CN13: LVDS) */ PIN_MAP_MUX_GROUP_DEFAULT("rcar-du-r8a7790", "pfc-r8a7790", @@ -337,6 +348,18 @@ static void __init lager_add_standard_devices(void) sizeof(usbhs_phy_pdata)); lager_register_usbhs(); + usb_bind_phy("0000:00:01.0", 0, "usb_phy_rcar_gen2"); + usb_bind_phy("0000:00:02.0", 0, "usb_phy_rcar_gen2"); + usb_bind_phy("0000:01:01.0", 0, "usb_phy_rcar_gen2"); + usb_bind_phy("0000:01:02.0", 0, "usb_phy_rcar_gen2"); + + platform_device_register_simple("pci-rcar-gen2", 1, + usbhs_pci1_resources, + ARRAY_SIZE(usbhs_pci1_resources)); + platform_device_register_simple("pci-rcar-gen2", 2, + usbhs_pci2_resources, + ARRAY_SIZE(usbhs_pci2_resources)); + lager_add_du_device(); }