eMMC PHY I/O Calibration not getting executed during eMMC boot

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: High
    • SITSW-7384
    • 11.00.00
    • Hide
      11.01.01
      11.02.00
      Show
      11.01.01 11.02.00
    • Hide
      am62xx-sk
      am62a-sk
      am62p-sk
      am62d-evm
      am275x-evm
      Show
      am62xx-sk am62a-sk am62p-sk am62d-evm am275x-evm

      The MMCSD_phyInit() function part of the eMMC initialization sequence contains a step to calibrate the PHY's I/Os, and for this sets the PDB bit in theĀ PHY_CTRL_1_REG control register. The issue is that this function assumes that the bit is clear initially, as only then will setting the bit create the 0->1 PDB bit transition that is required to start the calibration process as per TRM.

      However there are several cases where PDB is already set upon entering MMCSD_phyInit(), in which case the calibration sequence is NOT triggered:

      1. eMMC boot due to previous boot ROM activity, and
      2. Successive invocations of MMCSD_phyInit(), for example during SBL1 teardown and SBL2 startup

      The below proposed code change will unconditionally force a 0->1 transition of this control bit and with this ensure the calibration is performed.

      --- a/source/drivers/mmcsd/v0/mmcsd_v0.c
      +++ b/source/drivers/mmcsd/v0/mmcsd_v0.c
      @@ -2607,7 +2607,8 @@ static int32_t MMCSD_phyInit(uint32_t ssBaseAddr, uint32_t phyType)
               CSL_REG32_FINS(&ssReg->PHY_CTRL_1_REG, MMC_SSCFG_PHY_CTRL_1_REG_EN_RTRIM, 1U);
               while(CSL_REG32_FEXT(&ssReg->PHY_CTRL_1_REG, MMC_SSCFG_PHY_CTRL_1_REG_EN_RTRIM) != 1U);
       
      -        /* Set PDB to trigger calibration */
      +        /* Set PDB to 0->1 to trigger calibration */
      +        CSL_REG32_FINS(&ssReg->PHY_CTRL_1_REG, MMC_SSCFG_PHY_CTRL_1_REG_PDB, 0U);
               CSL_REG32_FINS(&ssReg->PHY_CTRL_1_REG, MMC_SSCFG_PHY_CTRL_1_REG_PDB, 1U);
       
               /* Wait for calibration to finish */ 
      

            Assignee:
            TI User
            Reporter:
            TI User
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Connection: Intermediate to External PROD System
                EXTSYNC-5588 - eMMC PHY I/O Calibration not gettin...
                SYNCHRONIZED
                • Last Sync Date: