Tegra SD card interface settings
The SD card interface can be disabled in Registry: Disable the SDCard driver.
Changing Card Detect Pin and Polarity
The SD card detect pin and its polarity can be changed by adding the following values to the registry:
"SodimmCardDetect" = dword:X ; X = the SODIMM pin number of the CardDetect GPIO. 0xffffffff means no CardDetect pin ->fix inserted card.
"CardDetectPol" = dword:Y ; Y = active polarity, 0: GPIO is low if card is available,
; 1: pin is high if card is available.
By default the SodimmCardDetect is set to SODIMM Pin 43 for default SDIO and -1 for all the other instances. CardDetectPol is active low (0) by default. You can use any other SODIMM Pin which is not used by any other interface as a card detect pin.
Default SDIO Pin Settings
As you can see in the datasheets of each module from the Tegra family, there are some different pins which can be used for the SDIO interfaces. Bellow you see a selection of possible SDIO instance configurations. Use the default and recommended 2nd interface to be compatible with the Colibri standard pinout.
Each of the following configuration has a default bus width, if you want to force a bus with of 4 or 8 bits, use the following registry key (supported since Image V2.0 beta 1):
"BusWidth" = dword:X ; Number of data lines forced to be used. If not define default setting for each configuration is used.
|2 (recommended 2nd interface)||96||98||4||101||103||79||97||67||59||85||65|
|1 (recommended 2nd interface)||96*||98*||4||101*||103*||79*||97*||-||-||-||-|
(*) These pins are multiplexed. Make sure the second instance on the SODIMM pin remains tristated
|1 (default 4 bit SD bus)||184||180||4||186||188||176||178||-||-||-||-|
|3 (default 8 bit MMC bus)||154||150||8||160||162||144||146||148||152||156||158|
SD Card SODIMM Pin Assignment
You can define the pin selection for the SD interfaces two different ways. Either use the Instance number from the table above (recommended) or select all the pins manually.
Select a configuration by instance number
Chose one of the instance numbers from the instance table above. The following example shows how to use a specific SDIO instance:
"SdioInstance" = "dword:4" ; Default is 4, See instance table above for alternative setups.
Define pins manually
We recommend to select the pin setup automatically as described above. Still if you do not want to use one of the SDIO instances predefined you can select the pins manually. We don't recommend selecting pins on your own as changing pins could lead to conflicting setups.
You can choose the SODIMM pin assignment.
Run multiple instances
It is possible to run multiple SDIO instance in parallel. Therefore just add an other key to the registry like this:
where as i is an incremented number (0 > i). Copy all the entries like they are in the main instance (Dll, Prefix, IClass, Order) and add the the specific pin configuration to the new key (i.e. SdioInstance) plus SDIO pin detect configuration. Up to four instances are supported.
Clock Speed and Misc Settings
This feature is available in Images V1.1 beta 4 and later.
SD card clock frequency can be limited to a maximum value - this can be useful for debugging purposes. The actual used frequency will be lower than MaximumClockFrequency.
ClockAlwaysOn has to be set to 0x1 if you want to prevent the clock being switched off if there is no communication going on. This is often used for SDIO WLAN adapters and similar devices.
"MaximumClockFrequency" = dword:01298be0 ; Maximum SD card clock (Hz). Default 52MHz.
"ClockAlwaysOn" = dword:value ; default value 0x0
"TapDelay" = dword:value ; TapDelay defines the time between the clock edge and when the
; controller samples the data signals. Default 0x4
"PowerUpDelay" = dword:Z ; Z = Delay in ms between powering up the device and start communication.
; Default value 200ms. Supported from image version 1.4 beta 1 on.
Using WriteProtect GPIO
Currently, the SDCard driver does not supports WriteProtect feature.
Testing alternative instances on the Colibri Evaluation Board V2.1
This is an example how to test an alternative SDIO setting. The following example tests the SD Card slot of the Evaluation Board with the SDIO instance 2 of the Colibri T20 and second configuration from table shown in Colibri T30 section above.
The following table shows the cabling. The inside rail in the table is the line of X9 or X10, outside is X12 or X7. of Please also take a look on the picture of the setup. Remove all the jumpers of the used pins.
|Port||Inside rail||Outside rail|
|CLK||Upper 38||Lower 16|
|CMD||Upper 39||Upper 45|
|DAT0||Lower 39||Upper 46|
|DAT1||Lower 40||Lower 17|
|DAT2||Lower 34||Lower 18|
|DAT3||Lower 38||Lower 19|