From patchwork Thu Apr 10 12:20:47 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 28168 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f197.google.com (mail-ie0-f197.google.com [209.85.223.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 21EB120671 for ; Thu, 10 Apr 2014 12:21:21 +0000 (UTC) Received: by mail-ie0-f197.google.com with SMTP id rd18sf17848816iec.4 for ; Thu, 10 Apr 2014 05:21:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=J66Dyj904ubECzTL43TYOvzR5NeLJSmTlW3QDkNVGNI=; b=HOZZ3MTtMoYi/DrhcrcjJcPmWwVsGcNE4Ve59fcA3HOi1NwC4BhcsgPjXLzfwUJ+N5 fVb2NEocxV5FCWaHopoT6RYWdabIrzVuPcYERaJ9Z3U5urx3wQ2zjVlrgIIrn583z58J yVfF6o8TnGD3OmcFEBvfsyz0RP2DkixKluF4kcM6a2GHTf8fG4kgL8lPm90PKC4Mc8a6 Nl+LxfLrcMUF/alQbDEmHR5P2AQXH/w91WrAlM2W7NMinup5FKjUoaqtThWCO6AGMzpj cVHRGIus0bBf4QdgGKywlcA20iCvIxk4yKR/wlWAR8TSjTniJPx/5yov3ty6kte2eRpq 55HA== X-Gm-Message-State: ALoCoQnTdot59pWef11eF2jNbpIznMKTlGswv8E8sT7iYg6EmSEXOwI2KB2zYJuiaYhPGCX5FcDw X-Received: by 10.42.85.142 with SMTP id q14mr7427268icl.11.1397132480577; Thu, 10 Apr 2014 05:21:20 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.87.33 with SMTP id q30ls1086000qgd.99.gmail; Thu, 10 Apr 2014 05:21:20 -0700 (PDT) X-Received: by 10.52.240.207 with SMTP id wc15mr12152110vdc.14.1397132480437; Thu, 10 Apr 2014 05:21:20 -0700 (PDT) Received: from mail-ve0-f180.google.com (mail-ve0-f180.google.com [209.85.128.180]) by mx.google.com with ESMTPS id pu9si654335vec.209.2014.04.10.05.21.20 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 10 Apr 2014 05:21:20 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.180 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.180; Received: by mail-ve0-f180.google.com with SMTP id jz11so3385482veb.11 for ; Thu, 10 Apr 2014 05:21:20 -0700 (PDT) X-Received: by 10.52.34.137 with SMTP id z9mr11937651vdi.12.1397132480353; Thu, 10 Apr 2014 05:21:20 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp54554vcb; Thu, 10 Apr 2014 05:21:19 -0700 (PDT) X-Received: by 10.180.93.133 with SMTP id cu5mr14827575wib.47.1397132479291; Thu, 10 Apr 2014 05:21:19 -0700 (PDT) Received: from mail-wi0-f178.google.com (mail-wi0-f178.google.com [209.85.212.178]) by mx.google.com with ESMTPS id h3si2606427wix.99.2014.04.10.05.21.18 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 10 Apr 2014 05:21:19 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.178 is neither permitted nor denied by best guess record for domain of ulf.hansson@linaro.org) client-ip=209.85.212.178; Received: by mail-wi0-f178.google.com with SMTP id bs8so4862061wib.11 for ; Thu, 10 Apr 2014 05:21:18 -0700 (PDT) X-Received: by 10.194.81.164 with SMTP id b4mr15063721wjy.2.1397132478781; Thu, 10 Apr 2014 05:21:18 -0700 (PDT) Received: from localhost.localdomain ([85.235.11.236]) by mx.google.com with ESMTPSA id ej7sm16437292wib.9.2014.04.10.05.21.17 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 10 Apr 2014 05:21:18 -0700 (PDT) From: Ulf Hansson To: linux-arm-kernel@lists.infradead.org, Russell King , Linus Walleij Cc: devicetree@vger.kernel.org, Rob Herring , Ulf Hansson Subject: [PATCH V3 04/19] mmc: mmci: Add DT bindings for signal direction Date: Thu, 10 Apr 2014 14:20:47 +0200 Message-Id: <1397132462-8005-5-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1397132462-8005-1-git-send-email-ulf.hansson@linaro.org> References: <1397132462-8005-1-git-send-email-ulf.hansson@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ulf.hansson@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.180 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Some variants have support for indicating the bus signal directions, which currently are configured through platform data. Add corresponding DT bindings to enable us to move away from using the platform data. Signed-off-by: Ulf Hansson Reviewed-by: Linus Walleij --- Documentation/devicetree/bindings/mmc/mmci.txt | 11 ++++++++++- drivers/mmc/host/mmci.c | 11 +++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/mmc/mmci.txt b/Documentation/devicetree/bindings/mmc/mmci.txt index ff233d1..9bd2ffa 100644 --- a/Documentation/devicetree/bindings/mmc/mmci.txt +++ b/Documentation/devicetree/bindings/mmc/mmci.txt @@ -4,7 +4,8 @@ The ARM PrimeCell MMCI PL180 and PL181 provides an interface for reading and writing to MultiMedia and SD cards alike. This file documents differences between the core properties described -by mmc.txt and the properties used by the mmci driver. +by mmc.txt and the properties used by the mmci driver. Using "st" as +the prefix for a property, indicates support by the ST Micro variant. Required properties: - compatible : contains "arm,pl18x", "arm,primecell". @@ -18,6 +19,11 @@ Optional properties: - mmc-cap-sd-highspeed : indicates whether SD is high speed capable. - vqmmc-supply : phandle to the regulator device tree node, mentioned as the VCCQ/VDD_IO supply in the eMMC/SD specs. +- st,sig-dir-dat0 : bus signal direction pin used for DAT[0]. +- st,sig-dir-dat2 : bus signal direction pin used for DAT[2]. +- st,sig-dir-dat31 : bus signal direction pin used for DAT[3] and DAT[1]. +- st,sig-dir-dat74 : bus signal direction pin used for DAT[4] to DAT[7]. +- st,sig-dir-cmd : cmd signal direction pin used for CMD. Example: @@ -38,6 +44,9 @@ sdi0_per1@80126000 { mmc-cap-sd-highspeed; mmc-cap-mmc-highspeed; cd-gpios = <&gpio2 31 0x4>; // 95 + st,sig-dir-dat0; + st,sig-dir-dat2; + st,sig-dir-cmd; vmmc-supply = <&ab8500_ldo_aux3_reg>; vqmmc-supply = <&vmmci>; diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index 93b1b10..2766e5c 100644 --- a/drivers/mmc/host/mmci.c +++ b/drivers/mmc/host/mmci.c @@ -1392,6 +1392,17 @@ static void mmci_dt_populate_generic_pdata(struct device_node *np, { int bus_width = 0; + if (of_get_property(np, "st,sig-dir-dat0", NULL)) + pdata->sigdir |= MCI_ST_DATA0DIREN; + if (of_get_property(np, "st,sig-dir-dat2", NULL)) + pdata->sigdir |= MCI_ST_DATA2DIREN; + if (of_get_property(np, "st,sig-dir-dat31", NULL)) + pdata->sigdir |= MCI_ST_DATA31DIREN; + if (of_get_property(np, "st,sig-dir-dat74", NULL)) + pdata->sigdir |= MCI_ST_DATA74DIREN; + if (of_get_property(np, "st,sig-dir-cmd", NULL)) + pdata->sigdir |= MCI_ST_CMDDIREN; + pdata->gpio_wp = of_get_named_gpio(np, "wp-gpios", 0); pdata->gpio_cd = of_get_named_gpio(np, "cd-gpios", 0);