From patchwork Mon Jan 19 09:13:02 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 5655801 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.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 6822E9F2ED for ; Mon, 19 Jan 2015 09:19:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7802520306 for ; Mon, 19 Jan 2015 09:19:31 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (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 408EB20351 for ; Mon, 19 Jan 2015 09:19:30 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YD8SK-0007Zy-Q9; Mon, 19 Jan 2015 09:17:08 +0000 Received: from mail-lb0-f174.google.com ([209.85.217.174]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YD8Rr-0007O5-5k for linux-arm-kernel@lists.infradead.org; Mon, 19 Jan 2015 09:16:40 +0000 Received: by mail-lb0-f174.google.com with SMTP id 10so26979458lbg.5 for ; Mon, 19 Jan 2015 01:16:16 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Zy0M9+OxZ9TENWZieP/LqXBvdMlU7/XmFh/csvX8WK8=; b=A17jmf4IrbGbFPHpx+f7QXV5UVmvBNqtDd90Gcr0N/GIZuZrnTGVtqjFgabB0YlZ0E GIwCAjTNc4ILVaofPiYLTNbqS/XcYFIENMiX69pe9vJcRjFJqmn9ZLdEG4O/eRkToAEH zi+9DqHImcKB4on1/UtiODFj0zkSdn/yDINYoMW+CSKnySpz2WLp7Xisy0EjEnNitBOo PkXg6sz0uoD3giXKp0VNrw2LRw6DtjwPaCrYvnF4XQUc3YKkaypzv95Adf8+MraXTfJd hoXJftro4rz4vvybmA+kGAsn46uKPdbx0HxUzGu2uS5k8st3TOoguuFD51dIDxUdfkEV g8bA== X-Gm-Message-State: ALoCoQnbi/qeoDVedrUpc9JTcixiTzTe85JcU6mLhhtjs3Ff8zLnVkhRj5ja0PFgPEA5ikxBaiXv X-Received: by 10.112.185.101 with SMTP id fb5mr29034956lbc.12.1421658976005; Mon, 19 Jan 2015 01:16:16 -0800 (PST) Received: from localhost.localdomain ([85.235.11.236]) by mx.google.com with ESMTPSA id zo3sm2933894lbb.10.2015.01.19.01.16.12 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 19 Jan 2015 01:16:14 -0800 (PST) From: Ulf Hansson To: linux-mmc@vger.kernel.org, Chris Ball Subject: [PATCH V4 2/4] mmc: pwrseq: Document DT bindings for the simple MMC power sequence Date: Mon, 19 Jan 2015 10:13:02 +0100 Message-Id: <1421658784-11980-3-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1421658784-11980-1-git-send-email-ulf.hansson@linaro.org> References: <1421658784-11980-1-git-send-email-ulf.hansson@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150119_011639_467773_9AFD116E X-CRM114-Status: GOOD ( 14.78 ) X-Spam-Score: -0.7 (/) Cc: Mark Rutland , devicetree@vger.kernel.org, Hans de Goede , Russell King , Tomeu Vizoso , Arnd Bergmann , Alexandre Courbot , NeilBrown , Linus Walleij , Doug Anderson , Olof Johansson , Mark Brown , Arend van Spriel , Ulf Hansson , Sascha Hauer , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 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.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_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 To support SOCs which specifies specific MMC power sequences, document some MMC DT bindings to be able to describe these hardwares. Let's also document bindings for a simple MMC power sequence provider, which purpose is to support a set of common properties between various SOCs. In this initial step, let's also document a top level description of the MMC power sequence and describe the compatible string used for the simple MMC power sequence provider. The simple MMC power sequence provider will initially support a reset GPIO. From several earlier posted patches, it's clear that such hardware exists. Especially some WLAN chips which are attached to an SDIO interface may use a GPIO reset. Signed-off-by: Ulf Hansson Reviewed-by: Javier Martinez Canillas Tested-by: Javier Martinez Canillas --- Changed in v4: - None. --- .../devicetree/bindings/mmc/mmc-pwrseq-simple.txt | 20 ++++++++++++++++++++ Documentation/devicetree/bindings/mmc/mmc.txt | 14 ++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 Documentation/devicetree/bindings/mmc/mmc-pwrseq-simple.txt diff --git a/Documentation/devicetree/bindings/mmc/mmc-pwrseq-simple.txt b/Documentation/devicetree/bindings/mmc/mmc-pwrseq-simple.txt new file mode 100644 index 0000000..da333d9 --- /dev/null +++ b/Documentation/devicetree/bindings/mmc/mmc-pwrseq-simple.txt @@ -0,0 +1,20 @@ +* The simple MMC power sequence provider + +The purpose of the simple MMC power sequence provider is to supports a set of +common properties between various SOC designs. It thus enables us to use the +same provider for several SOC designs. + +Required properties: +- compatible : contains "mmc-pwrseq-simple". + +Optional properties: +- reset-gpios : contains a GPIO specifier. The reset GPIO is asserted at + initialization and prior we start the power up procedure of the card. It + will be de-asserted right after the power has been provided to the card. + +Example: + + sdhci0_pwrseq { + compatible = "mmc-pwrseq-simple"; + reset-gpios = <&gpio1 12 0>; + } diff --git a/Documentation/devicetree/bindings/mmc/mmc.txt b/Documentation/devicetree/bindings/mmc/mmc.txt index bac1311..438899e 100644 --- a/Documentation/devicetree/bindings/mmc/mmc.txt +++ b/Documentation/devicetree/bindings/mmc/mmc.txt @@ -65,6 +65,18 @@ Optional SDIO properties: - enable-sdio-wakeup: Enables wake up of host system on SDIO IRQ assertion +MMC power sequences: +-------------------- + +System on chip designs may specify a specific MMC power sequence. To +successfully detect an (e)MMC/SD/SDIO card, that power sequence must be +maintained while initializing the card. + +Optional property: +- mmc-pwrseq: phandle to the MMC power sequence node. See "mmc-pwrseq-*" + for documentation of MMC power sequence bindings. + + Use of Function subnodes ------------------------ @@ -101,6 +113,7 @@ sdhci@ab000000 { max-frequency = <50000000>; keep-power-in-suspend; enable-sdio-wakeup; + mmc-pwrseq = <&sdhci0_pwrseq> } Example with sdio function subnode: @@ -114,6 +127,7 @@ mmc3: mmc@01c12000 { vmmc-supply = <®_vmmc3>; bus-width = <4>; non-removable; + mmc-pwrseq = <&sdhci0_pwrseq> status = "okay"; brcmf: bcrmf@1 {