Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

arm64: dts: ti: verdin-am62: use SD1 CD as GPIO

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 <nm@ti.com>
Reported-by: João Paulo Silva Gonçalves <joao.goncalves@toradex.com>
Closes: https://lore.kernel.org/all/0e81af80de3d55e72f79af83fa5db87f5c9938f8.camel@toradex.com/
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Link: https://lore.kernel.org/r/20240325083340.89568-1-francesco@dolcini.it
Signed-off-by: Nishanth Menon <nm@ti.com>

authored by

Francesco Dolcini and committed by
Nishanth Menon
ef00a95d f70a8882

+10 -2
+10 -2
arch/arm64/boot/dts/ti/k3-am62-verdin.dtsi
··· 457 457 >; 458 458 }; 459 459 460 + /* Verdin SD_1_CD# as GPIO */ 461 + pinctrl_sd1_cd_gpio: main-gpio1-48-default-pins { 462 + pinctrl-single,pins = < 463 + AM62X_IOPAD(0x240, PIN_INPUT_PULLUP, 7) /* (D17) MMC1_SDCD.GPIO1_48 */ /* SODIMM 84 */ 464 + >; 465 + }; 466 + 460 467 /* Verdin DSI_1_INT# (pulled-up as active-low) */ 461 468 pinctrl_dsi1_int: main-gpio1-49-default-pins { 462 469 pinctrl-single,pins = < ··· 578 571 AM62X_IOPAD(0x22c, PIN_INPUT, 0) /* (B21) MMC1_DAT1 */ /* SODIMM 82 */ 579 572 AM62X_IOPAD(0x228, PIN_INPUT, 0) /* (C21) MMC1_DAT2 */ /* SODIMM 70 */ 580 573 AM62X_IOPAD(0x224, PIN_INPUT, 0) /* (D22) MMC1_DAT3 */ /* SODIMM 72 */ 581 - AM62X_IOPAD(0x240, PIN_INPUT_PULLUP, 0) /* (D17) MMC1_SDCD */ /* SODIMM 84 */ 582 574 >; 583 575 }; 584 576 ··· 1447 1441 /* Verdin SD_1 */ 1448 1442 &sdhci1 { 1449 1443 pinctrl-names = "default"; 1450 - pinctrl-0 = <&pinctrl_sdhci1>; 1444 + pinctrl-0 = <&pinctrl_sdhci1>, <&pinctrl_sd1_cd_gpio>; 1445 + cd-gpios = <&main_gpio1 48 GPIO_ACTIVE_LOW>; 1451 1446 disable-wp; 1452 1447 vmmc-supply = <&reg_sdhc1_vmmc>; 1453 1448 vqmmc-supply = <&reg_sdhc1_vqmmc>; 1449 + ti,fails-without-test-cd; 1454 1450 status = "disabled"; 1455 1451 }; 1456 1452