Hard Processor System Technical Reference Manual: Agilex™ 5 SoCs

ID 814346
Date 4/01/2024
Public
Document Table of Contents

5.4.6.6. SD Voltage Switching

The controller only supports 1.8V low voltage signaling (LVS) natively. The use of 3.3V memory cards requires level shifters to be placed between the combo PHY and the memory card.

Most of the cards start in HVS (3.3V) mode, then they can negotiate going down to 1.8V. For these cards, you need a GPIO to control the level shifter from HPS code during card initialization sequence.

There are LVS cards that only support 1.8V operation, and the controller could communicate with those cards without the need of level shifters. To detect a card that supports the LVS mode, the following initialization sequence must be used, as defined by the SD standard:

Figure 145. LVS Sequence

LVS sequence runs following steps:

  • Software confirms the low voltage signaling host capability register (SRS17.LVSH) is high
  • Software sets HRS09.LVSI_CNT and HRS09.LVSI_TCKSEL calculating SDCLK pulse with of minimum 15us
  • Software enables Internal Clock Enable (SRS11.ICE) and waits for Internal Clock Stable (SRS11.ICS)
  • Software enables LVSI Execution (SRS15.LVSIEXEC) (1)
  • Host drives CMD, DAT[3], DAT[1:0] low and pulls DAT[2] down
  • Host controller generate one clock pulse of the width defined in HRS09 (2_3)
  • Software waits at least 5010us (3_5)
  • Card drive DAT[2] high in 5ms after end of the clock fall edge (3_4)
  • Software checks LVSI Result (SRS09.LVSIRSLT) register (6)
  • If LVSI Result = 1 (success)
    • Host pull ups CMD, DAT lines (8,9)
    • Software enables SDCLK (10)
  • If LVSI Result = 0 (fail)
    • Software disables card power supply

When using the LVS sequence, you must use the PU_PD_DAT2 signal from the combo PHY to control pulling up and pulling down the DAT2 signal, for example with a circuit as shown below.

Figure 146. Example Circuit for Controlling PU/PD of DAT2