From patchwork Fri Feb 7 21:33:30 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?David_Lanzend=C3=B6rfer?= X-Patchwork-Id: 318288 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Received: from casper.infradead.org (unknown [IPv6:2001:770:15f::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 964B52C0091 for ; Sat, 8 Feb 2014 08:42:13 +1100 (EST) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WBt8o-0003H1-OW; Fri, 07 Feb 2014 21:39:19 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WBt3n-0000Uk-UI; Fri, 07 Feb 2014 21:34:07 +0000 Received: from kolab.o2s.ch ([2001:1620:2081::4]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WBt3c-0000Pm-8c for linux-arm-kernel@lists.infradead.org; Fri, 07 Feb 2014 21:33:57 +0000 Received: from localhost (localhost [127.0.0.1]) by kolab.o2s.ch (Postfix) with ESMTP id 7963876CE6; Fri, 7 Feb 2014 22:36:56 +0100 (CET) X-Virus-Scanned: amavisd-new at example.com Received: from kolab.o2s.ch ([127.0.0.1]) by localhost (kolab.o2s.ch [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id IGVag02DHh7m; Fri, 7 Feb 2014 22:36:55 +0100 (CET) Received: from dizzy-6.o2s.ch (unknown [IPv6:2001:470:26:484:6ef0:49ff:fee6:8dca]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by kolab.o2s.ch (Postfix) with ESMTPSA id D796476CE3; Fri, 7 Feb 2014 22:36:53 +0100 (CET) Subject: [PATCH v4 5/7] ARM: dts: sun7i: Add support for mmc To: devicetree@vger.kernel.org, Ulf Hansson , Laurent Pinchart , Mike Turquette , Simon Baatz , Hans de Goede , Emilio =?utf-8?b?TMOzcGV6?= , linux-mmc@vger.kernel.org, Chris Ball , linux-kernel@vger.kernel.org, H Hartley Sweeten , linux-sunxi@googlegroups.com, Tejun Heo , Maxime Ripard , Guennadi Liakhovetski , linux-arm-kernel@lists.infradead.org From: David =?utf-8?q?Lanzend=C3=B6rfer?= Date: Fri, 07 Feb 2014 22:33:30 +0100 Message-ID: <20140207213330.24624.28098.stgit@dizzy-6.o2s.ch> In-Reply-To: <20140207212709.24624.58619.stgit@dizzy-6.o2s.ch> References: <20140207212709.24624.58619.stgit@dizzy-6.o2s.ch> User-Agent: StGit/0.16 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140207_163356_511612_3095AF43 X-CRM114-Status: GOOD ( 10.37 ) X-Spam-Score: -2.4 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.4 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 KHOP_BIG_TO_CC Sent to 10+ recipients instaed of Bcc or a list -0.6 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org Signed-off-by: David Lanzendörfer Signed-off-by: Hans de Goede --- arch/arm/boot/dts/sun7i-a20-cubieboard2.dts | 8 +++ arch/arm/boot/dts/sun7i-a20-cubietruck.dts | 8 +++ arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts | 23 +++++++++ arch/arm/boot/dts/sun7i-a20.dtsi | 61 +++++++++++++++++++++++ 4 files changed, 100 insertions(+) diff --git a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts index 5c51cb8..ae800b6 100644 --- a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts +++ b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts @@ -34,6 +34,14 @@ }; }; + mmc0: mmc@01c0f000 { + pinctrl-names = "default", "default"; + pinctrl-0 = <&mmc0_pins_a>; + pinctrl-1 = <&mmc0_cd_pin_reference_design>; + cd-gpios = <&pio 7 1 0>; /* PH1 */ + status = "okay"; + }; + pinctrl@01c20800 { led_pins_cubieboard2: led_pins@0 { allwinner,pins = "PH20", "PH21"; diff --git a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts index f9dcb61..370cef84 100644 --- a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts +++ b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts @@ -19,6 +19,14 @@ compatible = "cubietech,cubietruck", "allwinner,sun7i-a20"; soc@01c00000 { + mmc0: mmc@01c0f000 { + pinctrl-names = "default", "default"; + pinctrl-0 = <&mmc0_pins_a>; + pinctrl-1 = <&mmc0_cd_pin_reference_design>; + cd-gpios = <&pio 7 1 0>; /* PH1 */ + status = "okay"; + }; + pinctrl@01c20800 { led_pins_cubietruck: led_pins@0 { allwinner,pins = "PH7", "PH11", "PH20", "PH21"; diff --git a/arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts b/arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts index ead3013..46dbe5b 100644 --- a/arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts +++ b/arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts @@ -34,7 +34,30 @@ }; }; + mmc0: mmc@01c0f000 { + pinctrl-names = "default", "default"; + pinctrl-0 = <&mmc0_pins_a>; + pinctrl-1 = <&mmc0_cd_pin_reference_design>; + cd-gpios = <&pio 7 1 0>; /* PH1 */ + status = "okay"; + }; + + mmc3: mmc@01c12000 { + pinctrl-names = "default", "default"; + pinctrl-0 = <&mmc3_pins_a>; + pinctrl-1 = <&mmc3_cd_pin_olinuxinom>; + cd-gpios = <&pio 7 11 0>; /* PH11 */ + status = "okay"; + }; + pinctrl@01c20800 { + mmc3_cd_pin_olinuxinom: mmc3_cd_pin@0 { + allwinner,pins = "PH11"; + allwinner,function = "gpio_in"; + allwinner,drive = <0>; + allwinner,pull = <0>; + }; + led_pins_olinuxino: led_pins@0 { allwinner,pins = "PH2"; allwinner,function = "gpio_out"; diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi b/arch/arm/boot/dts/sun7i-a20.dtsi index 119f066..4cd6210 100644 --- a/arch/arm/boot/dts/sun7i-a20.dtsi +++ b/arch/arm/boot/dts/sun7i-a20.dtsi @@ -355,6 +355,46 @@ #size-cells = <0>; }; + mmc0: mmc@01c0f000 { + compatible = "allwinner,sun5i-a13-mmc"; + reg = <0x01c0f000 0x1000>; + clocks = <&ahb_gates 8>, <&mmc0_clk>; + clock-names = "ahb", "mod"; + interrupts = <0 32 4>; + bus-width = <4>; + status = "disabled"; + }; + + mmc1: mmc@01c10000 { + compatible = "allwinner,sun5i-a13-mmc"; + reg = <0x01c10000 0x1000>; + clocks = <&ahb_gates 9>, <&mmc1_clk>; + clock-names = "ahb", "mod"; + interrupts = <0 33 4>; + bus-width = <4>; + status = "disabled"; + }; + + mmc2: mmc@01c11000 { + compatible = "allwinner,sun5i-a13-mmc"; + reg = <0x01c11000 0x1000>; + clocks = <&ahb_gates 10>, <&mmc2_clk>; + clock-names = "ahb", "mod"; + interrupts = <0 34 4>; + bus-width = <4>; + status = "disabled"; + }; + + mmc3: mmc@01c12000 { + compatible = "allwinner,sun5i-a13-mmc"; + reg = <0x01c12000 0x1000>; + clocks = <&ahb_gates 11>, <&mmc3_clk>; + clock-names = "ahb", "mod"; + interrupts = <0 35 4>; + bus-width = <4>; + status = "disabled"; + }; + pio: pinctrl@01c20800 { compatible = "allwinner,sun7i-a20-pinctrl"; reg = <0x01c20800 0x400>; @@ -432,6 +472,27 @@ allwinner,drive = <0>; allwinner,pull = <0>; }; + + mmc0_pins_a: mmc0@0 { + allwinner,pins = "PF0","PF1","PF2","PF3","PF4","PF5"; + allwinner,function = "mmc0"; + allwinner,drive = <3>; + allwinner,pull = <0>; + }; + + mmc0_cd_pin_reference_design: mmc0_cd_pin@0 { + allwinner,pins = "PH1"; + allwinner,function = "gpio_in"; + allwinner,drive = <0>; + allwinner,pull = <0>; + }; + + mmc3_pins_a: mmc3@0 { + allwinner,pins = "PI4","PI5","PI6","PI7","PI8","PI9"; + allwinner,function = "mmc3"; + allwinner,drive = <3>; + allwinner,pull = <0>; + }; }; timer@01c20c00 {