From patchwork Wed Jun 12 02:12:06 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 2707761 Return-Path: X-Original-To: patchwork-linux-sh@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 597ABC1459 for ; Wed, 12 Jun 2013 02:12:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 512D720162 for ; Wed, 12 Jun 2013 02:12:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A55062010C for ; Wed, 12 Jun 2013 02:12:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755418Ab3FLCMI (ORCPT ); Tue, 11 Jun 2013 22:12:08 -0400 Received: from mail-pa0-f46.google.com ([209.85.220.46]:47210 "EHLO mail-pa0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754129Ab3FLCMH (ORCPT ); Tue, 11 Jun 2013 22:12:07 -0400 Received: by mail-pa0-f46.google.com with SMTP id fa11so6120984pad.19 for ; Tue, 11 Jun 2013 19:12:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:sender:message-id:to:cc:in-reply-to:references:from:subject :mime-version:content-type; bh=GTmHvrhfvUbMSe1eDk7bQ1Z/JY28OjuK1hbSKpuH8aE=; b=cVOqVXa+z2dtbUEh36Krd7sI5aj0i1tnXAE/ob8NPCLw9vB0pjmsljyHoMmyht8OoA Pf17QC92mP1Au4Fghd0JiVF6DTu4oPrjCT3ExOLlMNG+GSKIkjZ/7w5ynxT5Myf4UL3T lHNgb2FgljILGf++MEB3v28+fJaB6aSTVc/xTfWCulndT1JtAjuUeZFrrNnzR6Gzd9te 7Kz7ewh9H22+XKUXz5aLi1qx4jM5BOEOuF7Glz9cyEAwv6JUbg73QqhkmSMoNYL4mgK/ nV7+cvjqe6AXT0MFO8yjR1lv3iEOip2LMHQ/9wjD83C4orH2Yaq+hddbpQajaYwFjFqM rjaQ== X-Received: by 10.68.135.231 with SMTP id pv7mr17318112pbb.108.1371003127177; Tue, 11 Jun 2013 19:12:07 -0700 (PDT) Received: from morimoto-Dell-XPS420.gmail.com (49.14.32.202.bf.2iij.net. [202.32.14.49]) by mx.google.com with ESMTPSA id l4sm17014468pbo.6.2013.06.11.19.12.04 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 11 Jun 2013 19:12:06 -0700 (PDT) Date: Tue, 11 Jun 2013 19:12:06 -0700 (PDT) Message-ID: <878v2g6psd.wl%kuninori.morimoto.gx@renesas.com> To: Simon Cc: Magnus , Linux-SH , Kuninori Morimoto , (RSO) goda In-Reply-To: <87d2rs6pvv.wl%kuninori.morimoto.gx@renesas.com> References: <87li7fwgk8.wl%kuninori.morimoto.gx@renesas.com> <87d2rs6pvv.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 3/3 v4] ARM: shmobile: bockw: add MMCIF support MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") 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.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, 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 This patch enables CN26 MMCIF Signed-off-by: Yusuke Goda Signed-off-by: Kuninori Morimoto --- v3 -> v4 - based on renesas-next-20130611v2 arch/arm/mach-shmobile/board-bockw.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/arch/arm/mach-shmobile/board-bockw.c b/arch/arm/mach-shmobile/board-bockw.c index f0f9eaa..75ba061 100644 --- a/arch/arm/mach-shmobile/board-bockw.c +++ b/arch/arm/mach-shmobile/board-bockw.c @@ -41,6 +41,23 @@ * SW41 SCIF RCAN */ +/* + * MMC (CN26) pin + * + * SW6 (D2) 3 pin + * SW7 (D5) ON + * SW8 (D3) 3 pin + * SW10 (D4) 1 pin + * SW12 (CLK) 1 pin + * SW13 (D6) 3 pin + * SW14 (CMD) ON + * SW15 (D6) 1 pin + * SW16 (D0) ON + * SW17 (D1) ON + * SW18 (D7) 3 pin + * SW19 (MMC) 1 pin + */ + /* Dummy supplies, where voltage doesn't matter */ static struct regulator_consumer_supply dummy_supplies[] = { REGULATOR_SUPPLY("vddvario", "smsc911x"), @@ -103,10 +120,24 @@ static struct spi_board_info spi_board_info[] __initdata = { }, }; +/* MMC */ +static struct sh_mmcif_plat_data sh_mmcif_plat = { + .sup_pclk = 0, + .ocr = MMC_VDD_165_195 | MMC_VDD_32_33 | MMC_VDD_33_34, + .caps = MMC_CAP_4_BIT_DATA | + MMC_CAP_8_BIT_DATA | + MMC_CAP_NEEDS_POLL, +}; + static const struct pinctrl_map bockw_pinctrl_map[] = { /* HSPI0 */ PIN_MAP_MUX_GROUP_DEFAULT("sh-hspi.0", "pfc-r8a7778", "hspi0_a", "hspi0"), + /* MMC */ + PIN_MAP_MUX_GROUP_DEFAULT("sh_mmcif", "pfc-r8a7778", + "mmc_data8", "mmc"), + PIN_MAP_MUX_GROUP_DEFAULT("sh_mmcif", "pfc-r8a7778", + "mmc_ctrl", "mmc"), /* SCIF0 */ PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.0", "pfc-r8a7778", "scif0_data_a", "scif0"), @@ -135,6 +166,7 @@ static void __init bockw_init(void) r8a7778_add_usb_phy_device(&usb_phy_platform_data); r8a7778_add_i2c_device(0); r8a7778_add_hspi_device(0); + r8a7778_add_mmc_device(&sh_mmcif_plat); i2c_register_board_info(0, i2c0_devices, ARRAY_SIZE(i2c0_devices));