From patchwork Wed Jun 26 13:50:34 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guennadi Liakhovetski X-Patchwork-Id: 2784721 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 C7E5CC0AB1 for ; Wed, 26 Jun 2013 13:50:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7CF93204D7 for ; Wed, 26 Jun 2013 13:50:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 15D5A204D1 for ; Wed, 26 Jun 2013 13:50:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752050Ab3FZNum (ORCPT ); Wed, 26 Jun 2013 09:50:42 -0400 Received: from moutng.kundenserver.de ([212.227.17.9]:55081 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752039Ab3FZNum (ORCPT ); Wed, 26 Jun 2013 09:50:42 -0400 Received: from axis700.grange (dslb-178-001-151-028.pools.arcor-ip.net [178.1.151.28]) by mrelayeu.kundenserver.de (node=mreu0) with ESMTP (Nemesis) id 0MKMjK-1UsOc9110A-001s5E; Wed, 26 Jun 2013 15:50:35 +0200 Received: by axis700.grange (Postfix, from userid 1000) id 9A9C540BB4; Wed, 26 Jun 2013 15:50:34 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by axis700.grange (Postfix) with ESMTP id 9089940BB3; Wed, 26 Jun 2013 15:50:34 +0200 (CEST) Date: Wed, 26 Jun 2013 15:50:34 +0200 (CEST) From: Guennadi Liakhovetski X-X-Sender: lyakh@axis700.grange To: linux-sh@vger.kernel.org cc: Magnus Damm , Simon Horman Subject: [PATCH v2] ARM: shmobile: APE6EVM: add MMCIF and SDHI support Message-ID: MIME-Version: 1.0 X-Provags-ID: V02:K0:HMDCfRFcqQG3BHuavUjXnjMWVtR0u1/dF2ztjtWhQXE ZRXsUxzQGxgwJXGcn7X/DSqDwdO7FGWOiR0OE+U2xu523GfXJh 4oZbbRhpd9GHhktznFAcqI1t03qVTGR/oJk7w/g3/Udsoievri pMqoJSND9anqqZKrnm9AMdszDguQybHpPkqo6pg3lD0+bSDGrk SGvfdlr+2YOtPz4xA3Pvv3N/ka4oS0ONpluxDB1x6jFOQLswXK kE5+4kWJoxbDFrqNID1PRKPO9GDb9NTPz/o3LDdrSVZSmW/Yxk ow/rn3PxmDlPhU9ocsz2mxW7nPxzkQM4/C5+AYQ95daL4MzQyA 3HEpFp8v++aobmL402RTsneXgTtjx+7ox4Jx1MPGKWwaflReq9 PRoljU8vb+HBQ== Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-8.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 This patch adds all SDHI and MMCIF DT nodes to r8a73a4. On APE6EVM only SDHI0, SDHI1 and MMCIF0 are available. For these interfaces DT nodes are enabled and pinmux settings are activated. Signed-off-by: Guennadi Liakhovetski --- Pinmux configuration is still done via .c, dummy regulator support, no GPIO card detection. All this should be fixed as soon as pinctrl DT is available on r8a73a4. v2: now uses DT. arch/arm/boot/dts/r8a73a4-ape6evm.dts | 22 +++++++++++++++ arch/arm/boot/dts/r8a73a4.dtsi | 45 ++++++++++++++++++++++++++++++++ arch/arm/mach-shmobile/board-ape6evm.c | 17 ++++++++++++ 3 files changed, 84 insertions(+), 0 deletions(-) diff --git a/arch/arm/boot/dts/r8a73a4-ape6evm.dts b/arch/arm/boot/dts/r8a73a4-ape6evm.dts index 27c5e06..a4553b2 100644 --- a/arch/arm/boot/dts/r8a73a4-ape6evm.dts +++ b/arch/arm/boot/dts/r8a73a4-ape6evm.dts @@ -74,3 +74,25 @@ >; voltage-tolerance = <1>; /* 1% */ }; + +&mmcif0 { + vmmc-supply = <&ape6evm_fixed_3v3>; + bus-width = <8>; + non-removable; + status = "okay"; +}; + +&sdhi0 { + vmmc-supply = <&ape6evm_fixed_3v3>; + bus-width = <4>; + toshiba,mmc-wrprotect-disable; + status = "okay"; +}; + +&sdhi1 { + vmmc-supply = <&ape6evm_fixed_3v3>; + bus-width = <4>; + broken-cd; + toshiba,mmc-wrprotect-disable; + status = "okay"; +}; diff --git a/arch/arm/boot/dts/r8a73a4.dtsi b/arch/arm/boot/dts/r8a73a4.dtsi index 4e1ddf0..064f045 100644 --- a/arch/arm/boot/dts/r8a73a4.dtsi +++ b/arch/arm/boot/dts/r8a73a4.dtsi @@ -166,4 +166,49 @@ interrupt-parent = <&gic>; interrupts = <0 173 0x4>; }; + + mmcif0: mmcif@ee200000 { + compatible = "renesas,sh-mmcif"; + reg = <0 0xee200000 0 0x100>; + interrupt-parent = <&gic>; + interrupts = <0 169 0x4>; + reg-io-width = <4>; + status = "disabled"; + }; + + mmcif1: mmcif@ee220000 { + compatible = "renesas,sh-mmcif"; + reg = <0 0xee220000 0 0x100>; + interrupt-parent = <&gic>; + interrupts = <0 170 0x4>; + reg-io-width = <4>; + status = "disabled"; + }; + + sdhi0: sdhi@ee100000 { + compatible = "renesas,r8a7740-sdhi"; + reg = <0 0xee100000 0 0x100>; + interrupt-parent = <&gic>; + interrupts = <0 165 4>; + cap-sd-highspeed; + status = "disabled"; + }; + + sdhi1: sdhi@ee120000 { + compatible = "renesas,r8a7740-sdhi"; + reg = <0 0xee120000 0 0x100>; + interrupt-parent = <&gic>; + interrupts = <0 166 4>; + cap-sd-highspeed; + status = "disabled"; + }; + + sdhi2: sdhi@ee140000 { + compatible = "renesas,r8a7740-sdhi"; + reg = <0 0xee140000 0 0x100>; + interrupt-parent = <&gic>; + interrupts = <0 167 4>; + cap-sd-highspeed; + status = "disabled"; + }; }; diff --git a/arch/arm/mach-shmobile/board-ape6evm.c b/arch/arm/mach-shmobile/board-ape6evm.c index 5eb0caa..716f2f7 100644 --- a/arch/arm/mach-shmobile/board-ape6evm.c +++ b/arch/arm/mach-shmobile/board-ape6evm.c @@ -62,6 +62,23 @@ static const struct pinctrl_map ape6evm_pinctrl_map[] = { /* SMSC */ PIN_MAP_MUX_GROUP_DEFAULT("smsc911x", "pfc-r8a73a4", "irqc_irq40", "irqc"), + /* SDHI0: uSD: no WP */ + PIN_MAP_MUX_GROUP_DEFAULT("ee100000.sdhi", "pfc-r8a73a4", + "sdhi0_data4", "sdhi0"), + PIN_MAP_MUX_GROUP_DEFAULT("ee100000.sdhi", "pfc-r8a73a4", + "sdhi0_ctrl", "sdhi0"), + PIN_MAP_MUX_GROUP_DEFAULT("ee100000.sdhi", "pfc-r8a73a4", + "sdhi0_cd", "sdhi0"), + /* SDHI1 */ + PIN_MAP_MUX_GROUP_DEFAULT("ee120000.sdhi", "pfc-r8a73a4", + "sdhi1_data4", "sdhi1"), + PIN_MAP_MUX_GROUP_DEFAULT("ee120000.sdhi", "pfc-r8a73a4", + "sdhi1_ctrl", "sdhi1"), + /* MMCIF0 */ + PIN_MAP_MUX_GROUP_DEFAULT("ee200000.mmcif", "pfc-r8a73a4", + "mmc0_data8", "mmc0"), + PIN_MAP_MUX_GROUP_DEFAULT("ee200000.mmcif", "pfc-r8a73a4", + "mmc0_ctrl", "mmc0"), }; static void __init ape6evm_add_standard_devices(void)