From patchwork Tue Oct 6 23:05:41 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 7340591 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 6A7F7BEEA4 for ; Tue, 6 Oct 2015 23:05:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7EEFB2025B for ; Tue, 6 Oct 2015 23:05:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8AEBA20379 for ; Tue, 6 Oct 2015 23:05:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752993AbbJFXFq (ORCPT ); Tue, 6 Oct 2015 19:05:46 -0400 Received: from mail-la0-f52.google.com ([209.85.215.52]:35533 "EHLO mail-la0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752928AbbJFXFp (ORCPT ); Tue, 6 Oct 2015 19:05:45 -0400 Received: by lacdq7 with SMTP id dq7so185035lac.2 for ; Tue, 06 Oct 2015 16:05:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:mime-version:content-transfer-encoding:content-type; bh=e7fC3HSdvE4nRqTFRA18UyXKiMsUJ7MPiX50IrrHNto=; b=i4P4vB5WFTXEDAqxcPF0+vcP9LXlZkyrgB/JuD/8Scn8dT+o8d0DKbEio56jSd6b0u EsROaWQFstYgrruo+040lxLf5iJ9UDOwCpPExc1S6c7dNu3mhQJiP07gORBH6okWYjvX wx5IDbKJ1uPVEA6fPPKyl/3v6ntqLdr9gMSMgcgIe1XD8UDBanlmAL4wGDSeHx8sp1yW YL58gLVihbKak0dX264wRaxbrZdBXOk847HxCCNqnVFBpxyKjnH00NMNq07ddvRWzRuB 01NGIffnig2zZwa0zpsJSduwnJln5YyChezVJNqyYK6r6Unb9zvRmN9+q4crtyarxNhG dNeA== X-Gm-Message-State: ALoCoQnTHAYwy5i5qqh1oc4agLVo0rE3XxWok60usHz+7oTk5Ctz38+fsCLfeKPyg/OZThx6r4tY X-Received: by 10.25.168.16 with SMTP id r16mr10582960lfe.54.1444172743644; Tue, 06 Oct 2015 16:05:43 -0700 (PDT) Received: from wasted.cogentembedded.com (ppp18-102.pppoe.mtu-net.ru. [81.195.18.102]) by smtp.gmail.com with ESMTPSA id z204sm5752712lfd.1.2015.10.06.16.05.42 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Oct 2015 16:05:42 -0700 (PDT) From: Sergei Shtylyov To: horms@verge.net.au, linux-sh@vger.kernel.org, devicetree@vger.kernel.org, robh+dt@kernel.org, pawel.moll@arm.com, mark.rutland@arm.com, ijc+devicetree@hellion.org.uk, galak@codeaurora.org Cc: magnus.damm@gmail.com, linux@arm.linux.org.uk, linux-arm-kernel@lists.infradead.org Subject: [PATCH] ARM: shmobile: porter: add SDHI0/2 DT support Date: Wed, 07 Oct 2015 02:05:41 +0300 Message-ID: <2228837.DO5U5OvRSi@wasted.cogentembedded.com> Organization: Cogent Embedded Inc. User-Agent: KMail/4.14.9 (Linux/4.1.7-100.fc21.x86_64; KDE/4.14.9; x86_64; ; ) MIME-Version: 1.0 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_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 Porter 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... This patch is analogous to the commit 1299df03d719 (ARM: shmobile: henninger: add SDHI0/2 DT support) as there are no differences between those boards in this respect. Signed-off-by: Sergei Shtylyov --- This patch is against the 'renesas-devel-20151006-v4.3-rc4' tag of Simon Horman's 'renesas.git' repo. arch/arm/boot/dts/r8a7791-porter.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-porter.dts =================================================================== --- renesas.orig/arch/arm/boot/dts/r8a7791-porter.dts +++ renesas/arch/arm/boot/dts/r8a7791-porter.dts @@ -10,6 +10,7 @@ /dts-v1/; #include "r8a7791.dtsi" +#include / { model = "Porter"; @@ -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 { @@ -78,3 +133,24 @@ micrel,led-mode = <1>; }; }; + +&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"; +};