From patchwork Fri Feb 14 03:29:48 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 3649521 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 9FEA1BF13A for ; Fri, 14 Feb 2014 03:29:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CD51E20179 for ; Fri, 14 Feb 2014 03:29:43 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (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 D16D920149 for ; Fri, 14 Feb 2014 03:29:42 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WE9SY-0002SK-O7; Fri, 14 Feb 2014 03:29:02 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WE9SW-0004uZ-DE; Fri, 14 Feb 2014 03:29:00 +0000 Received: from mail-pd0-x230.google.com ([2607:f8b0:400e:c02::230]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WE9ST-0004uH-0x for linux-arm-kernel@lists.infradead.org; Fri, 14 Feb 2014 03:28:58 +0000 Received: by mail-pd0-f176.google.com with SMTP id w10so11344977pde.21 for ; Thu, 13 Feb 2014 19:28:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:date:message-id:subject; bh=jret+AtF58pyDDzXm6xWf7M6pzVZ8xcuPUpSyJv70qk=; b=1Bzjp4HHb91vRyjsY4kUwaFJSbxNsRmFJRkFr3hsd1H65JxSVQsObrO8lgkSPN79iZ EyPryOsFUmyZ9/bBqlT+feDTmRlrHFg8wtguX2z4e1ifDo43xg1pEs/KK0q5Mij67mUj 9Q9NXxVte6JHZjSEoCieagPyTVI0riJMtBmqkUjnVFPliTNz3ImmbYRlkpp4dfnKD7zL hVUurGkDYDcBXoC6K4WdAIXqhfgiIisoZrOJnGwYbP6j7kI5mgJOqAk5QUWsHAxFGqWA /tmMF8S9UHwrfS3Hx2H8gT1yMmcYPE6tQBnt4wRciIN4pI9j3NofSB4GLscTbG60FMLL OrKA== X-Received: by 10.66.129.169 with SMTP id nx9mr6037185pab.130.1392348514625; Thu, 13 Feb 2014 19:28:34 -0800 (PST) Received: from [127.0.0.1] (s214090.ppp.asahi-net.or.jp. [220.157.214.90]) by mx.google.com with ESMTPSA id tu3sm11769959pbc.40.2014.02.13.19.28.31 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Feb 2014 19:28:33 -0800 (PST) From: Magnus Damm To: linux-sh@vger.kernel.org Date: Fri, 14 Feb 2014 12:29:48 +0900 Message-Id: <20140214032948.3287.33351.sendpatchset@w520> Subject: [PATCH] ARM: shmobile: lager: Add internal USB PCI support X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140213_222857_152552_EFC1AA76 X-CRM114-Status: UNSURE ( 9.09 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.0 (--) Cc: valentine.barshak@cogentembedded.com, horms@verge.net.au, Magnus Damm , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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.7 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, 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 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 --- Written against renesas-devel-v3.14-rc2-20140213 arch/arm/mach-shmobile/board-lager.c | 50 ++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) --- 0001/arch/arm/mach-shmobile/board-lager.c +++ work/arch/arm/mach-shmobile/board-lager.c 2014-02-14 12:16:26.000000000 +0900 @@ -638,6 +638,48 @@ static struct resource sdhi2_resources[] 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_pi /* 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_de &usbhs_phy_pdata, sizeof(usbhs_phy_pdata)); lager_register_usbhs(); + lager_add_usb1_device(); + lager_add_usb2_device(); lager_add_rsnd_device();