Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp5328441imm; Tue, 12 Jun 2018 06:19:16 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJUdr5qEb2t7sRhJrS3a52Fril1a4vl6m9TLzS/JATbAduKTGnEO3PogDPzMAwaDsOlF/6x X-Received: by 2002:a62:b02:: with SMTP id t2-v6mr414399pfi.36.1528809556924; Tue, 12 Jun 2018 06:19:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528809556; cv=none; d=google.com; s=arc-20160816; b=XZau9Xu1+LOmnFQWeoqUq4OgloaNRIctP/1smokJflS+8CoP0RG5nvg+yoTwAlcdYe +8OxEgdM8I71ZYuV3iX+g6mJb5hTSp9dNcYedQmCye1sGUJjk+aoMTxZqmh4scc7MnN3 tykYFZ4e7+vj63P4hEMBiHY78xIMlNdMG2UnorzivZI1sfUmoFI3UwX6OJJqcrNLb0nU OoWzLtxa924Zk8sMX5nwICTcDwLqIyhsO5tVqE6T29CfY+l1fZl6pgybpGOg95Eah7Nh NKPabbW5ZHpox/+neaVzSj9Fc8nYCAIAHMBS7SqBqB19BSw+fumqk82yoC/uJDBlpd0Y q3oA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:arc-authentication-results; bh=k9NNvtW3g4cfRM9THhMwcCCdnitXwZcBc6vOkVL1QHg=; b=j2ceK4fQxZ7c8ROV/ZHbYZ19D32GCZbB4lzT78TJAwmbyeFlxdGR9wxfwps7rUFjyi NuFwfLW9Wju2/xWh6tgm20uoo6rsq6/rvYOj0XIl8gD1joztFS4eltcN5v+U/csSOoCv jzfLqenk5zlScoACl4IlQnzhjy87kfsZeB0BBXNwt5bRpZB2plcawBhNctv0K995YBy0 +vM4kbYT592e+0Wjjl5TsK4pbuhzpEAods9FVXAGH9u3IEDMLdZBwopR5nrj+WXCBKW3 yysLt6orNxgT757ZEvRi4q3M7TJgwBk06yk6u6wyWO8CJaYJN6Cp83NQrSsgTg7tlC5k pTIw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w12-v6si119214pld.367.2018.06.12.06.19.02; Tue, 12 Jun 2018 06:19:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934095AbeFLNQx (ORCPT + 99 others); Tue, 12 Jun 2018 09:16:53 -0400 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:20511 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933924AbeFLNQo (ORCPT ); Tue, 12 Jun 2018 09:16:44 -0400 Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx08-.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id w5CDE38w017834; Tue, 12 Jun 2018 15:16:14 +0200 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2jjegrr447-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 12 Jun 2018 15:16:14 +0200 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 0832A46; Tue, 12 Jun 2018 13:16:07 +0000 (GMT) Received: from Webmail-eu.st.com (Safex1hubcas23.st.com [10.75.90.46]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id DC39FA543; Tue, 12 Jun 2018 13:16:06 +0000 (GMT) Received: from SAFEX1HUBCAS21.st.com (10.75.90.44) by SAFEX1HUBCAS23.st.com (10.75.90.46) with Microsoft SMTP Server (TLS) id 14.3.361.1; Tue, 12 Jun 2018 15:16:06 +0200 Received: from lmecxl0923.lme.st.com (10.48.0.237) by Webmail-ga.st.com (10.75.90.48) with Microsoft SMTP Server (TLS) id 14.3.361.1; Tue, 12 Jun 2018 15:16:06 +0200 From: Ludovic Barre To: Ulf Hansson , Rob Herring CC: Maxime Coquelin , Alexandre Torgue , Gerald Baeza , , , , , Ludovic Barre Subject: [PATCH 16/19] mmc: mmci: add DT bindings for STM32 sdmmc Date: Tue, 12 Jun 2018 15:14:37 +0200 Message-ID: <1528809280-31116-17-git-send-email-ludovic.Barre@st.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1528809280-31116-1-git-send-email-ludovic.Barre@st.com> References: <1528809280-31116-1-git-send-email-ludovic.Barre@st.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.48.0.237] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-06-12_01:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ludovic Barre STM32 sdmmc variant has support to: -Indicate signal directions (only one property for d0dir, d123dir, cmd_dir) -Select command and data phase relation. -Select "clock in" from an external driver. Signed-off-by: Ludovic Barre --- Documentation/devicetree/bindings/mmc/mmci.txt | 9 +++++++++ drivers/mmc/host/mmci.c | 6 ++++++ 2 files changed, 15 insertions(+) diff --git a/Documentation/devicetree/bindings/mmc/mmci.txt b/Documentation/devicetree/bindings/mmc/mmci.txt index e952707..d678933 100644 --- a/Documentation/devicetree/bindings/mmc/mmci.txt +++ b/Documentation/devicetree/bindings/mmc/mmci.txt @@ -19,6 +19,7 @@ Optional properties: the ID provided by the HW - vqmmc-supply : phandle to the regulator device tree node, mentioned as the VCCQ/VDD_IO supply in the eMMC/SD specs. +specific for ux500 variant: - 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]. @@ -26,6 +27,14 @@ Optional properties: - st,sig-dir-cmd : cmd signal direction pin used for CMD. - st,sig-pin-fbclk : feedback clock signal pin used. +specific for sdmmc variant: +- st,sig-dir : signal direction polarity used for cmd, dat0 dat123. +- st,neg-edge : data & command phase relation, generated on + sd clock falling edge. +- st,use-ckin : use ckin pin from an external driver to sample + the receive data (example: with voltage + switch transceiver). + Deprecated properties: - mmc-cap-mmc-highspeed : indicates whether MMC is high speed capable. - mmc-cap-sd-highspeed : indicates whether SD is high speed capable. diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index e24fd1e..86aef4f 100644 --- a/drivers/mmc/host/mmci.c +++ b/drivers/mmc/host/mmci.c @@ -1328,6 +1328,12 @@ static int mmci_of_parse(struct device_node *np, struct mmc_host *mmc) host->pwr_reg_add |= MCI_ST_CMDDIREN; if (of_get_property(np, "st,sig-pin-fbclk", NULL)) host->pwr_reg_add |= MCI_ST_FBCLKEN; + if (of_get_property(np, "st,sig-dir", NULL)) + host->pwr_reg_add |= MCI_STM32_DIRPOL; + if (of_get_property(np, "st,neg-edge", NULL)) + host->clk_reg_add |= MCI_STM32_CLK_NEGEDGE; + if (of_get_property(np, "st,use-ckin ", NULL)) + host->clk_reg_add |= MCI_STM32_CLK_SELCKIN; if (of_get_property(np, "mmc-cap-mmc-highspeed", NULL)) mmc->caps |= MMC_CAP_MMC_HIGHSPEED; -- 2.7.4