From patchwork Mon Mar 25 08:33:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Francesco Dolcini X-Patchwork-Id: 13601629 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 94692C54E64 for ; Mon, 25 Mar 2024 08:34:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=sNywpYSxXwRV0ORHMwR9KOUEUu3HkXi+ZcNH9vups/k=; b=od/ARGve+IhccN VYf1bd0JPYHwXe6Cnd6maM56oGEN7quKveaIf+sHyWF0Pl92tQ2KN5rfEuZmTwkoWs7D4NyV6it2i 3FTmWjrqrixqGVyeF4c/ouzpplPx61XRh6DR8gACwAGWxdOGOku6TQeZQduDyxn25is7O2Qw+SRWJ 4Qja2bYxrqCh3hB3Y/3nxN9bhZq9QN49ewxX4SNofKKtfWdBNEl7U3hMnleCBWDhSWqAi1CGz68CP MASHV+S3+BpUvg9tx2f7I9gczYaXErZ4eRTTBWKaGIuFlO44AK29Y6HKckISaxD3eTYPNMgqyadJ7 +YHY2EscmEmmOOxZcTdQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rofmI-0000000GBRD-1TwK; Mon, 25 Mar 2024 08:33:58 +0000 Received: from mail11.truemail.it ([217.194.8.81]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rofmD-0000000GBNU-3LQO for linux-arm-kernel@lists.infradead.org; Mon, 25 Mar 2024 08:33:56 +0000 Received: from francesco-nb.pivistrello.it (93-49-2-63.ip317.fastwebnet.it [93.49.2.63]) by mail11.truemail.it (Postfix) with ESMTPA id 08ADB1FA01; Mon, 25 Mar 2024 09:33:45 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dolcini.it; s=default; t=1711355625; bh=mNS41FOyVsAOnUEk3gZHijAjdgdn/kzDlZJLki1qjos=; h=From:To:Subject; b=FmOoAIEmj4vnfLjU77jilulW19E9VyGA2LbpEXESa5WOYsFU2UlyCbLcVxZn28isd dWu7qjjBwAkD4rWnn8Vb+S0BX8QREbLB4xc/LLJcLUZAi3ZH41x8DZUQ5zb84Wslir HVEJfKzrfqiox4MygqRKfLODtPmxEHr8mTNQy9xfzBiR+Tb1XabXMRiqSOUqQLLkR5 GCdXQW5G3XQeB/g9C18sZo5E6WiwpNYIh0uRTcEYHDZr8qkDVY5AjrMKN16grXN66K 5MD2lPZg3bSxLWr2g0B0dHyQvd0nPYK0KM9IASClIrTZvfxo3MUBmHJTg2kj6hBO4H k3r15PikaeGZw== From: Francesco Dolcini To: Nishanth Menon , Vignesh Raghavendra , Tero Kristo , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Francesco Dolcini , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, =?utf-8?q?Jo=C3=A3o_Paulo_Silva_Gon=C3=A7alve?= =?utf-8?q?s?= Subject: [PATCH v2] arm64: dts: ti: verdin-am62: use SD1 CD as GPIO Date: Mon, 25 Mar 2024 09:33:40 +0100 Message-Id: <20240325083340.89568-1-francesco@dolcini.it> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240325_013354_776620_299D4E9A X-CRM114-Status: GOOD ( 13.81 ) 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: Francesco Dolcini TI SDHCI instance has a hardware debounce timer of 1 second as described in commit 7ca0f166f5b2 ("mmc: sdhci_am654: Add workaround for card detect debounce timer"), because of this the boot time increases of up to 1 second. Workaround the issue the same way that is done on arch/arm64/boot/dts/ti/k3-am625-beagleplay.dts, using the SD1 CD as GPIO. Suggested-by: Nishanth Menon Reported-by: João Paulo Silva Gonçalves Closes: https://lore.kernel.org/all/0e81af80de3d55e72f79af83fa5db87f5c9938f8.camel@toradex.com/ Signed-off-by: Francesco Dolcini --- v2: * rebased on v6.9-rc1 * move `ti,fails-without-test-cd` before `status` * use SDHCI instance, instead of SDHCI IP in the commit message v1: https://lore.kernel.org/all/20240312144956.40211-1-francesco@dolcini.it/ --- arch/arm64/boot/dts/ti/k3-am62-verdin.dtsi | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/ti/k3-am62-verdin.dtsi b/arch/arm64/boot/dts/ti/k3-am62-verdin.dtsi index e8d8857ad51f..b1cc2e60aa23 100644 --- a/arch/arm64/boot/dts/ti/k3-am62-verdin.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am62-verdin.dtsi @@ -457,6 +457,13 @@ AM62X_IOPAD(0x01c4, PIN_INPUT, 7) /* (B14) SPI0_D1.GPIO1_19 */ /* SODIMM 161 */ >; }; + /* Verdin SD_1_CD# as GPIO */ + pinctrl_sd1_cd_gpio: main-gpio1-48-default-pins { + pinctrl-single,pins = < + AM62X_IOPAD(0x240, PIN_INPUT_PULLUP, 7) /* (D17) MMC1_SDCD.GPIO1_48 */ /* SODIMM 84 */ + >; + }; + /* Verdin DSI_1_INT# (pulled-up as active-low) */ pinctrl_dsi1_int: main-gpio1-49-default-pins { pinctrl-single,pins = < @@ -571,7 +578,6 @@ AM62X_IOPAD(0x230, PIN_INPUT, 0) /* (A22) MMC1_DAT0 */ /* SODIMM 80 */ AM62X_IOPAD(0x22c, PIN_INPUT, 0) /* (B21) MMC1_DAT1 */ /* SODIMM 82 */ AM62X_IOPAD(0x228, PIN_INPUT, 0) /* (C21) MMC1_DAT2 */ /* SODIMM 70 */ AM62X_IOPAD(0x224, PIN_INPUT, 0) /* (D22) MMC1_DAT3 */ /* SODIMM 72 */ - AM62X_IOPAD(0x240, PIN_INPUT_PULLUP, 0) /* (D17) MMC1_SDCD */ /* SODIMM 84 */ >; }; @@ -1441,10 +1447,12 @@ &sdhci0 { /* Verdin SD_1 */ &sdhci1 { pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_sdhci1>; + pinctrl-0 = <&pinctrl_sdhci1>, <&pinctrl_sd1_cd_gpio>; + cd-gpios = <&main_gpio1 48 GPIO_ACTIVE_LOW>; disable-wp; vmmc-supply = <®_sdhc1_vmmc>; vqmmc-supply = <®_sdhc1_vqmmc>; + ti,fails-without-test-cd; status = "disabled"; };