From patchwork Fri Feb 15 15:13:51 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guennadi Liakhovetski X-Patchwork-Id: 2148501 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id E2DB83FE80 for ; Fri, 15 Feb 2013 15:14:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935742Ab3BOPO0 (ORCPT ); Fri, 15 Feb 2013 10:14:26 -0500 Received: from moutng.kundenserver.de ([212.227.126.187]:58673 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933417Ab3BOPOX (ORCPT ); Fri, 15 Feb 2013 10:14:23 -0500 Received: from axis700.grange (dslb-188-109-033-039.pools.arcor-ip.net [188.109.33.39]) by mrelayeu.kundenserver.de (node=mreu1) with ESMTP (Nemesis) id 0MMamg-1Ty7OW3WZy-008XZo; Fri, 15 Feb 2013 16:14:11 +0100 Received: from 6a.grange (6a.grange [192.168.1.11]) by axis700.grange (Postfix) with ESMTPS id E2FED40B99; Fri, 15 Feb 2013 16:14:09 +0100 (CET) Received: from lyakh by 6a.grange with local (Exim 4.72) (envelope-from ) id 1U6MzJ-0004jc-Km; Fri, 15 Feb 2013 16:14:09 +0100 From: Guennadi Liakhovetski To: linux-mmc@vger.kernel.org Cc: devicetree-discuss@lists.ozlabs.org, linux-sh@vger.kernel.org, Magnus Damm , Simon Horman , Arnd Bergmann , Guennadi Liakhovetski Subject: [PATCH v4 02/13] mmc: detailed definition of CD and WP MMC line polarities in DT Date: Fri, 15 Feb 2013 16:13:51 +0100 Message-Id: <1360941242-18153-3-git-send-email-g.liakhovetski@gmx.de> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1360941242-18153-1-git-send-email-g.liakhovetski@gmx.de> References: <1360941242-18153-1-git-send-email-g.liakhovetski@gmx.de> X-Provags-ID: V02:K0:Bwti6q7L3rnEi5JtmlGjp+4YvTkVOh/QXY/P4nf+lHj KZQcgJeVjyj79f5YvxP7NgH8PQ6rAaIHvibNyHAhrKk6JpJ+ar f2rUUtr76uX8cni0YB7jZDfnYfSw9WtfEx360Z7gR7NLAVBbUi 5BFR4+luU++8u3FU8sd/YFqMCTWPpDrzBofvb6HrKMmXkc2xs/ 8Dgc6jH3wSOida6EXUT2Z1WWhNZBP4o1gufOZBnR5Xx6srWN3u TBWrzVQXtPA7Gw0F+HGM62x7Wvki7z1IPTzPwwo83JSUsMDPo3 O0LP+v5wjR7D+BIZn6FAF9N8HCBrL7i4eV+RP6zwqKTjkLmcgz b5utcN0X4ZuNT5DIsq/qA+qFPkmh+DbqD5lB41y9PTpofSUOV3 euL7b85/iN7yg== Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org Clarify ways to specify write-protect and card-detect MMC lines in FDT. Signed-off-by: Guennadi Liakhovetski --- v4: remove Linux-specific references. Documentation/devicetree/bindings/mmc/mmc.txt | 23 +++++++++++++++++++++-- 1 files changed, 21 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/mmc/mmc.txt b/Documentation/devicetree/bindings/mmc/mmc.txt index 34f28ed..24c8552 100644 --- a/Documentation/devicetree/bindings/mmc/mmc.txt +++ b/Documentation/devicetree/bindings/mmc/mmc.txt @@ -18,12 +18,31 @@ Only one of the properties in this section should be supplied: Optional properties: - wp-gpios: Specify GPIOs for write protection, see gpio binding -- cd-inverted: when present, polarity on the cd gpio line is inverted -- wp-inverted: when present, polarity on the wp gpio line is inverted +- cd-inverted: when present, polarity on the CD line is inverted. See the note + below for the case, when a GPIO is used for the CD line +- wp-inverted: when present, polarity on the WP line is inverted. See the note + below for the case, when a GPIO is used for the WP line - max-frequency: maximum operating clock frequency - no-1-8-v: when present, denotes that 1.8v card voltage is not supported on this system, even if the controller claims it is. +*NOTE* on CD and WP polarity. To use common for all SD/MMC host controllers line +polarity properties, we have to fix the meaning of the "normal" and "inverted" +line levels. We choose to follow the SDHCI standard, which specifies both those +lines as "active low." Therefore, using the "cd-inverted" property means, that +the CD line is active high, i.e. it is high, when a card is inserted. Similar +logic applies to the "wp-inverted" property. + +CD and WP lines can be implemented on the hardware in one of two ways: as GPIOs, +specified in cd-gpios and wp-gpios properties, or as dedicated pins. Polarity of +dedicated pins can be specified, using *-inverted properties. GPIO polarity can +also be specified using the OF_GPIO_ACTIVE_LOW flag. This creates an ambiguity +in the latter case. We choose to use the XOR logic for GPIO CD and WP lines. +This means, the two properties are "superimposed," for example leaving the +OF_GPIO_ACTIVE_LOW flag clear and specifying the respective *-inverted +property results in a double-inversion and actually means the "normal" line +polarity is in effect. + 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