From patchwork Sat May 31 19:03:32 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: 4276501 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 0F935BEEA7 for ; Sat, 31 May 2014 19:04:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3A5F220295 for ; Sat, 31 May 2014 19:04:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EC7C220268 for ; Sat, 31 May 2014 19:04:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752068AbaEaTEY (ORCPT ); Sat, 31 May 2014 15:04:24 -0400 Received: from mx1.redhat.com ([209.132.183.28]:28443 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751578AbaEaTEX (ORCPT ); Sat, 31 May 2014 15:04:23 -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 s4VJ3iY0014828 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 31 May 2014 15:03:44 -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 s4VJ3Zfs032582; Sat, 31 May 2014 15:03:42 -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 2/4] dt: bindings: mmc: Add sdio function subnode documentation Date: Sat, 31 May 2014 21:03:32 +0200 Message-Id: <1401563014-13856-3-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 From: Sascha Hauer While SDIO devices are runtime probable they sometimes need nonprobable additional information on embedded systems, like an additional gpio interrupt or a clock. This binding describes how to add child nodes to the devicetree to supply this information. Signed-off-by: Sascha Hauer [hdegoede@redhat.com: Updated the bindings to put the sdio functions inside slot subnodes] Signed-off-by: Hans de Goede --- Documentation/devicetree/bindings/mmc/mmc.txt | 49 +++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/Documentation/devicetree/bindings/mmc/mmc.txt b/Documentation/devicetree/bindings/mmc/mmc.txt index 44c9e53..2903775 100644 --- a/Documentation/devicetree/bindings/mmc/mmc.txt +++ b/Documentation/devicetree/bindings/mmc/mmc.txt @@ -81,6 +81,27 @@ if a property is specified at both the host and the slot level the slot level takes precedence. +Use of Function subnodes +------------------------ + +On embedded systems the cards connected to a host may need additional +properties. These can be specified in subnodes to the slot subnodes, with +the card / SDIO-function identified by the standard 'reg' property. +Note that the use of slot subnodes is mandatory in this case. +Which information exactly can be specified depends on the bindings for the +SDIO function driver for the node, as specified by the compatible string. + +Required slot subnode properties when using function subnodes: +- #address-cells: should be one. The cell is the slot id. +- #size-cells: should be zero. + +Required function subnode properties: +- compatible: name of SDIO function following generic names recommended practice +- reg: Must contain the SDIO function number of the function this subnode + describes. A value of 0 denotes the memory SD function, values from + 1 to 7 denote the SDIO functions. + + Examples -------- @@ -118,3 +139,31 @@ mmc0: mmc@f0008000 { bus-width = <4>; }; }; + +Example with sdio function subnodes: + +mmc3: mmc@01c12000 { + #address-cells = <1>; + #size-cells = <0>; + + pinctrl-names = "default"; + pinctrl-0 = <&mmc3_pins_a>; + vmmc-supply = <®_vmmc3>; + bus-width = <4>; + non-removable; + status = "okay"; + + mmc3_slot0: mmc3_slot@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + + brcmf: bcrmf@1 { + reg = <1>; + compatible = "brcm,bcm43xx-fmac"; + interrupt-parent = <&pio>; + interrupts = <10 8>; /* PH10 / EINT10 */ + interrupt-names = "host-wake"; + }; + }; +};