From patchwork Fri Jul 5 15:25:30 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guennadi Liakhovetski X-Patchwork-Id: 2824259 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 063B09F3EB for ; Fri, 5 Jul 2013 15:25:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2076020171 for ; Fri, 5 Jul 2013 15:25:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0029F20168 for ; Fri, 5 Jul 2013 15:25:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757470Ab3GEPZg (ORCPT ); Fri, 5 Jul 2013 11:25:36 -0400 Received: from moutng.kundenserver.de ([212.227.126.187]:60908 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757373Ab3GEPZf (ORCPT ); Fri, 5 Jul 2013 11:25:35 -0400 Received: from axis700.grange (dslb-178-001-146-173.pools.arcor-ip.net [178.1.146.173]) by mrelayeu.kundenserver.de (node=mreu2) with ESMTP (Nemesis) id 0Lx3gz-1UAzLQ3rHV-016bO2; Fri, 05 Jul 2013 17:25:34 +0200 Received: from 6a.grange (6a.grange [192.168.1.11]) by axis700.grange (Postfix) with ESMTPS id 5EECC40BB5; Fri, 5 Jul 2013 17:25:33 +0200 (CEST) Received: from lyakh by 6a.grange with local (Exim 4.72) (envelope-from ) id 1Uv7t7-0005Br-4m; Fri, 05 Jul 2013 17:25:33 +0200 From: Guennadi Liakhovetski To: linux-sh@vger.kernel.org Cc: Magnus Damm , Simon Horman , Guennadi Liakhovetski Subject: [PATCH v2 4/6] ARM: shmobile: Lager: add MMCIF support Date: Fri, 5 Jul 2013 17:25:30 +0200 Message-Id: <1373037932-19918-5-git-send-email-g.liakhovetski@gmx.de> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1373037932-19918-1-git-send-email-g.liakhovetski@gmx.de> References: <1373037932-19918-1-git-send-email-g.liakhovetski@gmx.de> X-Provags-ID: V02:K0:MOxBFlH/2rQ08Gtdl5uOkJJDeyifwttaj4dWziXAiXm JIJdhX0GXXkUyhtF9CGpHIrirtCJGP42dMUHzhqywCU4VFM74p v7k3zKBZchXexfOAtjs8pi3KnVmFpn7b3Ozwe8tv21gTfi0+B3 1vn0t30xWUpkfs3wAwFN1EB0EvQABePmKckMmSyonLMbmYxD6q v5Ces0jf+mi3+OXqGs5dd0Wyxx3G/l3FU/izlZHsrYxYn/ffuh AuKIYzrgewBqkL8A/y9p6PzV+QlrDyCYtVmYfREPVWfwXvCzNs yrjLMQfJwTrNLNsxTVijwkdDsfdQwalcH84r1kMXA+HQ7XZ4IL NYcUA2BBpR/BBGuTMSgGfJScISujZTTx+UqiaKxqZP1iPhVF6H CLbWK6RHOtxsw== 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 --- v2: fixed MMCIF memory resource size 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..3c67b2a 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, 0x80, "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 = {