From patchwork Fri Sep 27 08:02:57 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guennadi Liakhovetski X-Patchwork-Id: 2953141 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 D6DE79F288 for ; Fri, 27 Sep 2013 08:03:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2474820340 for ; Fri, 27 Sep 2013 08:03:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6D6E020336 for ; Fri, 27 Sep 2013 08:03:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752733Ab3I0IDH (ORCPT ); Fri, 27 Sep 2013 04:03:07 -0400 Received: from moutng.kundenserver.de ([212.227.17.10]:59746 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750852Ab3I0IDF (ORCPT ); Fri, 27 Sep 2013 04:03:05 -0400 Received: from axis700.grange (dslb-088-076-066-176.pools.arcor-ip.net [88.76.66.176]) by mrelayeu.kundenserver.de (node=mrbap0) with ESMTP (Nemesis) id 0Ldbog-1W879f3Wwk-00j3sS; Fri, 27 Sep 2013 10:02:58 +0200 Received: by axis700.grange (Postfix, from userid 1000) id 72B5440BB4; Fri, 27 Sep 2013 10:02:57 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by axis700.grange (Postfix) with ESMTP id 6694F40BB3; Fri, 27 Sep 2013 10:02:57 +0200 (CEST) Date: Fri, 27 Sep 2013 10:02:57 +0200 (CEST) From: Guennadi Liakhovetski X-X-Sender: lyakh@axis700.grange To: linux-sh@vger.kernel.org cc: Magnus Damm , Simon Horman , devicetree@vger.kernel.org, Laurent Pinchart Subject: [PATCH v6] ARM: shmobile: armadillo800eva-reference: add SDHI and MMCIF interfaces Message-ID: MIME-Version: 1.0 X-Provags-ID: V02:K0:yGzc4/O7b9Gnbm1nBl0idATx6RPE5kiNWRkRTJCX3PH 7aZPbiMr0DBKQuzbaUXV+L/61s4JrNFoIn2VBqke0Lf3IJUj+v 0fTso5VPIImMXTjcuN8KACV3C2wllio8L4n1cpIewAjIL0G2j4 DxWKAygzlTQ7pmIz8SPwQWp6QERlQ+R8/cubnSejeyOVoQ713z RtlB+oyDAK5bd6B7jGdg4Uv5cPXbg78UIy/8qXCSowhhU7+V01 zdW/Ykil2NIHoAz0P+2e1b1a8j1f8qdrQmArur2AadFiTAygcm SuqpwezWRV2Xn8vyLDWf9Yyzpgc7Lfw+29MpTJJozXVmIHj0VF TfHT4SgI6ja2aImTMJJz6bdebR3VzNbODvEjTnN+ljOuwNxCQ2 0MCHMfbzpvldQ== Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-9.3 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 SDHI0 and MMCIF interfaces to armadillo800eva-reference with regulators and pin configurations. SDHI1 is not added yet, because the switch, that connects the interface either to an SD slot or to a WiFi SDIO card cannot be described in DT yet. Signed-off-by: Guennadi Liakhovetski Acked-by: Laurent Pinchart --- v6: specify a CD GPIO for SDHI0 .../boot/dts/r8a7740-armadillo800eva-reference.dts | 58 ++++++++++++++++++++ arch/arm/boot/dts/r8a7740.dtsi | 33 +++++++++++ 2 files changed, 91 insertions(+), 0 deletions(-) diff --git a/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts b/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts index 8b2aab5..1c56c5e 100644 --- a/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts +++ b/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts @@ -35,6 +35,33 @@ regulator-boot-on; }; + vcc_sdhi0: regulator@1 { + compatible = "regulator-fixed"; + + regulator-name = "SDHI0 Vcc"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + + gpio = <&pfc 75 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; + + vccq_sdhi0: regulator@2 { + compatible = "regulator-gpio"; + + regulator-name = "SDHI0 VccQ"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + vin-supply = <&vcc_sdhi0>; + + enable-gpio = <&pfc 74 GPIO_ACTIVE_HIGH>; + gpios = <&pfc 17 GPIO_ACTIVE_HIGH>; + states = <3300000 0 + 1800000 1>; + + enable-active-high; + }; + leds { compatible = "gpio-leds"; led1 { @@ -92,8 +119,39 @@ renesas,groups = "tpu0_to2_1"; renesas,function = "tpu0"; }; + + mmc0_pins: mmc0 { + renesas,groups = "mmc0_data8_1", "mmc0_ctrl_1"; + renesas,function = "mmc0"; + }; + + sdhi0_pins: sdhi0 { + renesas,groups = "sdhi0_data4", "sdhi0_ctrl", "sdhi0_wp"; + renesas,function = "sdhi0"; + }; }; &tpu { status = "okay"; }; + +&mmcif0 { + pinctrl-0 = <&mmc0_pins>; + pinctrl-names = "default"; + + vmmc-supply = <®_3p3v>; + bus-width = <8>; + non-removable; + status = "okay"; +}; + +&sdhi0 { + pinctrl-0 = <&sdhi0_pins>; + pinctrl-names = "default"; + + vmmc-supply = <&vcc_sdhi0>; + vqmmc-supply = <&vccq_sdhi0>; + bus-width = <4>; + cd-gpios = <&pfc 167 GPIO_ACTIVE_LOW>; + status = "okay"; +}; diff --git a/arch/arm/boot/dts/r8a7740.dtsi b/arch/arm/boot/dts/r8a7740.dtsi index 868bdde..ae1e230 100644 --- a/arch/arm/boot/dts/r8a7740.dtsi +++ b/arch/arm/boot/dts/r8a7740.dtsi @@ -161,4 +161,37 @@ status = "disabled"; #pwm-cells = <3>; }; + + mmcif0: mmcif@e6bd0000 { + compatible = "renesas,sh-mmcif"; + reg = <0xe6bd0000 0x100>; + interrupt-parent = <&gic>; + interrupts = <0 56 4 + 0 57 4>; + status = "disabled"; + }; + + sdhi0: sdhi@e6850000 { + compatible = "renesas,sdhi-r8a7740"; + reg = <0xe6850000 0x100>; + interrupt-parent = <&gic>; + interrupts = <0 117 4 + 0 118 4 + 0 119 4>; + cap-sd-highspeed; + cap-sdio-irq; + status = "disabled"; + }; + + sdhi1: sdhi@e6860000 { + compatible = "renesas,sdhi-r8a7740"; + reg = <0xe6860000 0x100>; + interrupt-parent = <&gic>; + interrupts = <0 121 4 + 0 122 4 + 0 123 4>; + cap-sd-highspeed; + cap-sdio-irq; + status = "disabled"; + }; };