From patchwork Thu Aug 28 06:59:21 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Horman X-Patchwork-Id: 4793381 Return-Path: X-Original-To: patchwork-ltsi-dev@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 851A29F375 for ; Thu, 28 Aug 2014 07:18:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9FAA02016C for ; Thu, 28 Aug 2014 07:18:23 +0000 (UTC) Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B6D162015A for ; Thu, 28 Aug 2014 07:18:22 +0000 (UTC) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 7652FC01; Thu, 28 Aug 2014 07:13:11 +0000 (UTC) X-Original-To: ltsi-dev@lists.linuxfoundation.org Delivered-To: ltsi-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id C49F1BF2 for ; Thu, 28 Aug 2014 07:13:09 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from kirsty.vergenet.net (kirsty.vergenet.net [202.4.237.240]) by smtp1.linuxfoundation.org (Postfix) with ESMTP id 444981F9D0 for ; Thu, 28 Aug 2014 07:13:09 +0000 (UTC) Received: from ayumi.isobedori.kobe.vergenet.net (p4222-ipbfp1605kobeminato.hyogo.ocn.ne.jp [114.154.95.222]) by kirsty.vergenet.net (Postfix) with ESMTP id 5D9372672F9; Thu, 28 Aug 2014 17:08:27 +1000 (EST) Received: by ayumi.isobedori.kobe.vergenet.net (Postfix, from userid 7100) id DE6B9EDE8E4; Thu, 28 Aug 2014 16:08:25 +0900 (JST) From: Simon Horman To: ltsi-dev@lists.linuxfoundation.org Date: Thu, 28 Aug 2014 15:59:21 +0900 Message-Id: <1409209620-24487-436-git-send-email-horms+renesas@verge.net.au> X-Mailer: git-send-email 2.0.1 In-Reply-To: <1409209620-24487-1-git-send-email-horms+renesas@verge.net.au> References: <1409209620-24487-1-git-send-email-horms+renesas@verge.net.au> X-Spam-Status: No, score=-4.2 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 Cc: Magnus Damm Subject: [LTSI-dev] [PATCH LTSI-3.14 435/894] ARM: shmobile: lager: Add internal USB PCI support X-BeenThere: ltsi-dev@lists.linuxfoundation.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: "A list to discuss patches, development, and other things related to the LTSI project" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ltsi-dev-bounces@lists.linuxfoundation.org Errors-To: ltsi-dev-bounces@lists.linuxfoundation.org X-Virus-Scanned: ClamAV using ClamSMTP From: Valentine Barshak This adds internal PCI USB host devices to R-Car H2 Lager board. Signed-off-by: Valentine Barshak [damm@opensource.se: Rebased and reworked to only include USB1 and USB2] Signed-off-by: Magnus Damm Signed-off-by: Simon Horman (cherry picked from commit 849f7b6c10d8016b55e13b7ad2e9f299e2da817b) Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-lager.c | 50 ++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/arch/arm/mach-shmobile/board-lager.c b/arch/arm/mach-shmobile/board-lager.c index 72886af..193dff0 100644 --- a/arch/arm/mach-shmobile/board-lager.c +++ b/arch/arm/mach-shmobile/board-lager.c @@ -638,6 +638,48 @@ static struct resource sdhi2_resources[] __initdata = { DEFINE_RES_IRQ(gic_spi(167)), }; +/* Internal PCI1 */ +static const struct resource pci1_resources[] __initconst = { + DEFINE_RES_MEM(0xee0b0000, 0x10000), /* CFG */ + DEFINE_RES_MEM(0xee0a0000, 0x10000), /* MEM */ + DEFINE_RES_IRQ(gic_spi(112)), +}; + +static const struct platform_device_info pci1_info __initconst = { + .parent = &platform_bus, + .name = "pci-rcar-gen2", + .id = 1, + .res = pci1_resources, + .num_res = ARRAY_SIZE(pci1_resources), + .dma_mask = DMA_BIT_MASK(32), +}; + +static void __init lager_add_usb1_device(void) +{ + platform_device_register_full(&pci1_info); +} + +/* Internal PCI2 */ +static const struct resource pci2_resources[] __initconst = { + DEFINE_RES_MEM(0xee0d0000, 0x10000), /* CFG */ + DEFINE_RES_MEM(0xee0c0000, 0x10000), /* MEM */ + DEFINE_RES_IRQ(gic_spi(113)), +}; + +static const struct platform_device_info pci2_info __initconst = { + .parent = &platform_bus, + .name = "pci-rcar-gen2", + .id = 2, + .res = pci2_resources, + .num_res = ARRAY_SIZE(pci2_resources), + .dma_mask = DMA_BIT_MASK(32), +}; + +static void __init lager_add_usb2_device(void) +{ + platform_device_register_full(&pci2_info); +} + static const struct pinctrl_map lager_pinctrl_map[] = { /* DU (CN10: ARGB0, CN13: LVDS) */ PIN_MAP_MUX_GROUP_DEFAULT("rcar-du-r8a7790", "pfc-r8a7790", @@ -716,6 +758,12 @@ static const struct pinctrl_map lager_pinctrl_map[] = { /* USB0 */ PIN_MAP_MUX_GROUP_DEFAULT("renesas_usbhs", "pfc-r8a7790", "usb0_ovc_vbus", "usb0"), + /* USB1 */ + PIN_MAP_MUX_GROUP_DEFAULT("pci-rcar-gen2.1", "pfc-r8a7790", + "usb1", "usb1"), + /* USB2 */ + PIN_MAP_MUX_GROUP_DEFAULT("pci-rcar-gen2.2", "pfc-r8a7790", + "usb2", "usb2"), }; static void __init lager_add_standard_devices(void) @@ -776,6 +824,8 @@ static void __init lager_add_standard_devices(void) &usbhs_phy_pdata, sizeof(usbhs_phy_pdata)); lager_register_usbhs(); + lager_add_usb1_device(); + lager_add_usb2_device(); lager_add_rsnd_device();