VSELECT PIN in SD1 and SD2

cancel
Showing results for 
Search instead for 
Did you mean: 

VSELECT PIN in SD1 and SD2

1,230 Views
vincentchou
Contributor IV

Dear support,

We have designed a custom board based on i.MX6 SABRESD but already added 1.8V logic circuitry for SD1, SD2 and SD3 in order to access these SD cards in high speed.  Except we can only reserve the original VSELECT for SD3 but use different GPIO pins for VSELECT on SD1 and SD3.  Could you tell us how we could reassign the VSELECT pins of SD1 and SD2 n the 3.0.101 BSP? 

Vincent

Labels (4)
0 Kudos
5 Replies

434 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi Vincent

add static const struct esdhc_platform_data mx6q_sabreauto_sd3_data __initconst []

.support_18v        = 1,

..

for voltage selection signals:

SD1_VSELECT=KEY_COL1[ALT6], SD2_VSELECT=KEY_ROW1[ALT6]

add definition to ..mach-mx6/board-mx6q_sabreauto.h :

    /* SD3 VSelect */

    MX6Q_PAD_GPIO_18__USDHC3_VSELECT,

check also Chapter 4 Adding Support for SDHC attached

i.MX_6Dual6Quad_BSP_Porting_Guide.pdf

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 Kudos

434 Views
vincentchou
Contributor IV

Hi!  Igor,

Thanks for your quick comment!  Even though we add this pin, MX6Q_PAD_GPIO_18__USDHC3_VSELECT, on SD3 circuitry which we copied from Sabreauto and follow the definition you mentioned in the reply, the vselect signal is not changed when we inserted a UHS-I card.   Is there any additional GPIO command we need to add in the BSP as well?

Vincent

0 Kudos

434 Views
vincentchou
Contributor IV

Hi!  Igor,

I also discovered that we found there is no change of VSELECT signal even we inserted an High speed card to SD3 slot.  I checked the code and found there is a section inside sdhci-esdhci-imx.c

======================

static void esdhc_writeb_le(struct sdhci_host *host, u8 val, int reg)

{

  u32 new_val;

  switch (reg) {

  case SDHCI_POWER_CONTROL:

  /*

  * FSL put some DMA bits here

  * If your board has a regulator, code should be here

  */

  if (val == (SDHCI_POWER_ON | SDHCI_POWER_180)) {

  u32 reg;

  /* stop sd clock */

  reg = readl(host->ioaddr + SDHCI_VENDOR_SPEC);

  writel(reg & ~SDHCI_VENDOR_SPEC_FRC_SDCLK_ON, \

  host->ioaddr + SDHCI_VENDOR_SPEC);

  /* switch to 1.8V */

  reg = readl(host->ioaddr + SDHCI_VENDOR_SPEC);

  reg |= SDHCI_VENDOR_SPEC_VSELECT;

  writel(reg, host->ioaddr + SDHCI_VENDOR_SPEC);

  } else {

  u32 reg;

  reg = readl(host->ioaddr + SDHCI_VENDOR_SPEC);

  reg &= ~SDHCI_VENDOR_SPEC_VSELECT;

  writel(reg, host->ioaddr + SDHCI_VENDOR_SPEC);

  }

  return;

=========================

Should we modify the code inside the mmc driver to switch the voltage by ourself?

Vincent

0 Kudos

434 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi Vincent

I am afraid on 3.0.35 uhsi was not tested, as mentioned below

Re: Enabling UHSI on USDHC4

suggest to try latest uboots and, if necessary, backport changes to

3.0.35 (aka u-boot-2009.08)

~igor

0 Kudos

434 Views
vincentchou
Contributor IV

Hi!  Igor,

Do you mean we should switch back port to 3.0.35 instead of porting to a newer kernel like 3.14.28?  Right now the kernel we used is 3.0.101?  Can we use the kernel of 3.0.101 but uses u-boot of 3.0.35?  Can we just use gpio command to switch the regulator of VSELECT pin we specify in order to switch different Vcc?  We would like to suport UHS-I.  Is it possible for us to use 3.0.101?

Vincent

0 Kudos