From patchwork Sat May 3 17:04:34 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 4106241 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 A3350BFF02 for ; Sat, 3 May 2014 17:04:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C4B752034C for ; Sat, 3 May 2014 17:04:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BCF9C20295 for ; Sat, 3 May 2014 17:04:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753142AbaECREf (ORCPT ); Sat, 3 May 2014 13:04:35 -0400 Received: from mail-lb0-f174.google.com ([209.85.217.174]:56374 "EHLO mail-lb0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752218AbaECREe (ORCPT ); Sat, 3 May 2014 13:04:34 -0400 Received: by mail-lb0-f174.google.com with SMTP id n15so2168316lbi.5 for ; Sat, 03 May 2014 10:04:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:to:subject:cc:from:organization:date :mime-version:content-type:content-transfer-encoding:message-id; bh=2qMlV7esAX/4bfg7hl/CRE77K/WNuMUSin3ydsP7qtw=; b=kYgBpCeRknl2Q5ZNCXddkG3+CfgcuXv+m9DlFxEPVd3uR60k0jvlOgL92x9ryVJUNP YMoA0MgwbnuTbOodKAVupBA78moVeRbj6fuZI+E2DWLeFY2d6DQaiBqx/lKElhyzzsb3 xdKpSOGpVpRWeNTldDyvrh05/4XXvRBBCryZIuX+jSwrHQAHw01rKgL0kCUueA9usDpc HxNroXkf3bSQGtef5AxdiyQdcNQDKIUVt3FEcU4VUy6I1aw6ngcDGjOSJXt8jF6uRqEA af/0n0ys5teZ53R4ShckN0RIZX6y0gSBVx2HXo1+xm4OumRlKVZDJVyFRiSPy4o+tGr/ mhtA== X-Gm-Message-State: ALoCoQmkjAyUXJUjfMudUUnkr4XCVxAgKotBfCV8z2FR9jhpm1gmsPI19ZIa7STd84WqRkNTTWIr X-Received: by 10.112.146.234 with SMTP id tf10mr17504609lbb.1.1399136673056; Sat, 03 May 2014 10:04:33 -0700 (PDT) Received: from wasted.cogentembedded.com (ppp83-237-59-135.pppoe.mtu-net.ru. [83.237.59.135]) by mx.google.com with ESMTPSA id jh4sm3023124lbb.26.2014.05.03.10.04.31 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Sat, 03 May 2014 10:04:32 -0700 (PDT) To: horms@verge.net.au, linux-sh@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH] ARM: shmobile: henninger: add SDHI0/2 DT support Cc: robh+dt@kernel.org, pawel.moll@arm.com, mark.rutland@arm.com, ijc+devicetree@hellion.org.uk, galak@codeaurora.org, magnus.damm@gmail.com, linux@arm.linux.org.uk, linux-arm-kernel@lists.infradead.org From: Sergei Shtylyov Organization: Cogent Embedded Date: Sat, 3 May 2014 21:04:34 +0400 MIME-Version: 1.0 Message-Id: <201405032104.35276.sergei.shtylyov@cogentembedded.com> 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.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 Define the Henninger board dependent part of the SDHI0/2 device nodes along with the necessary voltage regulators (note that the Vcc regulators are dummy -- they are required but don't actually exist on the board). Also, GPIOs have to be used for the CD and WP signals due to the SDHI driver constraints... Signed-off-by: Sergei Shtylyov --- This patch is against 'renesas-devel-v3.15-rc3-20140502' tag of Simon Horman's 'renesas.git' repo. arch/arm/boot/dts/r8a7791-henninger.dts | 76 ++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: renesas/arch/arm/boot/dts/r8a7791-henninger.dts =================================================================== --- renesas.orig/arch/arm/boot/dts/r8a7791-henninger.dts +++ renesas/arch/arm/boot/dts/r8a7791-henninger.dts @@ -11,6 +11,7 @@ /dts-v1/; #include "r8a7791.dtsi" +#include / { model = "Henninger"; @@ -33,6 +34,50 @@ device_type = "memory"; reg = <2 0x00000000 0 0x40000000>; }; + + vcc_sdhi0: regulator@0 { + compatible = "regulator-fixed"; + + regulator-name = "SDHI0 Vcc"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + }; + + vccq_sdhi0: regulator@1 { + compatible = "regulator-gpio"; + + regulator-name = "SDHI0 VccQ"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + + gpios = <&gpio2 12 GPIO_ACTIVE_HIGH>; + gpios-states = <1>; + states = <3300000 1 + 1800000 0>; + }; + + vcc_sdhi2: regulator@2 { + compatible = "regulator-fixed"; + + regulator-name = "SDHI2 Vcc"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + }; + + vccq_sdhi2: regulator@3 { + compatible = "regulator-gpio"; + + regulator-name = "SDHI2 VccQ"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + + gpios = <&gpio2 26 GPIO_ACTIVE_HIGH>; + gpios-states = <1>; + states = <3300000 1 + 1800000 0>; + }; }; &extal_clk { @@ -54,6 +99,16 @@ renesas,groups = "intc_irq0"; renesas,function = "intc"; }; + + sdhi0_pins: sd0 { + renesas,groups = "sdhi0_data4", "sdhi0_ctrl"; + renesas,function = "sdhi0"; + }; + + sdhi2_pins: sd2 { + renesas,groups = "sdhi2_data4", "sdhi2_ctrl"; + renesas,function = "sdhi2"; + }; }; &scif0 { @@ -82,3 +137,24 @@ &sata0 { status = "okay"; }; + +&sdhi0 { + pinctrl-0 = <&sdhi0_pins>; + pinctrl-names = "default"; + + vmmc-supply = <&vcc_sdhi0>; + vqmmc-supply = <&vccq_sdhi0>; + cd-gpios = <&gpio6 6 GPIO_ACTIVE_LOW>; + wp-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>; + status = "okay"; +}; + +&sdhi2 { + pinctrl-0 = <&sdhi2_pins>; + pinctrl-names = "default"; + + vmmc-supply = <&vcc_sdhi2>; + vqmmc-supply = <&vccq_sdhi2>; + cd-gpios = <&gpio6 22 GPIO_ACTIVE_LOW>; + status = "okay"; +};