This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[AM3354]Is there any restriction to use GPIO3_14 as input?

Dear Team,

Is there any restriction to use GPIO3_14 as input?

my customer is using GPIO3_14 pin for SD card detection by connecting it to 'cd' of SD card connector, but they could not get any input when SD card was inserted. When other GPIO was used for this, there was no issue. And when they set GPIO3_14 as output, there was no issue and they found output change also.

I requested to check GPIO initialization and pinmux setting, but they confirmed there was no issue found.

Is there any restriction to use GPIO3_14 as input?

In HW, they connect 10kohm pullup register.

Thanks and Best Regards,

SI.

  • Hi SI,

    GPIO3_14 is hooked inside the MMC driver. They won't be able to check it from sysfs.

  • Thanks Biser,

    Then, Is there any method to use McASP0_ACLKx(GPIO3_14) for MMC0 CD in Linux?
    I saw the below comments that GPIO should be used for MMC CD in Linux system and thus I think there is no method to use McASP0_ACLKx pin for MMC0_CD even when it changed to 'MMC0_CD' mode in pinmux. is my understanding right?
    If they can modify MMC driver, can they use this pin as GPIO?

    "Linux uses aggressive Power management method to save Power. When MMC is not in use, clock is switched off to MMC module. Because of this, if CD & WP from MMC Controller is used, Card insertion/removal or Write-protect detection will not work properly. Hence GPIO for MMC CD & WP is used."


    And they found there was no issue when they set GPIO3_14 as output and found output change. Should this hook in MMC driver applied for input only?


    Thanks and Best Regards,
    SI.
  • I have asked the SW team to help on this.
  • Hi,

    I don't think they should modify the mmc driver.

    Could they try adding the following:
    cd-gpios = <&gpio3 14 GPIO_ACTIVE_HIGH>;
    inside the corresponding MMC device tree node?

    Note that they should also configure
    &gpio3 {
    ti,no-reset-on-init;
    };

    and add the gpio3_14 pad configurations:
    (PIN_INPUT | MUX_MODEx)
    inside mmc1_pins_default dts node.

    This should be enough for the drivers/mmc/core/host.c to configure gpio3_14 as MMC_CD.

    Hope this helps.

    Best Regards,
    Yordan