Article Directory
1 Introduction
Linux Kernel
The subsystem learned in this section MMC
is also called a block device driver. As the name suggests, compared with character drivers, the MMC
subsystem operates in units of blocks.
At the same time, since the device protocols of MMC Card
, SD Card
, , and so on are basically the same, the subsystem is used for unified management in !SDIO Card
Linux Kernel
MMC
2. Introduction to MMC/SD/SDIO
We learned above that Linux Kernel
a unified subsystem model is used to manage MMC
, SD
, SDIO
and other equipment, so why is it designed this way?
The answer is of course: the three agreements have certain commonality.
MMC(MultiMediaCard)
Multimedia card device, in essence, it is a memory card (memory card) specification for solid-state non-volatile storage, which defines such as card form, size, capacity, electrical signal, and communication between the host The content of the agreement and other aspects.
In 1997, the MMC
specification was officially released. So far, it has evolved into a variety of different specifications, such as , SD
, MicroSD
, and so on .SDIO
EMMC
MMC
Linux Kernel
MMC
: The emphasis is on multimedia storage (MM: MultiMedia)
SD
: The emphasis is on secure data (SD: Secure Digital)
SDIO
: The emphasis is on the IO interface (IO: Input/Output)
3. Bus interface
MMC
, SD
, and SDIO
their physical interfaces are also very similar, so let's take it MMC
as an example for analysis.
Our MMC
card is shown in the figure above. We do not analyze it internally, but directly analyze it as a complete device.
It communicates with us through pins such as CLK
, CMD
, and so on. Of course, the two are indispensable .DATA
SOC
Controller
Take out the communication bus part to see :
CLK
: ProvideSOC
the communication clock with the device, the commonly used communication frequency is400KHz
(card recognition),25MHz
,50MHz
CMD
: ProvidesSOC
communication commands with devices, identifies different command numbers, and has more than 50 types.
DATA
: ProvidesSOC
data communication with the device. There are 8 communication buses, which can be customized. Generally, the default is 1-bit (default) mode, 4-bit mode and 8-bit mode. Of course, the more data lines, the faster the transmission, but the processing is a little cumbersome.In addition to some of the above pins, of course, there are also pins such as
VCC
,GND
etc., which are different from other peripherals. There isMMC
also a detection pinDET
for detecting whether there is a card device (hot swap).
Well, above we have a brief understanding of MMC
, SD
, SDIO
and the common communication methods and physical interfaces. Of course, the core lies in the communication protocol! Since the protocol is too complicated, we will understand it later.
4. Reference articles
[1]:http://www.wowotech.net/basic_tech/mmc_sd_sdio_intro.html
Like + follow, never get lost