From patchwork Sat Dec 14 21:58:14 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: 3349571 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 14B399F2A9 for ; Sat, 14 Dec 2013 22:01:05 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 22C4D200FF for ; Sat, 14 Dec 2013 22:01:04 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1F6CA200F4 for ; Sat, 14 Dec 2013 22:01:03 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VrxFO-0004Df-EW; Sat, 14 Dec 2013 21:59:43 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VrxF4-0007NX-Gq; Sat, 14 Dec 2013 21:59:22 +0000 Received: from mx1.redhat.com ([209.132.183.28]) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VrxEX-0007K5-Kd for linux-arm-kernel@lists.infradead.org; Sat, 14 Dec 2013 21:58:52 +0000 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 rBELwSCK028523 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 14 Dec 2013 16:58:28 -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 rBELwGvi006189; Sat, 14 Dec 2013 16:58:26 -0500 From: Hans de Goede To: Chris Ball , Maxime Ripard Subject: [PATCH 4/5] ARM: dts: sun5i: add mmc support Date: Sat, 14 Dec 2013 22:58:14 +0100 Message-Id: <1387058295-20641-5-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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131214_165849_896242_3C39E72D X-CRM114-Status: UNSURE ( 8.94 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -7.3 (-------) Cc: devicetree@vger.kernel.org, linux-mmc@vger.kernel.org, Hans de Goede , linux-sunxi@googlegroups.com, =?UTF-8?q?David=20Lanzend=C3=B6rfer?= , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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/sun5i-a10s-olinuxino-micro.dts | 32 ++++++++++++++++++++++ arch/arm/boot/dts/sun5i-a10s.dtsi | 34 ++++++++++++++++++++++++ arch/arm/boot/dts/sun5i-a13-olinuxino-micro.dts | 16 +++++++++++ arch/arm/boot/dts/sun5i-a13-olinuxino.dts | 16 +++++++++++ arch/arm/boot/dts/sun5i-a13.dtsi | 17 ++++++++++++ 5 files changed, 115 insertions(+) diff --git a/arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts b/arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts index 3c9f8b3..e53fb12 100644 --- a/arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts +++ b/arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts @@ -34,7 +34,39 @@ }; }; + sdc0: sdc@01c0f000 { + pinctrl-names = "default"; + pinctrl-0 = <&sdc0_pins_a>; + pinctrl-1 = <&mmc0_cd_pin_olinuxino_micro>; + cd-gpios = <&pio 6 1 0>; /* PG1 */ + cd-mode = <1>; + status = "okay"; + }; + + sdc1: sdc@01c10000 { + pinctrl-names = "default"; + pinctrl-0 = <&sdc1_pins_a>; + pinctrl-1 = <&mmc1_cd_pin_olinuxino_micro>; + cd-gpios = <&pio 6 13 0>; /* PG13 */ + cd-mode = <1>; + status = "okay"; + }; + pinctrl@01c20800 { + mmc0_cd_pin_olinuxino_micro: mmc0_cd_pin@0 { + allwinner,pins = "PG1"; + allwinner,function = "gpio_in"; + allwinner,drive = <0>; + allwinner,pull = <0>; + }; + + mmc1_cd_pin_olinuxino_micro: mmc1_cd_pin@0 { + allwinner,pins = "PG13"; + allwinner,function = "gpio_in"; + allwinner,drive = <0>; + allwinner,pull = <0>; + }; + led_pins_olinuxino: led_pins@0 { allwinner,pins = "PE3"; allwinner,function = "gpio_out"; diff --git a/arch/arm/boot/dts/sun5i-a10s.dtsi b/arch/arm/boot/dts/sun5i-a10s.dtsi index 83e183c..fdbc290 100644 --- a/arch/arm/boot/dts/sun5i-a10s.dtsi +++ b/arch/arm/boot/dts/sun5i-a10s.dtsi @@ -274,6 +274,26 @@ #size-cells = <0>; }; + sdc0: sdc@01c0f000 { + compatible = "allwinner,sun5i-mmc"; + reg = <0x01c0f000 0x1000>; + clocks = <&ahb_gates 8>, <&mmc0>; + clock-names = "ahb", "mod"; + interrupts = <32>; + bus-width = <4>; + status = "disabled"; + }; + + sdc1: sdc@01c10000 { + compatible = "allwinner,sun5i-mmc"; + reg = <0x01c10000 0x1000>; + clocks = <&ahb_gates 9>, <&mmc1>; + clock-names = "ahb", "mod"; + interrupts = <33>; + bus-width = <4>; + status = "disabled"; + }; + intc: interrupt-controller@01c20400 { compatible = "allwinner,sun4i-ic"; reg = <0x01c20400 0x400>; @@ -344,6 +364,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>; + }; + + sdc1_pins_a: sdc1@0 { + allwinner,pins = "PG3","PG4","PG5","PG6","PG7","PG8"; + allwinner,function = "mmc1"; + allwinner,drive = <3>; + allwinner,pull = <1>; + }; }; timer@01c20c00 { diff --git a/arch/arm/boot/dts/sun5i-a13-olinuxino-micro.dts b/arch/arm/boot/dts/sun5i-a13-olinuxino-micro.dts index 26df7e8..247cd79 100644 --- a/arch/arm/boot/dts/sun5i-a13-olinuxino-micro.dts +++ b/arch/arm/boot/dts/sun5i-a13-olinuxino-micro.dts @@ -19,7 +19,23 @@ compatible = "olimex,a13-olinuxino-micro", "allwinner,sun5i-a13"; soc@01c00000 { + sdc0: sdc@01c0f000 { + pinctrl-names = "default"; + pinctrl-0 = <&sdc0_pins_a>; + pinctrl-1 = <&mmc0_cd_pin_olinuxinom>; + cd-gpios = <&pio 6 0 0>; /* PG0 */ + cd-mode = <1>; + status = "okay"; + }; + pinctrl@01c20800 { + mmc0_cd_pin_olinuxinom: mmc0_cd_pin@0 { + allwinner,pins = "PG0"; + allwinner,function = "gpio_in"; + allwinner,drive = <0>; + allwinner,pull = <0>; + }; + led_pins_olinuxinom: led_pins@0 { allwinner,pins = "PG9"; allwinner,function = "gpio_out"; diff --git a/arch/arm/boot/dts/sun5i-a13-olinuxino.dts b/arch/arm/boot/dts/sun5i-a13-olinuxino.dts index 9e508dc..ce22c81 100644 --- a/arch/arm/boot/dts/sun5i-a13-olinuxino.dts +++ b/arch/arm/boot/dts/sun5i-a13-olinuxino.dts @@ -23,7 +23,23 @@ }; soc@01c00000 { + sdc0: sdc@01c0f000 { + pinctrl-names = "default"; + pinctrl-0 = <&sdc0_pins_a>; + pinctrl-1 = <&mmc0_cd_pin_olinuxino>; + cd-gpios = <&pio 6 0 0>; /* PG0 */ + cd-mode = <1>; + status = "okay"; + }; + pinctrl@01c20800 { + mmc0_cd_pin_olinuxino: mmc0_cd_pin@0 { + allwinner,pins = "PG0"; + allwinner,function = "gpio_in"; + allwinner,drive = <0>; + allwinner,pull = <0>; + }; + led_pins_olinuxino: led_pins@0 { allwinner,pins = "PG9"; allwinner,function = "gpio_out"; diff --git a/arch/arm/boot/dts/sun5i-a13.dtsi b/arch/arm/boot/dts/sun5i-a13.dtsi index 0bb4300..0ca0819 100644 --- a/arch/arm/boot/dts/sun5i-a13.dtsi +++ b/arch/arm/boot/dts/sun5i-a13.dtsi @@ -255,6 +255,16 @@ #size-cells = <1>; ranges; + sdc0: sdc@01c0f000 { + compatible = "allwinner,sun5i-mmc"; + reg = <0x01c0f000 0x1000>; + clocks = <&ahb_gates 8>, <&mmc0>; + clock-names = "ahb", "mod"; + interrupts = <32>; + bus-width = <4>; + status = "disabled"; + }; + intc: interrupt-controller@01c20400 { compatible = "allwinner,sun4i-ic"; reg = <0x01c20400 0x400>; @@ -307,6 +317,13 @@ 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>; + }; }; timer@01c20c00 {