From patchwork Mon Jul 8 15:54:43 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guennadi Liakhovetski X-Patchwork-Id: 2824945 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 19C21C0AB2 for ; Mon, 8 Jul 2013 15:54:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 97FFF20168 for ; Mon, 8 Jul 2013 15:54:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A964320114 for ; Mon, 8 Jul 2013 15:54:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752057Ab3GHPyx (ORCPT ); Mon, 8 Jul 2013 11:54:53 -0400 Received: from moutng.kundenserver.de ([212.227.17.10]:51175 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751820Ab3GHPyw (ORCPT ); Mon, 8 Jul 2013 11:54:52 -0400 Received: from axis700.grange (dslb-094-221-113-239.pools.arcor-ip.net [94.221.113.239]) by mrelayeu.kundenserver.de (node=mrbap4) with ESMTP (Nemesis) id 0MeBmY-1UYXI603gc-00PXJV; Mon, 08 Jul 2013 17:54:48 +0200 Received: from 6a.grange (6a.grange [192.168.1.11]) by axis700.grange (Postfix) with ESMTPS id 7D4AE40BB5; Mon, 8 Jul 2013 17:54:47 +0200 (CEST) Received: from lyakh by 6a.grange with local (Exim 4.72) (envelope-from ) id 1UwDm3-0002Zv-AX; Mon, 08 Jul 2013 17:54:47 +0200 From: Guennadi Liakhovetski To: linux-sh@vger.kernel.org Cc: Magnus Damm , Simon Horman , Guennadi Liakhovetski Subject: [PATCH v3 4/7] ARM: shmobile: lager: add MMCIF support Date: Mon, 8 Jul 2013 17:54:43 +0200 Message-Id: <1373298887-9877-5-git-send-email-g.liakhovetski@gmx.de> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1373298887-9877-1-git-send-email-g.liakhovetski@gmx.de> References: <1373298887-9877-1-git-send-email-g.liakhovetski@gmx.de> X-Provags-ID: V02:K0:Y9RY+baeeZtR6gUt2Y9bao187iqcXUozTJOI65fmpGg SuZ0JV3oOsYf6mChz0jqoGWggkHq8KOfNg0mRS4K7FqV0DDW9r zZN4TVlkiBlPvVYQacc3Gm/bI9IUCeekxJqoBBioXc6geiDSt9 t9dWf7LRI19jeUJMgc+amuczYd4tgyhX0QgIbOoJJLoE99aPj9 qaQv/nlLnS8n4I1H/jfuKZDDZFv9zP/6A6FclZbVgnSdKxazTR R2lRqxlg8UD8BEw7X9EfhiIaXMlMhKWxdYTd471/7XMJ1O7WVL 4fPrHA8nk5Vyv80EchFnlp5kxGeQT3ZriGWTgDcv3VlF6bh+jY tIiG3a5k2vCln9qMZpB64mWE57ZJRzvzqbkwPJ5HwmB4UIJ0LD gJdPxbCVIy2HQ== 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.2 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..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 = {