From patchwork Thu Feb 13 04:30:27 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 3642481 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 44EA8BF13A for ; Thu, 13 Feb 2014 04:30:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5A9D820158 for ; Thu, 13 Feb 2014 04:30:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 76EE220154 for ; Thu, 13 Feb 2014 04:30:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751832AbaBMEa3 (ORCPT ); Wed, 12 Feb 2014 23:30:29 -0500 Received: from mail-pa0-f41.google.com ([209.85.220.41]:50375 "EHLO mail-pa0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751526AbaBMEa2 (ORCPT ); Wed, 12 Feb 2014 23:30:28 -0500 Received: by mail-pa0-f41.google.com with SMTP id fa1so10185043pad.14 for ; Wed, 12 Feb 2014 20:30:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:message-id:from:subject:user-agent:to:cc:in-reply-to :references:mime-version:content-type; bh=58TtZkY+62RWSV/JD5JuhKBsXV+GV4VN8EszR1HYlw8=; b=yMpg85homFpL69t9fiUy529/rClN0tkXC2oYEyAR56ZfjR/6YJzfFhguyJa6J+jIxG Tbe9sVgauU6ax+fyEkRYhe42WiAO92dFD1lATiNYb0vMG9/n3HfkdGq3Gpjio8ZbIHX/ U87IzxN+pj0RdVZnH3x5nrFDJ0LWjLe7gMiMGOw0qzpDHfkPQB3R5Kdn6qd3Gb0/elsu qcwNMyvkMpp5Vm1Ea5JpozAg/xMbC1y3mcZMvIJ+w72AUUGv0kwlCxAyqgfRJIMHqwS9 LMS7ZAKnxsLnCfwJ4P2fOItUeW/66C2Zu2K8IwMCni7yQLyzqJLgrMT9TyStOjx0TWUU W+oA== X-Received: by 10.68.130.202 with SMTP id og10mr55456146pbb.133.1392265828287; Wed, 12 Feb 2014 20:30:28 -0800 (PST) Received: from morimoto-Dell-XPS420.gmail.com (49.14.32.202.bf.2iij.net. [202.32.14.49]) by mx.google.com with ESMTPSA id iu7sm1565749pbc.45.2014.02.12.20.30.26 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 12 Feb 2014 20:30:27 -0800 (PST) Date: Wed, 12 Feb 2014 20:30:27 -0800 (PST) Message-ID: <87d2ird47z.wl%kuninori.morimoto.gx@gmail.com> From: Kuninori Morimoto Subject: [PATCH 2/2 v3] ARM: shmobile: lager: add SDHI0/2 support on DTS User-Agent: Wanderlust/2.14.0 Emacs/23.3 Mule/6.0 To: Simon Cc: Magnus , linux-sh@vger.kernel.org, Kuninori Morimoto In-Reply-To: <87fvnnd4aw.wl%kuninori.morimoto.gx@gmail.com> References: <87txcbba08.wl%kuninori.morimoto.gx@gmail.com> <87y51g97di.wl%kuninori.morimoto.gx@gmail.com> <87fvnnd4aw.wl%kuninori.morimoto.gx@gmail.com> MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") 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.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 From: Kuninori Morimoto Signed-off-by: Kuninori Morimoto --- v2 -> v3 - based on topic/r-car-sdhi - it is using cd-gpios to avoid pm-runtime issue arch/arm/boot/dts/r8a7790-lager.dts | 86 +++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) diff --git a/arch/arm/boot/dts/r8a7790-lager.dts b/arch/arm/boot/dts/r8a7790-lager.dts index 1081c5e..d66f073 100644 --- a/arch/arm/boot/dts/r8a7790-lager.dts +++ b/arch/arm/boot/dts/r8a7790-lager.dts @@ -56,6 +56,54 @@ regulator-boot-on; regulator-always-on; }; + + vcc_sdhi0: regulator@1 { + compatible = "regulator-fixed"; + + regulator-name = "SDHI0 Vcc"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + + gpio = <&gpio5 24 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>; + + gpios = <&gpio5 29 GPIO_ACTIVE_HIGH>; + gpios-states = <1>; + states = <3300000 1 + 1800000 0>; + }; + + vcc_sdhi2: regulator@3 { + compatible = "regulator-fixed"; + + regulator-name = "SDHI2 Vcc"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + + gpio = <&gpio5 25 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; + + vccq_sdhi2: regulator@4 { + compatible = "regulator-gpio"; + + regulator-name = "SDHI2 VccQ"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + + gpios = <&gpio5 30 GPIO_ACTIVE_HIGH>; + gpios-states = <1>; + states = <3300000 1 + 1800000 0>; + }; }; &extal_clk { @@ -76,6 +124,16 @@ renesas,function = "scif1"; }; + sdhi0_pins: sd0 { + renesas,gpios = "sdhi0_data4", "sdhi0_ctrl"; + renesas,function = "sdhi0"; + }; + + sdhi2_pins: sd2 { + renesas,gpios = "sdhi2_data4", "sdhi2_ctrl"; + renesas,function = "sdhi2"; + }; + mmc1_pins: mmc1 { renesas,groups = "mmc1_data8", "mmc1_ctrl"; renesas,function = "mmc1"; @@ -95,3 +153,31 @@ &sata1 { status = "okay"; }; + +&sdhi0 { + pinctrl-0 = <&sdhi0_pins>; + pinctrl-names = "default"; + + vmmc-supply = <&vcc_sdhi0>; + vqmmc-supply = <&vccq_sdhi0>; + cap-sd-highspeed; + cap-sdio-irq; + cap-power-off-card; + toshiba,mmc-wrprotect-disable; + cd-gpios = <&gpio3 6 GPIO_ACTIVE_LOW>; + status = "okay"; +}; + +&sdhi2 { + pinctrl-0 = <&sdhi2_pins>; + pinctrl-names = "default"; + + vmmc-supply = <&vcc_sdhi2>; + vqmmc-supply = <&vccq_sdhi2>; + cap-sd-highspeed; + cap-sdio-irq; + cap-power-off-card; + toshiba,mmc-wrprotect-disable; + cd-gpios = <&gpio3 22 GPIO_ACTIVE_LOW>; + status = "okay"; +};