From patchwork Mon Aug 19 12:03:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 13768300 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E3539C5320E for ; Mon, 19 Aug 2024 12:15:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=JumtuzK8XLrkvwXQmvob2btUs9cZwoIh8escPZtwZ2M=; b=kgL6rygtkTYJEgA0YTJdTtm3T0 ab//06rjlYi9Qmxq/Y/fGxH6tCIGxPbsEKvJAdFlOIGI15lxxOQ6r2B7yc4e8tGEPk36AMz9mNJlE CKnZhILM+TU6BA2pGhLax9WWzaztzQdC2c2FyukGDEInxwakWZaHsI5QYz2BpaOE8pVX4m/PvSgup 4g9b9PzRT1qmAZ5k0URaJV5QCVr64JWpP7ALc1dk3ocY71b2IjWZqHUwQQsvPzdMHevmmbZFPdMV7 xWz9CJ2QlnnOoBS54ZfYVv+77sOY/rhkZJa4lEPF5BrEHbjvmoOXY+ESOlCxRKivYjIKFlW9urT5y S+nt5L+g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sg1IC-00000001OYc-1BuD; Mon, 19 Aug 2024 12:15:24 +0000 Received: from mx1.tq-group.com ([93.104.207.81]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sg184-00000001LEu-0F8E for linux-arm-kernel@lists.infradead.org; Mon, 19 Aug 2024 12:04:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1724069096; x=1755605096; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=JumtuzK8XLrkvwXQmvob2btUs9cZwoIh8escPZtwZ2M=; b=CzBkwdWOD8Qoe+fT9JUnhvbx8pp9fs1Jzw9Msd+LjlmIkLJlJ4l4FthU HOYN4eb1wYtTPTX9CLoFmbXRy8DT3TMK9nMsR301jkoVJww1dh1HSqe8U WvwmAUysGWgGR9L2QOIYs175ciASGDhZSjwwMlNEt7KqLn0/w8tst6lBm wKevSLD/EXTYQW1s3rtM8hKvpgkM3lLX/lbRtdtt8TWg0VN1Nfu8QBbCN LUg6RQ1FTe679lsZmhHUxLTmglctR556VHlpTAxXfx/55g0F32p51G5uB dwnFqZ6b1pWmddU5rK6lAhetiDpTFYDbAp2owN6q408vSk98Q6LhsKmdG A==; X-CSE-ConnectionGUID: H6ylRNp4QGOYzmWAkP3+0g== X-CSE-MsgGUID: /m5zX0iyQGO0UST+0rz0jw== X-IronPort-AV: E=Sophos;i="6.10,159,1719871200"; d="scan'208";a="38467155" Received: from vmailcow01.tq-net.de ([10.150.86.48]) by mx1.tq-group.com with ESMTP; 19 Aug 2024 14:04:55 +0200 X-CheckPoint: {66C334E7-2-2C7A84BB-EFCBC4CF} X-MAIL-CPID: 044AA1D7A1F585426253344FFDE0D044_2 X-Control-Analysis: str=0001.0A782F1D.66C334E7.0043,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id E89D9168943; Mon, 19 Aug 2024 14:04:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ew.tq-group.com; s=dkim; t=1724069090; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=JumtuzK8XLrkvwXQmvob2btUs9cZwoIh8escPZtwZ2M=; b=Ptm6UHb4n6hSq52LmHYASzQjRBZxZRJAtJTo7UGhEDQrTng0PUUyYiyQNjk1wIIK83r5Kg zG4tp2T8xcIPT9NeYTPwoc0TKjYvYiWN4WlXOK8iUrMHieP6fCDKYCcKU/eRyxZTxPF819 tjDJQ3cH4zdzwP7Ss+57zqaYdXxp4lqmOebSlaKTD8lHrWU69YYmTH27eb83R1Q3MX3B79 Dzc0za5d4h+FxxZNbo/WWNsj1vXdy7IQTJIaiHcABI5p+kPfEf5kIou1tRGzBu4oMV5ioh kijTElMn04Ez2vZpykSA3Q2zq4RfQJqWw3Vah0DKfwZBNTDy+9DN4Awy8nV5cg== From: Alexander Stein To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: Markus Niebel , linux@ew.tq-group.com, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Alexander Stein Subject: [PATCH v2 14/14] arm64: dts: freescale: imx93-tqma9352: set SION for cmd and data pad of USDHC Date: Mon, 19 Aug 2024 14:03:28 +0200 Message-Id: <20240819120328.229622-15-alexander.stein@ew.tq-group.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240819120328.229622-1-alexander.stein@ew.tq-group.com> References: <20240819120328.229622-1-alexander.stein@ew.tq-group.com> MIME-Version: 1.0 X-Last-TLS-Session-Version: TLSv1.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240819_050456_485782_A387A0C1 X-CRM114-Status: GOOD ( 12.80 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Markus Niebel imx93 pad integrate has one issue, refer to ERR052021: ERR052021 uSDHC: Sometimes uSDHC does not work under VDD_SOC low drive mode and nominal mode Description: uSDHC PADs have one integration issue. When CMD/DATA lines direction change from output to input, uSDHC controller begin sampling, the integration issue will make input enable signal from uSDHC propagated to the PAD with a long delay, thus the new input value on the pad comes to uSDHC lately. The uSDHC sampled the old input value and the sampling result is wrong. Workaround: Set uSDHC CMD/DATA PADs iomux register SION bit to 1, then PADs will propagate input to uSDHC with no delay, so correct value is sampled. This issue will wrongly trigger the start bit when sample the USDHC command response, cause the USDHC trigger command CRC/index/endbit error, which will finally impact the tuning pass window, espically will impact the standard tuning logic, and can't find a correct delay cell to get the best timing. This follows changes made for i.MX93 EVK with commit bb89601282fc ("arm64: dts: imx93-11x11-evk: set SION for cmd and data pad of USDHC") Signed-off-by: Markus Niebel Signed-off-by: Alexander Stein --- .../freescale/imx93-tqma9352-mba93xxca.dts | 22 ++++++++++--------- .../freescale/imx93-tqma9352-mba93xxla.dts | 22 ++++++++++--------- .../boot/dts/freescale/imx93-tqma9352.dtsi | 19 ++++++++-------- 3 files changed, 34 insertions(+), 29 deletions(-) diff --git a/arch/arm64/boot/dts/freescale/imx93-tqma9352-mba93xxca.dts b/arch/arm64/boot/dts/freescale/imx93-tqma9352-mba93xxca.dts index 79b9f13de4af5..599df32976e24 100644 --- a/arch/arm64/boot/dts/freescale/imx93-tqma9352-mba93xxca.dts +++ b/arch/arm64/boot/dts/freescale/imx93-tqma9352-mba93xxca.dts @@ -870,32 +870,34 @@ MX93_PAD_SD2_CD_B__GPIO3_IO00 0x1000 >; }; + /* enable SION for data and cmd pad due to ERR052021 */ pinctrl_usdhc2_hs: usdhc2hsgrp { fsl,pins = < /* PD | FSEL_3 | DSE X5 */ MX93_PAD_SD2_CLK__USDHC2_CLK 0x05be /* HYS | PU | FSEL_3 | DSE X4 */ - MX93_PAD_SD2_CMD__USDHC2_CMD 0x139e + MX93_PAD_SD2_CMD__USDHC2_CMD 0x4000139e /* HYS | PU | FSEL_3 | DSE X3 */ - MX93_PAD_SD2_DATA0__USDHC2_DATA0 0x138e - MX93_PAD_SD2_DATA1__USDHC2_DATA1 0x138e - MX93_PAD_SD2_DATA2__USDHC2_DATA2 0x138e - MX93_PAD_SD2_DATA3__USDHC2_DATA3 0x138e + MX93_PAD_SD2_DATA0__USDHC2_DATA0 0x4000138e + MX93_PAD_SD2_DATA1__USDHC2_DATA1 0x4000138e + MX93_PAD_SD2_DATA2__USDHC2_DATA2 0x4000138e + MX93_PAD_SD2_DATA3__USDHC2_DATA3 0x4000138e /* FSEL_2 | DSE X3 */ MX93_PAD_SD2_VSELECT__USDHC2_VSELECT 0x010e >; }; + /* enable SION for data and cmd pad due to ERR052021 */ pinctrl_usdhc2_uhs: usdhc2uhsgrp { fsl,pins = < /* PD | FSEL_3 | DSE X6 */ MX93_PAD_SD2_CLK__USDHC2_CLK 0x05fe /* HYS | PU | FSEL_3 | DSE X4 */ - MX93_PAD_SD2_CMD__USDHC2_CMD 0x139e - MX93_PAD_SD2_DATA0__USDHC2_DATA0 0x139e - MX93_PAD_SD2_DATA1__USDHC2_DATA1 0x139e - MX93_PAD_SD2_DATA2__USDHC2_DATA2 0x139e - MX93_PAD_SD2_DATA3__USDHC2_DATA3 0x139e + MX93_PAD_SD2_CMD__USDHC2_CMD 0x4000139e + MX93_PAD_SD2_DATA0__USDHC2_DATA0 0x4000139e + MX93_PAD_SD2_DATA1__USDHC2_DATA1 0x4000139e + MX93_PAD_SD2_DATA2__USDHC2_DATA2 0x4000139e + MX93_PAD_SD2_DATA3__USDHC2_DATA3 0x4000139e /* FSEL_2 | DSE X3 */ MX93_PAD_SD2_VSELECT__USDHC2_VSELECT 0x010e >; diff --git a/arch/arm64/boot/dts/freescale/imx93-tqma9352-mba93xxla.dts b/arch/arm64/boot/dts/freescale/imx93-tqma9352-mba93xxla.dts index 3f8726180bba2..0b4b3bb866d06 100644 --- a/arch/arm64/boot/dts/freescale/imx93-tqma9352-mba93xxla.dts +++ b/arch/arm64/boot/dts/freescale/imx93-tqma9352-mba93xxla.dts @@ -832,32 +832,34 @@ MX93_PAD_SD2_CD_B__GPIO3_IO00 0x1000 >; }; + /* enable SION for data and cmd pad due to ERR052021 */ pinctrl_usdhc2_hs: usdhc2hsgrp { fsl,pins = < /* PD | FSEL_3 | DSE X5 */ MX93_PAD_SD2_CLK__USDHC2_CLK 0x05be /* HYS | PU | FSEL_3 | DSE X4 */ - MX93_PAD_SD2_CMD__USDHC2_CMD 0x139e + MX93_PAD_SD2_CMD__USDHC2_CMD 0x4000139e /* HYS | PU | FSEL_3 | DSE X3 */ - MX93_PAD_SD2_DATA0__USDHC2_DATA0 0x138e - MX93_PAD_SD2_DATA1__USDHC2_DATA1 0x138e - MX93_PAD_SD2_DATA2__USDHC2_DATA2 0x138e - MX93_PAD_SD2_DATA3__USDHC2_DATA3 0x138e + MX93_PAD_SD2_DATA0__USDHC2_DATA0 0x4000138e + MX93_PAD_SD2_DATA1__USDHC2_DATA1 0x4000138e + MX93_PAD_SD2_DATA2__USDHC2_DATA2 0x4000138e + MX93_PAD_SD2_DATA3__USDHC2_DATA3 0x4000138e /* FSEL_2 | DSE X3 */ MX93_PAD_SD2_VSELECT__USDHC2_VSELECT 0x010e >; }; + /* enable SION for data and cmd pad due to ERR052021 */ pinctrl_usdhc2_uhs: usdhc2uhsgrp { fsl,pins = < /* PD | FSEL_3 | DSE X6 */ MX93_PAD_SD2_CLK__USDHC2_CLK 0x05fe /* HYS | PU | FSEL_3 | DSE X4 */ - MX93_PAD_SD2_CMD__USDHC2_CMD 0x139e - MX93_PAD_SD2_DATA0__USDHC2_DATA0 0x139e - MX93_PAD_SD2_DATA1__USDHC2_DATA1 0x139e - MX93_PAD_SD2_DATA2__USDHC2_DATA2 0x139e - MX93_PAD_SD2_DATA3__USDHC2_DATA3 0x139e + MX93_PAD_SD2_CMD__USDHC2_CMD 0x4000139e + MX93_PAD_SD2_DATA0__USDHC2_DATA0 0x4000139e + MX93_PAD_SD2_DATA1__USDHC2_DATA1 0x4000139e + MX93_PAD_SD2_DATA2__USDHC2_DATA2 0x4000139e + MX93_PAD_SD2_DATA3__USDHC2_DATA3 0x4000139e /* FSEL_2 | DSE X3 */ MX93_PAD_SD2_VSELECT__USDHC2_VSELECT 0x010e >; diff --git a/arch/arm64/boot/dts/freescale/imx93-tqma9352.dtsi b/arch/arm64/boot/dts/freescale/imx93-tqma9352.dtsi index 48ba60832eb3e..2cabdae242273 100644 --- a/arch/arm64/boot/dts/freescale/imx93-tqma9352.dtsi +++ b/arch/arm64/boot/dts/freescale/imx93-tqma9352.dtsi @@ -270,6 +270,7 @@ MX93_PAD_SD2_RESET_B__GPIO3_IO07 0x106 >; }; + /* enable SION for data and cmd pad due to ERR052021 */ pinctrl_usdhc1: usdhc1grp { fsl,pins = < /* PD | FSEL 3 | DSE X5 */ @@ -277,16 +278,16 @@ MX93_PAD_SD1_CLK__USDHC1_CLK 0x5be /* HYS | FSEL 0 | no drive */ MX93_PAD_SD1_STROBE__USDHC1_STROBE 0x1000 /* HYS | FSEL 3 | X5 */ - MX93_PAD_SD1_CMD__USDHC1_CMD 0x11be + MX93_PAD_SD1_CMD__USDHC1_CMD 0x400011be /* HYS | FSEL 3 | X4 */ - MX93_PAD_SD1_DATA0__USDHC1_DATA0 0x119e - MX93_PAD_SD1_DATA1__USDHC1_DATA1 0x119e - MX93_PAD_SD1_DATA2__USDHC1_DATA2 0x119e - MX93_PAD_SD1_DATA3__USDHC1_DATA3 0x119e - MX93_PAD_SD1_DATA4__USDHC1_DATA4 0x119e - MX93_PAD_SD1_DATA5__USDHC1_DATA5 0x119e - MX93_PAD_SD1_DATA6__USDHC1_DATA6 0x119e - MX93_PAD_SD1_DATA7__USDHC1_DATA7 0x119e + MX93_PAD_SD1_DATA0__USDHC1_DATA0 0x4000119e + MX93_PAD_SD1_DATA1__USDHC1_DATA1 0x4000119e + MX93_PAD_SD1_DATA2__USDHC1_DATA2 0x4000119e + MX93_PAD_SD1_DATA3__USDHC1_DATA3 0x4000119e + MX93_PAD_SD1_DATA4__USDHC1_DATA4 0x4000119e + MX93_PAD_SD1_DATA5__USDHC1_DATA5 0x4000119e + MX93_PAD_SD1_DATA6__USDHC1_DATA6 0x4000119e + MX93_PAD_SD1_DATA7__USDHC1_DATA7 0x4000119e >; };