Регистры Allwinner H616

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


NDFC_CMD
5.2.5. NDFC Commands IO Register - адрес: 0x4011024 (смещение: 0x0024)

Контроллер Nand Flash (NDFC): список регистров



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

  NDFC_CMD_TYPE

Bits 31 : 30
R/W
0x0

00: Common command for normal operation
01: Special command for Flash spare field operation
10: Page command for batch process operation
11: Reserved


  NDFC_SEND_FOURTH_CMD

Bit 29
R/W
0x0

0: Donot send fourth set command
1: Send it on the external memory's bus
It is used for EF-NAND page read.


  NDFC_SEND_THIRD_CMD

Bit 28
R/W
0x0

0: Donot send third set command
1: Send it on the external memory's bus
It is used for EF-NAND page read.


  NDFC_SEND_RANDOM_CMD2_CTL

Bit 27
R/W
0x0

0: Donot send random cmd2 (NDFC_RANDOM_CMD2)
1: Send random cmd2
Note: It is only valid in batch cmd operation and writing operation.


  NDFC_DATA_METHOD

Bit 26
R/W
0x0

Data swap method when the internal RAM and system memory
It is only active for common command and special command.
0: No action
1: DMA transfer automatically

It only is active when NDFC_RAM_METHOD is 1.
If this bit is set to 1, NDFC should setup DRQ to fetch data before output to Flash
or NDFC should setup DRQ to send to system memory after fetching data from Flash.
If this bit is set to 0, NDFC output the data in internal RAM or do nothing after
fetching data from Flash.


  NDFC_SEQ

Bit 25
R/W
0x0

User data & BCH check word position. It only is active for Page Command, donot
care about this bit for other two commands.
0: Interleave Method (on page spare area)
1: Sequence Method (following data block)


  NDFC_SEND_SECOND_CMD

Bit 24
R/W
0x0

0: Donot send second set command
1: Send it on the external memory's bus


  NDFC_WAIT_FLAG

Bit 23
R/W
0x0

0: NDFC can transfer data regardless of the internal NDFC_RB wire
1: NDFC can transfer data when the internal NDFC_RB wire is READY; otherwise it
cannot when the internal NDFC_RB wire is BUSY


  NDFC_SEND_FIRST_CMD

Bit 22
R/W
0x0

0: Donot send first set command
1: Send it on the external memory's bus


  NDFC_DATA_TRANS

Bit 21
R/W
0x0

0: No data transfer on external memory bus
1: Data transfer and direction is decided by the field NDFC_ACCESS_DIR


  NDFC_ACCESS_DIR

Bit 20
R/W
0x0

0: Read NAND Flash
1: Write NAND Flash


  NDFC_SEND_ADR

Bit 19
R/W
0x0

0: Donot send ADDRESS
1: Send N cycles ADDRESS, the number N is specified by NDFC_ADR_NUM field


  NDFC_ADR_NUM

Bits 18 : 16
R/W
0x0

Address Cycles' Number
000: 1 cycle address field
001: 2 cycles address field

010: 3 cycles address field
011: 4 cycles address field
100: 5 cycles address field
101: 6 cycles address field
110: 7 cycles address field
111: 8 cycles address field


  Unused

Bits 15 : 10

  NDFC_ADR_NUM_IN_PAGE_CMD

Bits 9 : 8
R/W
0x0

The number of address cycles during page command.
00: 2 address cycles
11: 5 address cycles
Others: reserved


  NDFC_CMD_LOW_BYTE

Bits 7 : 0
R/W
0x0

NDFC command low byte data
This command will be sent to external Flash by NDFC.



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

md 4011024 1



Bit fields structure

typedef union  ndfc_cmd
{
  struct
  {
   unsigned ndfc_cmd_low_byte : 8;
   unsigned ndfc_adr_num_in_page_cmd : 2;
   unsigned unused0 : 6;
   unsigned ndfc_adr_num : 3;
   unsigned ndfc_send_adr : 1;
   unsigned ndfc_access_dir : 1;
   unsigned ndfc_data_trans : 1;
   unsigned ndfc_send_first_cmd : 1;
   unsigned ndfc_wait_flag : 1;
   unsigned ndfc_send_second_cmd : 1;
   unsigned ndfc_seq : 1;
   unsigned ndfc_data_method : 1;
   unsigned ndfc_send_random_cmd2_ctl : 1;
   unsigned ndfc_send_third_cmd : 1;
   unsigned ndfc_send_fourth_cmd : 1;
   unsigned ndfc_cmd_type : 2;
  } b;
   unsigned long w;
} NDFC_CMD
   

Allwinner H616 Manual