From patchwork Fri Jul 26 15:51:28 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guennadi Liakhovetski X-Patchwork-Id: 2834240 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C0DD29F9CC for ; Fri, 26 Jul 2013 15:51:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F0B4E20216 for ; Fri, 26 Jul 2013 15:51:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 03F3E20221 for ; Fri, 26 Jul 2013 15:51:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759318Ab3GZPvh (ORCPT ); Fri, 26 Jul 2013 11:51:37 -0400 Received: from moutng.kundenserver.de ([212.227.126.186]:62465 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758114Ab3GZPvg (ORCPT ); Fri, 26 Jul 2013 11:51:36 -0400 Received: from axis700.grange (dslb-094-221-102-122.pools.arcor-ip.net [94.221.102.122]) by mrelayeu.kundenserver.de (node=mrbap3) with ESMTP (Nemesis) id 0Lln96-1UTPY91LsW-00ZMKj; Fri, 26 Jul 2013 17:51:29 +0200 Received: by axis700.grange (Postfix, from userid 1000) id E468C40BB4; Fri, 26 Jul 2013 17:51:28 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by axis700.grange (Postfix) with ESMTP id DA67340BB3; Fri, 26 Jul 2013 17:51:28 +0200 (CEST) Date: Fri, 26 Jul 2013 17:51:28 +0200 (CEST) From: Guennadi Liakhovetski X-X-Sender: lyakh@axis700.grange To: linux-sh@vger.kernel.org cc: linux-mmc@vger.kernel.org, Magnus Damm , Chris Ball , devicetree@vger.kernel.org, Simon Horman Subject: [PATCH 1/2] mmc: add Device Tree properties for UHS modes Message-ID: MIME-Version: 1.0 X-Provags-ID: V02:K0:LPFlFSP1UVchTYlTgPiR8KFHr5+hjafpoCf41xv/cxy al74kYEZ6XNyAIrm52U8ZLrAD54EV0FepCEYSnUAWruzbVpfpi BVuWBCirFEdCX9iatdBHAINjNMXfW1p8e8ovghudQNjLH3+TwW D9WtmwNKSiTQl4CZ4JZmJp0lRzMHo9EmD9oE3vIfCoqBxesG8b 8t+1Ugc/HjhLAzEROd1qtGeEDX69f8/Zuqhx+Do5deF6Q8LONh kUk7NxKKcaWSUEHuEbYBKh3xJ4vKbHg+fPa0igzmxTD6duaOVC L3I8Ii//ida2ZEDv5Gl/+Ct1IWdk+XHwB/76r10kwrUvR2xZIF ygzhf9gBgfoAuuSapUXX2GJFKKnwKDylfx7/f/FEdr7X8lxB9I ymiqiEpl3GZew== Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00,FREEMAIL_FROM, 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 Add DT properties for UHS SDR12, SDR25, SDR50, SDR104 and DDR50 modes and for supported by the host in DDR mode VccQ values. Adding them to DT will automatically enable respective MMC host capabilities. Signed-off-by: Guennadi Liakhovetski --- Documentation/devicetree/bindings/mmc/mmc.txt | 7 +++++++ drivers/mmc/core/host.c | 14 ++++++++++++++ 2 files changed, 21 insertions(+), 0 deletions(-) diff --git a/Documentation/devicetree/bindings/mmc/mmc.txt b/Documentation/devicetree/bindings/mmc/mmc.txt index 458b57f..de4a716 100644 --- a/Documentation/devicetree/bindings/mmc/mmc.txt +++ b/Documentation/devicetree/bindings/mmc/mmc.txt @@ -29,6 +29,13 @@ Optional properties: - cap-power-off-card: powering off the card is safe - cap-sdio-irq: enable SDIO IRQ signalling on this interface - full-pwr-cycle: full power cycle of the card is supported +- uhs-sdr12: the host supports UHS SDR12 mode +- uhs-sdr25: the host supports UHS SDR25 mode +- uhs-sdr50: the host supports UHS SDR50 mode +- uhs-sdr104: the host supports UHS SDR104 mode +- uhs-ddr50: the host supports UHS DDR50 mode +- ddr-1v2: the host can support DDR, using 1.2V VccQ +- ddr-1v8: the host can support DDR, using 1.8V VccQ *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" diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c index 6fb6f77..e12fba0 100644 --- a/drivers/mmc/core/host.c +++ b/drivers/mmc/core/host.c @@ -423,6 +423,20 @@ int mmc_of_parse(struct mmc_host *host) host->caps |= MMC_CAP_POWER_OFF_CARD; if (of_find_property(np, "cap-sdio-irq", &len)) host->caps |= MMC_CAP_SDIO_IRQ; + if (of_find_property(np, "uhs-sdr12", &len)) + host->caps |= MMC_CAP_UHS_SDR12; + if (of_find_property(np, "uhs-sdr25", &len)) + host->caps |= MMC_CAP_UHS_SDR25; + if (of_find_property(np, "uhs-sdr50", &len)) + host->caps |= MMC_CAP_UHS_SDR50; + if (of_find_property(np, "uhs-sdr104", &len)) + host->caps |= MMC_CAP_UHS_SDR104; + if (of_find_property(np, "uhs-ddr50", &len)) + host->caps |= MMC_CAP_UHS_DDR50; + if (of_find_property(np, "ddr-1v2", &len)) + host->caps |= MMC_CAP_1_2V_DDR; + if (of_find_property(np, "ddr-1v8", &len)) + host->caps |= MMC_CAP_1_8V_DDR; if (of_find_property(np, "full-pwr-cycle", &len)) host->caps2 |= MMC_CAP2_FULL_PWR_CYCLE; if (of_find_property(np, "keep-power-in-suspend", &len))