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: 5655761 Return-Path: X-Original-To: patchwork-linux-mmc@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 061379F2ED for ; Mon, 19 Jan 2015 09:16:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1826120351 for ; Mon, 19 Jan 2015 09:16:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2DB2620328 for ; Mon, 19 Jan 2015 09:16:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751356AbbASJQT (ORCPT ); Mon, 19 Jan 2015 04:16:19 -0500 Received: from mail-la0-f45.google.com ([209.85.215.45]:41036 "EHLO mail-la0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751433AbbASJQS (ORCPT ); Mon, 19 Jan 2015 04:16:18 -0500 Received: by mail-la0-f45.google.com with SMTP id gd6so3930028lab.4 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=bYpx7UFIAkiuWX/+a5NuAiXUbWBeXILjUcC3glfFGc7EYNyq2FSzewwgEAUecUVl2t PSDCy4RT5ibhkppdQD4sKqNybefMxJnwbGjrA7pJeya6cMAtOCD966ubxJTy469thhFQ 170SWQ2xqZegCygc7muZVg7hbxc+AkYOZyIpf3onnEcN8Qh+P77SFwbHro+SLU0vXwWJ 90JrY9qT9xlfR4HL/ch1Kxf6Rzc9VfSfcAWPnf0f0ZRiOLevoqJV2UWVt348VxyLG4zR /B0YZzFrN+vqUZPnlO4Lgs7BNxoShyIJG8DjIo8Q5keeHMQthsNrJfi9yXqLIv4bSnWr vc0w== X-Gm-Message-State: ALoCoQmH+D91ejojIx1so+emcZtoGu55s2sZmfSTOlZEv4+UnczM3i2ANaZbrA7c3BavF5XTGzIa 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 Cc: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, Linus Walleij , Mark Brown , Arnd Bergmann , Alexandre Courbot , Arend van Spriel , Sascha Hauer , Olof Johansson , Russell King , Hans de Goede , Doug Anderson , NeilBrown , Tomeu Vizoso , Mark Rutland , Ulf Hansson 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> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 {