Регистры Allwinner H616

Сокращения  |  Дерево шин  |  Карта памяти


SMHC_CTRL
5.3.5. Control Register - адрес: 0x4020000 0x4021000 0x4022000 (смещение: 0x0000)

Хост-контроллер SD / MMC (SMHC): список регистров



31 ||||||||||||||||| 16
15 ||||||||||||||||| 00

  FIFO_AC_MOD

Bit 31
R/W
0x0

FIFO Access Mode
0: DMA bus
1: AHB bus


  Unused

Bits 30 : 13

  TIME_UNIT_CMD

Bit 12
R/W
0x0

Time unit for command line
Time unit is used to calculate command line time out value defined in RTO_LMT
0: 1 card clock period
1: 256 card clock period


  TIME_UNIT_DAT

Bit 11
R/W
0x0

Time unit for data line
Time unit is used to calculate data line time out value defined in DTO_LMT
0: 1 card clock period
1: 256 card clock period


  DDR_MOD_SEL

Bit 10
R/W
0x0

DDR Mode Select
Although eMMC's HS400 speed mode is 8-bit DDR, this filed should be cleared when HS400_MD_EN is set.
0: SDR mode
1: DDR mode


  Unused

Bit 9

  CD_DBC_ENB

Bit 8
R/W
0x1

Card Detect (Data[3] status) De-bounce Enable
0: Disable de-bounce
1: Enable de-bounce


  Unused

Bits 7 : 6

  DMA_ENB

Bit 5
R/W
0x0

DMA Global Enable
0: Disable DMA to transfer data, using AHB bus
1: Enable DMA to transfer data


  INT_ENB

Bit 4
R/W
0x0

Global Interrupt Enable
0: Disable interrupts
1: Enable interrupts


  Unused

Bit 3

  DMA_RST

Bit 2
R/W
0x0

DMA Reset


  FIFO_RST

Bit 1
R/W
0x0

FIFO Reset
0: No change
1: Reset FIFO
This bit is auto-cleared after completion of reset operation.


  SOFT_RST

Bit 0
R/W
0x0

Software Reset
0: No change
1: Reset SD/MMC controller
This bit is auto-cleared after completion of reset operation.



Команда U-Boot для чтения регистра

md 4020000 1
md 4021000 1
md 4022000 1



Bit fields structure

typedef union  smhc_ctrl
{
  struct
  {
   unsigned soft_rst : 1;
   unsigned fifo_rst : 1;
   unsigned dma_rst : 1;
   unsigned unused0 : 1;
   unsigned int_enb : 1;
   unsigned dma_enb : 1;
   unsigned unused1 : 2;
   unsigned cd_dbc_enb : 1;
   unsigned unused2 : 1;
   unsigned ddr_mod_sel : 1;
   unsigned time_unit_dat : 1;
   unsigned time_unit_cmd : 1;
   unsigned unused3 : 18;
   unsigned fifo_ac_mod : 1;
  } b;
   unsigned long w;
} SMHC_CTRL
   

Allwinner H616 Manual