Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp1126490lql; Tue, 12 Mar 2024 08:02:36 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWWTPA+FkWAer3sXyxlT8yxOMIWufxADYwpebi+oUFme7uHty946gXi7eh7MnI6Iy1rnn51AiDlC/sxzn8JFX8PQhqJTMiv4+BqGpyJgA== X-Google-Smtp-Source: AGHT+IFtMHRwNZfdWEIMfEOW+LAaCqZlGNbs+sHqTjTt8Ri+fIsqMaxs+cN0VLPDC94xDnWg5J2n X-Received: by 2002:a17:906:d7b2:b0:a45:89f3:3947 with SMTP id pk18-20020a170906d7b200b00a4589f33947mr2502598ejb.74.1710255756752; Tue, 12 Mar 2024 08:02:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710255756; cv=pass; d=google.com; s=arc-20160816; b=lClE0O4SwOkhXxRkiLmvvRnvtC/DtOSxbyGNi6SSAtrhlhNLtt67jKpiS11fS5u90Q rGREuRLNb5eFBRQTnFDtCPnUnGbH8KW5h19OHS7lkNhaih5GnpkQ+UgR+uVGrb1Mf/IX e0Jk633CWL+B6jqr3Cw+bXRNd2/F87pUGJcWrcJeAToNyefnOgHLgJihH8sYIea/4MqO OqqSi+rJkcmxL6bePHQSX7gR+gHI6nNDNMXUusTRwtrP2S+X+IVQE4ji6EGvj27Ze83K Q2Og7CJ9oMDQpmKhAAIC+8K2qEmvma4aoAyu+/3vaWZY4EY9QLVfRSqsjKvuAvZaAilX UBXw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=KnYzDyMeuR48i4fmNxkTQzPwgnl3FF6TOTdlr9ivhJs=; fh=AsOmxI2LUk6LWk+hwVhSxIv0oP70KAalPA8w9N2OU0o=; b=QodryQI/J4odFlX+qSgiymuzNMrXnEufchl+Ng7ZZ2a1F/U1LfBySClBxOOML2dUKi 9kV9JCFzSH6IuXs3teB6s5RLyznihOAy45RelbgHsVfdHDK1EGVTLY1XjzTFK6SQ8sSz pq7ADbW0JPLQ+dP2fkNU8q/fjXOcT5iQiUp0cB/DlxN9kOtcYFdb28EPEW+NiUObWY2x jl1FCndwQ+0K/7EzHI5X2xLRqnrUQCgdj1ziJR2teCrN4gMz50V15ZP7VJ9ztN3NgNhA K8gMgVpX3uHiK28FVG6bwJeRnQPDsXNWRCZ5gsxpdXdNCls1Jl7LLMnApmHsAn+NkMn9 cyHQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@dolcini.it header.s=default header.b=BvTG8xQe; arc=pass (i=1 spf=pass spfdomain=dolcini.it dkim=pass dkdomain=dolcini.it dmarc=pass fromdomain=dolcini.it); spf=pass (google.com: domain of linux-kernel+bounces-100403-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-100403-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=dolcini.it Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id uz15-20020a170907118f00b00a45feec5654si3649106ejb.113.2024.03.12.08.02.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Mar 2024 08:02:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-100403-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@dolcini.it header.s=default header.b=BvTG8xQe; arc=pass (i=1 spf=pass spfdomain=dolcini.it dkim=pass dkdomain=dolcini.it dmarc=pass fromdomain=dolcini.it); spf=pass (google.com: domain of linux-kernel+bounces-100403-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-100403-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=dolcini.it Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 93E421F26608 for ; Tue, 12 Mar 2024 14:55:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 527D67BAF7; Tue, 12 Mar 2024 14:55:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=dolcini.it header.i=@dolcini.it header.b="BvTG8xQe" Received: from mail11.truemail.it (mail11.truemail.it [217.194.8.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9B35BF4FA; Tue, 12 Mar 2024 14:55:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.194.8.81 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710255350; cv=none; b=gx4WaS+vXHFDcgN7ELZWWxakrnPCdvxSous0DxemWBBijQeIOsZ91KNaASxaIlCXB9SSW+CQ0kKnXJs549mrjpoBQ82cHNPNAWkaib6+P2WCgt+zMUNDHD2b1G9fZKJvAoUZrEQo+cWzvuZNwTnR8NtgnSiV2Yg257hfpyO1qrI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710255350; c=relaxed/simple; bh=Usc6II35rVzJzpenuRz/2bqBjACu/dy3zUh+dVjJGIA=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Content-Type; b=q/O0bLSIlea0C0ZyB0T22cyfDibH3mDknXFQZAXPKSlVkV2lTdMzJoi9ueiy5MN25udSlpMlLrpAbRR8DU98GtCJZkJLAtlx+jFSte5UCcDB15jPKvvOPA6r889Sji2j5ssKdcoHpG2BRjoUqpVVaBhjpB4NdAXticFDx+pBtWY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=dolcini.it; spf=pass smtp.mailfrom=dolcini.it; dkim=pass (2048-bit key) header.d=dolcini.it header.i=@dolcini.it header.b=BvTG8xQe; arc=none smtp.client-ip=217.194.8.81 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=dolcini.it Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=dolcini.it 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=20Paulo=20Silva=20Gon=C3=A7alves?= 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 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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"; -- 2.39.2