From patchwork Thu Jul 4 20:38:52 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guennadi Liakhovetski X-Patchwork-Id: 2823925 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 CD551BF4A1 for ; Thu, 4 Jul 2013 20:39:04 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D8A9420153 for ; Thu, 4 Jul 2013 20:39:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 080E72014B for ; Thu, 4 Jul 2013 20:39:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756861Ab3GDUjB (ORCPT ); Thu, 4 Jul 2013 16:39:01 -0400 Received: from moutng.kundenserver.de ([212.227.17.8]:56679 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756646Ab3GDUjA (ORCPT ); Thu, 4 Jul 2013 16:39:00 -0400 Received: from axis700.grange (dslb-088-076-026-213.pools.arcor-ip.net [88.76.26.213]) by mrelayeu.kundenserver.de (node=mreu2) with ESMTP (Nemesis) id 0MGVFc-1UzG9D1RWC-00DOVP; Thu, 04 Jul 2013 22:38:59 +0200 Received: from 6a.grange (6a.grange [192.168.1.11]) by axis700.grange (Postfix) with ESMTPS id C355A40BB8; Thu, 4 Jul 2013 22:38:57 +0200 (CEST) Received: from lyakh by 6a.grange with local (Exim 4.72) (envelope-from ) id 1UuqIp-0005b9-3W; Thu, 04 Jul 2013 22:38:55 +0200 From: Guennadi Liakhovetski To: linux-sh@vger.kernel.org Cc: Simon Horman , Magnus Damm , Guennadi Liakhovetski Subject: [PATCH 4/6] ARM: shmobile: Lager: add MMCIF support Date: Thu, 4 Jul 2013 22:38:52 +0200 Message-Id: <1372970334-21485-5-git-send-email-g.liakhovetski@gmx.de> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1372970334-21485-1-git-send-email-g.liakhovetski@gmx.de> References: <1372970334-21485-1-git-send-email-g.liakhovetski@gmx.de> X-Provags-ID: V02:K0:qejjqab6wiKTBiqxG3Tl1q9klsO4mfZBBwmDArvMCOG fsmAyK8eg7Mo8ZhEcMS6guhze1q4/+3+09bq7MJwYdJ3gEiA+/ s1faTiH8OTyV47YHYiOX+l6ucu/yxlryxxylMzZ7JW0HfdcjXj E4nwhsL40ZFZ5+poWiAxSr7A3/71ICFsFkxdETvyiNcOCCFj/g A5E5mBRkrdAkp7o74lFxrIMfRak862ayIs1PUOtkqOP9T4k8xo BsQch56kh/ITQTaMJvELpNEELNBoTHMoseP3DLtCbqYaDvTw/V a7H/Twgf4ly/kit17nxz4+EGCdylJ69MlwFRKPOqJ3aS+VDdah HG+5Z6Hi/d3i2xp3117MUA9JzpHDBBQWBacEam++r+QyimMlOA vRbJAf4r8IcmA== 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.1 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, 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 Add support for the MMCIF1 interface on Lager. Signed-off-by: Guennadi Liakhovetski --- arch/arm/mach-shmobile/board-lager.c | 31 +++++++++++++++++++++++++++++++ 1 files changed, 31 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-shmobile/board-lager.c b/arch/arm/mach-shmobile/board-lager.c index d0da052..2a35522 100644 --- a/arch/arm/mach-shmobile/board-lager.c +++ b/arch/arm/mach-shmobile/board-lager.c @@ -24,10 +24,15 @@ #include #include #include +#include +#include #include #include #include +#include +#include #include +#include #include #include #include @@ -70,6 +75,22 @@ static __initdata struct gpio_keys_platform_data lager_keys_pdata = { .nbuttons = ARRAY_SIZE(gpio_buttons), }; +/* Fixed 3.3V regulator to be used by MMCIF */ +static struct regulator_consumer_supply fixed3v3_power_consumers[] = +{ + REGULATOR_SUPPLY("vmmc", "sh_mmcif.1"), +}; + +/* MMCIF */ +static struct sh_mmcif_plat_data mmcif1_pdata = { + .caps = MMC_CAP_8_BIT_DATA | MMC_CAP_NONREMOVABLE, +}; + +static struct resource mmcif1_resources[] = { + DEFINE_RES_MEM_NAMED(0xee220000, 0x100, "MMCIF1"), + DEFINE_RES_IRQ(gic_spi(170)), +}; + static const struct pinctrl_map lager_pinctrl_map[] = { /* SCIF0 (CN19: DEBUG SERIAL0) */ PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.6", "pfc-r8a7790", @@ -77,6 +98,11 @@ static const struct pinctrl_map lager_pinctrl_map[] = { /* SCIF1 (CN20: DEBUG SERIAL1) */ PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.7", "pfc-r8a7790", "scif1_data", "scif1"), + /* MMCIF1 */ + PIN_MAP_MUX_GROUP_DEFAULT("sh_mmcif.1", "pfc-r8a7790", + "mmc1_data8", "mmc1"), + PIN_MAP_MUX_GROUP_DEFAULT("sh_mmcif.1", "pfc-r8a7790", + "mmc1_ctrl", "mmc1"), }; static void __init lager_add_standard_devices(void) @@ -94,6 +120,11 @@ static void __init lager_add_standard_devices(void) platform_device_register_data(&platform_bus, "gpio-keys", -1, &lager_keys_pdata, sizeof(lager_keys_pdata)); + regulator_register_always_on(0, "fixed-3.3V", fixed3v3_power_consumers, + ARRAY_SIZE(fixed3v3_power_consumers), 3300000); + platform_device_register_resndata(&platform_bus, "sh_mmcif", 1, + mmcif1_resources, ARRAY_SIZE(mmcif1_resources), + &mmcif1_pdata, sizeof(mmcif1_pdata)); } static const char *lager_boards_compat_dt[] __initdata = {