From patchwork Sat May 31 19:03:31 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 4276481 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 0AA2ABEEA7 for ; Sat, 31 May 2014 19:04:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 03D1C202E6 for ; Sat, 31 May 2014 19:04:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 12F2B20268 for ; Sat, 31 May 2014 19:04:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751789AbaEaTER (ORCPT ); Sat, 31 May 2014 15:04:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54220 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751577AbaEaTER (ORCPT ); Sat, 31 May 2014 15:04:17 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s4VJ3ftE014816 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 31 May 2014 15:03:41 -0400 Received: from shalem.localdomain.com (vpn1-5-192.ams2.redhat.com [10.36.5.192]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id s4VJ3Zfr032582; Sat, 31 May 2014 15:03:39 -0400 From: Hans de Goede To: Chris Ball , Ulf Hansson , Sascha Hauer Cc: Maxime Ripard , Arend van Spriel , Chen-Yu Tsai , linux-arm-kernel@lists.infradead.org, linux-mmc@vger.kernel.org, devicetree , linux-sunxi@googlegroups.com, Hans de Goede Subject: [PATCH v2 1/4] dt: bindings: mmc: Document the practice of using subnodes for slots Date: Sat, 31 May 2014 21:03:31 +0200 Message-Id: <1401563014-13856-2-git-send-email-hdegoede@redhat.com> In-Reply-To: <1401563014-13856-1-git-send-email-hdegoede@redhat.com> References: <1401563014-13856-1-git-send-email-hdegoede@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 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.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 The following existing MMC host controller bindings use slot subnodes: Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt Documentation/devicetree/bindings/mmc/k3-dw-mshc.txt Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt Documentation/devicetree/bindings/mmc/socfpga-dw-mshc.txt Documentation/devicetree/bindings/mmc/atmel-hsmci.txt Documentation/devicetree/bindings/mmc/rockchip-dw-mshc.txt This commit documents this practice in the standard mmc bindings documentation. Signed-off-by: Hans de Goede --- Documentation/devicetree/bindings/mmc/mmc.txt | 46 ++++++++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/mmc/mmc.txt b/Documentation/devicetree/bindings/mmc/mmc.txt index 9dce540..44c9e53 100644 --- a/Documentation/devicetree/bindings/mmc/mmc.txt +++ b/Documentation/devicetree/bindings/mmc/mmc.txt @@ -60,7 +60,31 @@ Optional SDIO properties: - keep-power-in-suspend: Preserves card power during a suspend/resume cycle - enable-sdio-wakeup: Enables wake up of host system on SDIO IRQ assertion -Example: + +Use of slot subnodes +-------------------- + +Some hosts have multiple MMC slots connected to a single MMC host, in this +case each slot gets its own subnode representing the slot: + +Required host node properties when using slots: +- #address-cells: should be one. The cell is the slot id. +- #size-cells: should be zero. + +Required slot subnode properties: +- reg: Must contain the MMC host slot number of the slot this subnode + describes. Slot numbers start at 0. + +Optional slot subnode properties: +Any of the optional host node properties can be used inside a slot node too, +if a property is specified at both the host and the slot level the slot +level takes precedence. + + +Examples +-------- + +Basic example: sdhci@ab000000 { compatible = "sdhci"; @@ -74,3 +98,23 @@ sdhci@ab000000 { keep-power-in-suspend; enable-sdio-wakeup; } + +Example with slot subnodes: + +mmc0: mmc@f0008000 { + compatible = "atmel,hsmci"; + reg = <0xf0008000 0x600>; + interrupts = <12 4>; + #address-cells = <1>; + #size-cells = <0>; + slot@0 { + reg = <0>; + bus-width = <4>; + cd-gpios = <&pioD 15 0> + cd-inverted; + }; + slot@1 { + reg = <1>; + bus-width = <4>; + }; +};