From patchwork Thu Sep 26 17:43:16 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guennadi Liakhovetski X-Patchwork-Id: 2949911 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 E9253BFF0B for ; Thu, 26 Sep 2013 17:43:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B9487201F7 for ; Thu, 26 Sep 2013 17:43:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 02A16201F2 for ; Thu, 26 Sep 2013 17:43:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751446Ab3IZRnZ (ORCPT ); Thu, 26 Sep 2013 13:43:25 -0400 Received: from moutng.kundenserver.de ([212.227.126.171]:60530 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751080Ab3IZRnY (ORCPT ); Thu, 26 Sep 2013 13:43:24 -0400 Received: from axis700.grange (dslb-094-221-123-102.pools.arcor-ip.net [94.221.123.102]) by mrelayeu.kundenserver.de (node=mrbap1) with ESMTP (Nemesis) id 0Ldbso-1W7tnq232g-00iGm3; Thu, 26 Sep 2013 19:43:16 +0200 Received: by axis700.grange (Postfix, from userid 1000) id 19DC740BB4; Thu, 26 Sep 2013 19:43:16 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by axis700.grange (Postfix) with ESMTP id 16DF640BB3; Thu, 26 Sep 2013 19:43:16 +0200 (CEST) Date: Thu, 26 Sep 2013 19:43:16 +0200 (CEST) From: Guennadi Liakhovetski X-X-Sender: lyakh@axis700.grange To: linux-sh@vger.kernel.org cc: Magnus Damm , Simon Horman , Laurent Pinchart , devicetree@vger.kernel.org Subject: [PATCH v5] ARM: shmobile: armadillo800eva-reference: add SDHI and MMCIF interfaces Message-ID: MIME-Version: 1.0 X-Provags-ID: V02:K0:BxODSeP4RHlHf1z+X4XDgrse4OBfRs+i0nQ5DMn7hDW eL/KZb/JdhhbI5jZE/bvJxQl29ynlak8SB2IFEYAl4sSaDFHO7 p6DCMTIKj0pRYturnqoddPtooGsWzmCx0IxlwUSDabY4KPTkOr kNYZB70+xLJr39zLt2YR+k9kzg/nBpDV3jq+fw1/zaDmuVfP4I fmClL2gFTM3+lR3VSJcKkI1GtOxOrqxkAyThy/jfh5HtgvPahe B5kxGP16Sd0iQZkiJqQIsfUWiHsI5f7OJ3JYtZ5AHTR9FR/19S aevsFq+ieL4lrbON43xGbALO6+0ynZoCuXAj1gTFT0RQR9h0dG T6lOiLXXbMIovbvP9213P6ul+nVvhZiyf9AATUO6PuoTbBCEOw m6xkP6aDr05DA== 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 --- v5: remove SDHI1 until we can properly handle the WiFi / card slot switch. .../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..ea2992a 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>; + broken-cd; + 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"; + }; };