From mboxrd@z Thu Jan 1 00:00:00 1970 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 7812FC54E67 for ; Thu, 14 Mar 2024 12:19:09 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:CC:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=msRhbVsOKOLyl6bbitwzk9PFz5BsQmU7QmEwBvpKhgw=; b=xhOOn5nBYF2Dj3 T6WqVoIaPeUjk/KF54P+ADSiWB9Dk2bQCEuYpsYW11Dtbr7iX8ryUkXLiTC9cXBRiBC3iV0xpEV+2 qxaQnzEnBacMpuzeH/EG3UL+xgN6nNzaU+kFsk3B9W6xWSnT2tYy3TTMMMDp9iiwevNPgQkBVEsFV l7zQaGISGrZHs6buuLmpNIBZ90DodQgDlHocpclWXiFqthKCuYRjqvHGDyzl2aCs+fp9pzxZrPYQ0 iWzrn0KQbYQi1j9URlF5IvhQGWoqnqnWvL1OwQ7nPwQ4uGvzeDLccgPDVatpOC3zcB6aVGwc+Tt65 p/fCCPZKX21bz9o2f7lQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rkk2x-0000000ED0K-3xDW; Thu, 14 Mar 2024 12:18:56 +0000 Received: from lelv0142.ext.ti.com ([198.47.23.249]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rkk2t-0000000ECyy-02r3 for linux-arm-kernel@lists.infradead.org; Thu, 14 Mar 2024 12:18:53 +0000 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 42ECIXwh115297; Thu, 14 Mar 2024 07:18:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1710418713; bh=gFtneBT2IQ8anQD8kbxob+b2ublZuQ0VAIj9RPlUd/s=; h=Date:From:To:CC:Subject:References:In-Reply-To; b=DpLK7P/8puiZqCBai4dsfbOt6ITAHkRBDkzj2Rn/Y0CQEuScWmw4hKJuhzO36WyQT BRham6K6wB48O4sBYt2xenOKz7uouAKT4D1L4+23pxNvMWKRRN4/kNYkCTXSUFUpoB fYkq+UN1vqeuZ9scY2m4IKjuplG1fYaDus2UvjCA= Received: from DLEE112.ent.ti.com (dlee112.ent.ti.com [157.170.170.23]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 42ECIX9G015559 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 14 Mar 2024 07:18:33 -0500 Received: from DLEE113.ent.ti.com (157.170.170.24) by DLEE112.ent.ti.com (157.170.170.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Thu, 14 Mar 2024 07:18:33 -0500 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Thu, 14 Mar 2024 07:18:33 -0500 Received: from localhost (uda0133052.dhcp.ti.com [128.247.81.232]) by lelvsmtp6.itg.ti.com (8.15.2/8.15.2) with ESMTP id 42ECIXWN094446; Thu, 14 Mar 2024 07:18:33 -0500 Date: Thu, 14 Mar 2024 07:18:33 -0500 From: Nishanth Menon To: Francesco Dolcini CC: Vignesh Raghavendra , Tero Kristo , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Francesco Dolcini , , , , =?utf-8?Q?Jo=C3=A3o_Paulo_Silva_Gon=C3=A7alves?= Subject: Re: [PATCH v1] arm64: dts: ti: verdin-am62: use SD1 CD as GPIO Message-ID: <20240314121833.4fngkk35aw44o2x5@array> References: <20240312144956.40211-1-francesco@dolcini.it> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20240312144956.40211-1-francesco@dolcini.it> X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240314_051851_223183_EBBBC338 X-CRM114-Status: GOOD ( 21.64 ) 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: , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 15:49-20240312, Francesco Dolcini wrote: > From: Francesco Dolcini > = > TI SDHCI IP has a hardware debounce timer of 1 second as described in Umm... Minor clarification - the SDHCI IP is not TI's - as commit 41fd4caeb00bbd6dc55f056f3e8e956697b0760d says, this was an Arasan IP which was integrated into TI SoCs but needs it's own driver due to some quirkiness in the version TI picked up. Are you OK to rephrase this as TI SDHCI 'instance' rather than 'IP'? If yes, I can do the change locally when I commit. > 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. Side benefit of this will that if you boot out of emmc and when runtime PM disables the mmc instance, you still can detect card detect via GPIO block, which I think is a better source of wakeup than keeping mmc instance powered and clocked waiting for an sdcard insertion event. No action needed, just making a side note. > = > Suggested-by: Nishanth Menon > Reported-by: Jo=E3o Paulo Silva Gon=E7alves > Closes: https://lore.kernel.org/all/0e81af80de3d55e72f79af83fa5db87f5c993= 8f8.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.G= PIO1_19 */ /* SODIMM 161 */ > >; > }; > = > + /* Verdin SD_1_CD# as GPIO */ > + pinctrl_sd1_cd_gpio: main-gpio1-48-default-pins { > + pinctrl-single,pins =3D < > + 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 =3D < > @@ -571,7 +578,6 @@ AM62X_IOPAD(0x230, PIN_INPUT, 0) /* (A22) MMC1= _DAT0 */ /* SODIMM 80 */ > AM62X_IOPAD(0x22c, PIN_INPUT, 0) /* (B21) MMC1_DAT1 */ /* SODI= MM 82 */ > AM62X_IOPAD(0x228, PIN_INPUT, 0) /* (C21) MMC1_DAT2 */ /* SODI= MM 70 */ > AM62X_IOPAD(0x224, PIN_INPUT, 0) /* (D22) MMC1_DAT3 */ /* SODI= MM 72 */ > - AM62X_IOPAD(0x240, PIN_INPUT_PULLUP, 0) /* (D17) MMC1_SDCD */ /* SODI= MM 84 */ > >; > }; > = > @@ -1441,8 +1447,10 @@ &sdhci0 { > /* Verdin SD_1 */ > &sdhci1 { > pinctrl-names =3D "default"; > - pinctrl-0 =3D <&pinctrl_sdhci1>; > + pinctrl-0 =3D <&pinctrl_sdhci1>, <&pinctrl_sd1_cd_gpio>; > + cd-gpios =3D <&main_gpio1 48 GPIO_ACTIVE_LOW>; > disable-wp; > + ti,fails-without-test-cd; > vmmc-supply =3D <®_sdhc1_vmmc>; > vqmmc-supply =3D <®_sdhc1_vqmmc>; > status =3D "disabled"; > -- = > 2.39.2 > = -- = Regards, Nishanth Menon Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5= 849D 1736 249D _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel