Received: by 10.223.176.5 with SMTP id f5csp1915454wra; Wed, 31 Jan 2018 13:36:55 -0800 (PST) X-Google-Smtp-Source: AH8x224flwdsIaOCY3MKLsAzBAmP2PS1cN2rmq9mAtQqfWeUUrwkxHbRV3Fpkz2KXfoReLZrNa85 X-Received: by 10.98.205.72 with SMTP id o69mr32527474pfg.104.1517434614936; Wed, 31 Jan 2018 13:36:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517434614; cv=none; d=google.com; s=arc-20160816; b=qBsvaKRK45ZAlfPCqmV66bey0hl+BLWwA+2tpl+WF0Dm2yPD9IpfigFzVjawmYsEdM CnKpVIAVfg3I/39DHcY4D4FZit/6EB56vbVE2Uj86LthjhluycVLmhpIFmuPUV2xx87T G0/uVWTVyKMZtogF/I0rbPtaNkCnFpE2mgyY2HrBkeC6xEfHDH8ZV53cyNEUqTzHaI+V +7rC+j976oUbd2L7k3MAMDblgvmnGSk/5ODuQ/pVVPkuq2mopn7s3kFuWvzd3JR0f5TJ XCsTHU33hhkwBM/ntHn8A8HBSee1Jb0IWYyC2XIqzoumcI9Tq7MR5ajWVs7xutxkWsDm nrVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=KCsM0U3ZBtgnHOZCzVO6qp4QvCNum1iIB0UxUJBik68=; b=rFYDFnJLFZdnM7gGTaHTauW892vbzjovxZefNSAhNSyiNFrJmKTqO1kOYpQJqHA0Fg 5jEzqAt12NGNn54/NGIckqqeK/G/wzQJWXypNHeeoqJjIjPBCgu7V2Htz6LSdVDwmi3R A1jYQl+4uvpgqz1Ql1Moo2JH2kTkNTs8p7LFAFEhApUVHS9wwKAPCU8B4QwgIx/K/mi0 0VmKdIs3rZxXW9haIT47Bjmy4VwlLN4KEFKD5f+tTmheoxn2d2LeY+l171fR/ONbXmMT UoRqLcvofpoohhKdO7NC4rBrSvK/frtVrGSy7+i1Ao3pT+4uEDlCdeen/V0U0k/ZxDFj EyMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=US3LLV1H; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s1si708873pgp.577.2018.01.31.13.36.39; Wed, 31 Jan 2018 13:36:54 -0800 (PST) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=US3LLV1H; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753283AbeAaVgL (ORCPT + 99 others); Wed, 31 Jan 2018 16:36:11 -0500 Received: from mail-wm0-f67.google.com ([74.125.82.67]:36402 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753183AbeAaVf6 (ORCPT ); Wed, 31 Jan 2018 16:35:58 -0500 Received: by mail-wm0-f67.google.com with SMTP id f3so1852905wmc.1; Wed, 31 Jan 2018 13:35:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=KCsM0U3ZBtgnHOZCzVO6qp4QvCNum1iIB0UxUJBik68=; b=US3LLV1Hpf6PTqzdw+Yn/WFmmZHJhknEvPcShob+dGpUwoM0ru0NZeJsIfCYTf4j9k BrdoBGSD13N9N20WCYEBC0zjTN4b+NWW774N4/3aLRkAs66PWrZM4HKjlFWEoDPg1jJ+ sbc+D8lqudDCzhdRsZsB7IWasf3AC1YWeh7QHQj/DBqi3hTRANcTENYHUlzOBQ3391Ct v1ZZpq7iv8f1ZKTSwPo79l4zht+MSFeOQ8tD6DIi2StFPKVTVpvF6pBcL9PVK1/88Uc9 FEJNXSMoFjNiKu/6wa4o98Xue6HuAJPyFa+U0ZUGH6ecQ9BPY2dLoGVV2kOKQRmEw8r+ 0mag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=KCsM0U3ZBtgnHOZCzVO6qp4QvCNum1iIB0UxUJBik68=; b=QpDc8vVNyr1d6CWK8rdV86Ak9gvINNCHYrIM2y5dp5gUOBNcuzC04Y8hfwun02I4XP BFJwUbRQWm1wZ8L2P1jp388BBIoJFEfZJL5uxLkRXouaPfrvbLbnNZ2u33BAg5TYptzK zWrXHVglzHDZ2m3EcFD4maxqb9Ltb7D8buz8AyBwrOix7wKeFQ/8kGxtNmrwlYFcRS2h w2Jeof0eQ6MPm5GL6nq73deQPQ8m2Ew0JCBTAnis9rZ/YV4zyIIxXDNlgXlqOLFY6qzF g9bWCPtt/i3gzfcYMJ/evqaZUagr+3v9i3dmAOICv8mR+r8Av3WlHlcWVoTxLMSu0Uax wQnQ== X-Gm-Message-State: AKwxytcfXxN3s/WDvYLqNgq99lGiXFg1Umkfx44dxYtSneOw0Dk3lvKg lMTycEwr7VxqSTHYDlKI6rB2Kcqp X-Received: by 10.28.245.25 with SMTP id t25mr12696399wmh.77.1517434557160; Wed, 31 Jan 2018 13:35:57 -0800 (PST) Received: from localhost.localdomain (vno44-1-88-172-188-148.fbx.proxad.net. [88.172.188.148]) by smtp.gmail.com with ESMTPSA id s19sm18197538wrg.7.2018.01.31.13.35.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 31 Jan 2018 13:35:56 -0800 (PST) From: =?UTF-8?q?Beno=C3=AEt=20Th=C3=A9baudeau?= To: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Russell King , Mark Rutland , Rob Herring , Fabio Estevam , Sascha Hauer , Shawn Guo Cc: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Michael Nazzareno Trimarchi , =?UTF-8?q?Beno=C3=AEt=20Th=C3=A9baudeau?= Subject: [PATCH v3 2/2] ARM: dts: imx25-pinfunc: Always set SION for eSDHC CMD Date: Wed, 31 Jan 2018 22:35:44 +0100 Message-Id: <20180131213544.4508-2-benoit.thebaudeau.dev@gmail.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180131213544.4508-1-benoit.thebaudeau.dev@gmail.com> References: <20180131213544.4508-1-benoit.thebaudeau.dev@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The eSDHC does not work properly if the SION bit is not set for the bidirectional CMD signal, whatever the eSDHC instance and the selected pad. Therefore, setting SION is mandatory for all eSDHC CMD ports. Do this for MX25_PAD_*__ESDHCn_CMD in imx25-pinfunc.h in order to enforce this behavior for all boards. This had already been done for eSDHC1, but not for eSDHC2. Also, define MX25_PAD_FEC_MDC__ESDHC2_CMD so that all the possible cases are covered from now on. Cc: Uwe Kleine-König Signed-off-by: Benoît Thébaudeau Reviewed-by: Fabio Estevam --- Changes v2 -> v3: - Quickly mention SION in each comment, besides the reference to the verbose comment (suggested by Uwe). Changes v1 -> v2: - Update eSDHC instance and port naming following the addition of "ARM: dts: imx25-pinfunc: Use consistent naming for eSDHC". - Reference the more verbose comment for MX25_PAD_SD1_CMD__ESDHC1_CMD instead of copying the same less detailed comment everywhere (suggested by Uwe). --- arch/arm/boot/dts/imx25-pinfunc.h | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/arch/arm/boot/dts/imx25-pinfunc.h b/arch/arm/boot/dts/imx25-pinfunc.h index 2915c65a13c9..a4807062a90f 100644 --- a/arch/arm/boot/dts/imx25-pinfunc.h +++ b/arch/arm/boot/dts/imx25-pinfunc.h @@ -236,7 +236,8 @@ #define MX25_PAD_LD8__LD8 0x0e8 0x2e0 0x000 0x00 0x000 #define MX25_PAD_LD8__UART4_RXD 0x0e8 0x2e0 0x570 0x02 0x000 #define MX25_PAD_LD8__FEC_TX_ERR 0x0e8 0x2e0 0x000 0x05 0x000 -#define MX25_PAD_LD8__ESDHC2_CMD 0x0e8 0x2e0 0x4e0 0x06 0x000 +/* SION must be set; see the comment for MX25_PAD_SD1_CMD__ESDHC1_CMD. */ +#define MX25_PAD_LD8__ESDHC2_CMD 0x0e8 0x2e0 0x4e0 0x16 0x000 #define MX25_PAD_LD9__LD9 0x0ec 0x2e4 0x000 0x00 0x000 #define MX25_PAD_LD9__UART4_TXD 0x0ec 0x2e4 0x000 0x02 0x000 @@ -316,7 +317,8 @@ #define MX25_PAD_CSI_D5__CSPI3_RDY 0x12c 0x324 0x000 0x07 0x000 #define MX25_PAD_CSI_D6__CSI_D6 0x130 0x328 0x000 0x00 0x000 -#define MX25_PAD_CSI_D6__ESDHC2_CMD 0x130 0x328 0x4e0 0x02 0x001 +/* SION must be set; see the comment for MX25_PAD_SD1_CMD__ESDHC1_CMD. */ +#define MX25_PAD_CSI_D6__ESDHC2_CMD 0x130 0x328 0x4e0 0x12 0x001 #define MX25_PAD_CSI_D6__SIM1_PD0 0x130 0x328 0x000 0x04 0x000 #define MX25_PAD_CSI_D6__GPIO_1_31 0x130 0x328 0x000 0x05 0x000 @@ -419,11 +421,11 @@ #define MX25_PAD_UART2_CTS__GPIO_4_29 0x18c 0x384 0x000 0x05 0x000 /* - * Removing the SION bit from MX25_PAD_SD1_CMD__ESDHC1_CMD breaks detecting an - * SD card. According to the i.MX25 reference manual (e.g. Figure 23-2 in - * IMX25RM Rev. 2 from 01/2011) this pin is bidirectional. So it seems to be a - * silicon bug that configuring the ESDHC1_CMD function doesn't enable the input - * path for this pin. + * Removing the SION bit from MX25_PAD_*__ESDHCn_CMD breaks detecting an SD + * card. According to the i.MX25 reference manual (e.g. Figure 23-2 in IMX25RM + * Rev. 2 from 01/2011) this pin is bidirectional. So it seems to be a silicon + * bug that configuring the ESDHCn_CMD function doesn't enable the input path + * for this pin. * This might have side effects for other hardware units that are connected to * that pin and use the respective function as input. */ @@ -496,6 +498,8 @@ #define MX25_PAD_KPP_COL3__GPIO_3_4 0x1c4 0x3bc 0x000 0x05 0x000 #define MX25_PAD_FEC_MDC__FEC_MDC 0x1c8 0x3c0 0x000 0x00 0x000 +/* SION must be set; see the comment for MX25_PAD_SD1_CMD__ESDHC1_CMD. */ +#define MX25_PAD_FEC_MDC__ESDHC2_CMD 0x1c8 0x3c0 0x4e0 0x11 0x002 #define MX25_PAD_FEC_MDC__AUD4_TXD 0x1c8 0x3c0 0x464 0x02 0x001 #define MX25_PAD_FEC_MDC__GPIO_3_5 0x1c8 0x3c0 0x000 0x05 0x000 -- 2.14.1