From patchwork Tue Mar 12 14:49:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Francesco Dolcini X-Patchwork-Id: 13590130 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 95FF8C54E5D for ; Tue, 12 Mar 2024 14:50:43 +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=rxfYhn/K0+3AOJoNS/d6Am9dP1mwqrDRcbhefmUPPaU=; b=2BKTXdKkrBHsGK 8XSAugPa9Sd4LaebUrzB6amM+M/jmZiEHk8TA3UQPT4vmq90QsrZWIKV5k+wZS9Qq7NSbjI0vR+jr 9XKVgdqQESzQy0fN8k8YivlPWKR6CI1vxbdiTrItDKksqweuBpeLrtewlBZexi7fic8yrgohofIPT ZsM4cT+ffWD9pwwakaqmvlqFiwUlDDQxddXVcipz+Q0NqfTOZsCNM6vdoSDsKAz8kNpTl5WW8AX3B YsnlDJecQgzBtRMGmfKLyUWtRztpJWfNYkFbSPaz6LKaJX+dVBxfaz5cL+AOsiTA/PLLl0zN9rTL6 gKjT6heSMmrnu5SbYJKQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rk3SW-00000006E8A-0iNH; Tue, 12 Mar 2024 14:50:28 +0000 Received: from mail11.truemail.it ([2001:4b7e:0:8::81]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rk3SJ-00000006E1v-0juj for linux-arm-kernel@lists.infradead.org; Tue, 12 Mar 2024 14:50:27 +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 3DD392136C; Tue, 12 Mar 2024 15:50:02 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dolcini.it; s=default; t=1710255002; bh=KnYzDyMeuR48i4fmNxkTQzPwgnl3FF6TOTdlr9ivhJs=; h=From:To:Subject; b=BvTG8xQe0m0s8Lms5yOHgjAzMv4CUox3XM7B4jHt6xq90vwhoo+fyyao36uGs9Yjj SGPZZxF2iv4xM/6ocuvAiTUZlKmxYMIiiMteZEhhQPKyQjpIoFiIeJvTX+v4b2MvSN UPV+imeMVPcrIenApjZBIIt9axE+gDRdXgK7+u+wciQYLcShuu++oIbVkfLx1AvrU5 eIJg54Q0I7J7yfeyVmx1I8SVIeBMf5wdgQ1k+SM1ZKAwAHv2yEZVs3c7oV067sjT+C TQLK1/ABLj7iAbMzXwRovde4+9h9BBQQg/joqQDtQbkNKzdjmxxNqhHcsG0LwLPTES 8KPRK05ah6nAg== 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 v1] arm64: dts: ti: verdin-am62: use SD1 CD as GPIO Date: Tue, 12 Mar 2024 15:49:56 +0100 Message-Id: <20240312144956.40211-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-20240312_075022_209867_3ECCBAE4 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: Francesco Dolcini TI SDHCI IP 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 --- 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..a9bf2c17f95a 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,8 +1447,10 @@ &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; + ti,fails-without-test-cd; vmmc-supply = <®_sdhc1_vmmc>; vqmmc-supply = <®_sdhc1_vqmmc>; status = "disabled";