From patchwork Sat Dec 14 21:58:15 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 3349541 Return-Path: X-Original-To: patchwork-linux-mmc@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 DDBA3C0D4A for ; Sat, 14 Dec 2013 21:59:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0EF0320720 for ; Sat, 14 Dec 2013 21:59:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 13509205B1 for ; Sat, 14 Dec 2013 21:59:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754274Ab3LNV67 (ORCPT ); Sat, 14 Dec 2013 16:58:59 -0500 Received: from mx1.redhat.com ([209.132.183.28]:32027 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754269Ab3LNV66 (ORCPT ); Sat, 14 Dec 2013 16:58:58 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rBELwVBt000355 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 14 Dec 2013 16:58:32 -0500 Received: from shalem.localdomain.com (vpn1-5-118.ams2.redhat.com [10.36.5.118]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id rBELwGvj006189; Sat, 14 Dec 2013 16:58:28 -0500 From: Hans de Goede To: Chris Ball , Maxime Ripard Cc: =?UTF-8?q?David=20Lanzend=C3=B6rfer?= , linux-mmc@vger.kernel.org, devicetree@vger.kernel.org, linux-sunxi@googlegroups.com, linux-arm-kernel@lists.infradead.org, Hans de Goede Subject: [PATCH 5/5] ARM: dts: sun7i: Add support for mmc Date: Sat, 14 Dec 2013 22:58:15 +0100 Message-Id: <1387058295-20641-6-git-send-email-hdegoede@redhat.com> In-Reply-To: <1387058295-20641-1-git-send-email-hdegoede@redhat.com> References: <1387058295-20641-1-git-send-email-hdegoede@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Spam-Status: No, score=-7.3 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 Signed-off-by: Hans de Goede --- arch/arm/boot/dts/sun7i-a20-cubieboard2.dts | 16 ++++++++++++ arch/arm/boot/dts/sun7i-a20-cubietruck.dts | 16 ++++++++++++ arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts | 32 +++++++++++++++++++++++ arch/arm/boot/dts/sun7i-a20.dtsi | 34 +++++++++++++++++++++++++ 4 files changed, 98 insertions(+) diff --git a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts index 5c51cb8..6aef299 100644 --- a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts +++ b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts @@ -34,7 +34,23 @@ }; }; + sdc0: sdc@01c0f000 { + pinctrl-names = "default"; + pinctrl-0 = <&sdc0_pins_a>; + pinctrl-1 = <&mmc0_cd_pin_cubieboard2>; + cd-gpios = <&pio 7 1 0>; /* PH1 */ + cd-mode = <1>; + status = "okay"; + }; + pinctrl@01c20800 { + mmc0_cd_pin_cubieboard2: mmc0_cd_pin@0 { + allwinner,pins = "PH1"; + allwinner,function = "gpio_in"; + allwinner,drive = <0>; + allwinner,pull = <0>; + }; + led_pins_cubieboard2: led_pins@0 { allwinner,pins = "PH20", "PH21"; allwinner,function = "gpio_out"; diff --git a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts index 8a1009d..302c785 100644 --- a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts +++ b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts @@ -19,7 +19,23 @@ compatible = "cubietech,cubietruck", "allwinner,sun7i-a20"; soc@01c00000 { + sdc0: sdc@01c0f000 { + pinctrl-names = "default"; + pinctrl-0 = <&sdc0_pins_a>; + pinctrl-1 = <&mmc0_cd_pin_cubietruck>; + cd-gpios = <&pio 7 1 0>; /* PH1 */ + cd-mode = <1>; + status = "okay"; + }; + pinctrl@01c20800 { + mmc0_cd_pin_cubietruck: mmc0_cd_pin@0 { + allwinner,pins = "PH1"; + allwinner,function = "gpio_in"; + allwinner,drive = <0>; + allwinner,pull = <0>; + }; + led_pins_cubietruck: led_pins@0 { allwinner,pins = "PH7", "PH11", "PH20", "PH21"; allwinner,function = "gpio_out"; diff --git a/arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts b/arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts index ead3013..f271db9 100644 --- a/arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts +++ b/arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts @@ -34,7 +34,39 @@ }; }; + sdc0: sdc@01c0f000 { + pinctrl-names = "default"; + pinctrl-0 = <&sdc0_pins_a>; + pinctrl-1 = <&mmc0_cd_pin_olinuxinom>; + cd-gpios = <&pio 7 1 0>; /* PH1 */ + cd-mode = <1>; + status = "okay"; + }; + + sdc3: sdc@01c12000 { + pinctrl-names = "default"; + pinctrl-0 = <&sdc3_pins_a>; + pinctrl-1 = <&mmc3_cd_pin_olinuxinom>; + cd-gpios = <&pio 7 11 0>; /* PH11 */ + cd-mode = <1>; + status = "okay"; + }; + pinctrl@01c20800 { + mmc0_cd_pin_olinuxinom: mmc0_cd_pin@0 { + allwinner,pins = "PH1"; + allwinner,function = "gpio_in"; + allwinner,drive = <0>; + allwinner,pull = <0>; + }; + + 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 0552a64..4416cac 100644 --- a/arch/arm/boot/dts/sun7i-a20.dtsi +++ b/arch/arm/boot/dts/sun7i-a20.dtsi @@ -303,6 +303,26 @@ #size-cells = <0>; }; + sdc0: sdc@01c0f000 { + compatible = "allwinner,sun5i-mmc"; + reg = <0x01c0f000 0x1000>; + clocks = <&ahb_gates 8>, <&mmc0>; + clock-names = "ahb", "mod"; + interrupts = <0 32 4>; + bus-width = <4>; + status = "disabled"; + }; + + sdc3: sdc@01c12000 { + compatible = "allwinner,sun5i-mmc"; + reg = <0x01c12000 0x1000>; + clocks = <&ahb_gates 11>, <&mmc3>; + clock-names = "ahb", "mod"; + interrupts = <0 35 4>; + bus-width = <4>; + status = "disabled"; + }; + pio: pinctrl@01c20800 { compatible = "allwinner,sun7i-a20-pinctrl"; reg = <0x01c20800 0x400>; @@ -366,6 +386,20 @@ allwinner,drive = <0>; allwinner,pull = <0>; }; + + sdc0_pins_a: sdc0@0 { + allwinner,pins = "PF0","PF1","PF2","PF3","PF4","PF5"; + allwinner,function = "mmc0"; + allwinner,drive = <3>; + allwinner,pull = <1>; + }; + + sdc3_pins_a: sdc3@0 { + allwinner,pins = "PI4","PI5","PI6","PI7","PI8","PI9"; + allwinner,function = "mmc3"; + allwinner,drive = <3>; + allwinner,pull = <1>; + }; }; timer@01c20c00 {