Регистры Allwinner H616

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

Контроллер Nand Flash (NDFC) ( Руководство )

Имя модуля: NDFC , базовый адрес: 0x04011000

Руководство п. 5.2.5


Регистров: 33

Имя регистра | Смещение


  • 1) NDFC_CTL | 0x0000

    typedef union  ndfc_ctl
    {
      struct
      {
       unsigned ndfc_en : 1;
       unsigned ndfc_reset : 1;
       unsigned ndfc_bus_width : 1;
       unsigned ndfc_rb_sel : 2;
       unsigned unused0 : 1;
       unsigned ndfc_ce_act : 1;
       unsigned unused1 : 1;
       unsigned ndfc_page_size : 4;
       unsigned unused2 : 2;
       unsigned ndfc_ram_method : 1;
       unsigned ndfc_dma_type : 1;
       unsigned ndfc_ale_pol : 1;
       unsigned ndfc_cle_pol : 1;
       unsigned nf_type : 2;
       unsigned ndfc_ddr_ren : 1;
       unsigned ndfc_ddr_rm : 1;
       unsigned unused3 : 2;
       unsigned ndfc_ce_sel : 4;
       unsigned ndfc_ddr_type : 1;
       unsigned unused4 : 3;
      } b;
       unsigned long w;
    } NDFC_CTL
       

  • 2) NDFC_ST | 0x0004

    typedef union  ndfc_st
    {
      struct
      {
       unsigned ndfc_rb_b2r : 1;
       unsigned ndfc_cmd_int_flag : 1;
       unsigned ndfc_dma_int_flag : 1;
       unsigned ndfc_cmd_fifo_status : 1;
       unsigned ndfc_sta : 1;
       unsigned unused0 : 3;
       unsigned ndfc_rb_state0 : 1;
       unsigned ndfc_rb_state1 : 1;
       unsigned ndfc_rb_state2 : 1;
       unsigned ndfc_rb_state3 : 1;
       unsigned ndfc_rdata_sta_1 : 1;
       unsigned ndfc_rdata_sta_0 : 1;
       unsigned unused1 : 18;
      } b;
       unsigned long w;
    } NDFC_ST
       

  • 3) NDFC_INT | 0x0008

    typedef union  ndfc_int
    {
      struct
      {
       unsigned ndfc_b2r_int_enable : 1;
       unsigned ndfc_cmd_int_enable : 1;
       unsigned ndfc_dma_int_enable : 1;
       unsigned unused0 : 29;
      } b;
       unsigned long w;
    } NDFC_INT
       

  • 4) NDFC_TIMING_CTL | 0x000C

    typedef union  ndfc_timing_ctl
    {
      struct
      {
       unsigned ndfc_dc_ctl : 6;
       unsigned unused0 : 2;
       unsigned ndfc_read_pipe : 4;
       unsigned unused1 : 20;
      } b;
       unsigned long w;
    } NDFC_TIMING_CTL
       

  • 5) NDFC_TIMING_CFG | 0x0010

    typedef union  ndfc_timing_cfg
    {
      struct
      {
       unsigned t_wb : 2;
       unsigned t_adl : 2;
       unsigned t_whr : 2;
       unsigned t_rhw : 2;
       unsigned t_cad : 3;
       unsigned t_cdqss : 1;
       unsigned t_cs : 2;
       unsigned t_clhz : 2;
       unsigned t_ccs : 2;
       unsigned t_wc : 2;
       unsigned unused0 : 12;
      } b;
       unsigned long w;
    } NDFC_TIMING_CFG
       

  • 6) NDFC_ADDR_LOW | 0x0014

    typedef union  ndfc_addr_low
    {
      struct
      {
       unsigned addr_data1 : 8;
       unsigned addr_data2 : 8;
       unsigned addr_data3 : 8;
       unsigned addr_data4 : 8;
      } b;
       unsigned long w;
    } NDFC_ADDR_LOW
       

  • 7) NDFC_ADDR_HIGH | 0x0018

    typedef union  ndfc_addr_high
    {
      struct
      {
       unsigned addr_data5 : 8;
       unsigned addr_data6 : 8;
       unsigned addr_data7 : 8;
       unsigned addr_data8 : 8;
      } b;
       unsigned long w;
    } NDFC_ADDR_HIGH
       

  • 8) NDFC_DATA_BLOCK_MASK | 0x001C

    typedef union  ndfc_data_block_mask
    {
      struct
      {
       unsigned ndfc_data_block_mask : 1;
       unsigned ndfc_data_block_mask : 1;
       unsigned ndfc_data_block_mask : 1;
       unsigned ndfc_data_block_mask : 1;
       unsigned ndfc_data_block_mask : 1;
       unsigned ndfc_data_block_mask : 1;
       unsigned ndfc_data_block_mask : 1;
       unsigned ndfc_data_block_mask : 1;
       unsigned ndfc_data_block_mask : 1;
       unsigned ndfc_data_block_mask : 1;
       unsigned ndfc_data_block_mask : 1;
       unsigned ndfc_data_block_mask : 1;
       unsigned ndfc_data_block_mask : 1;
       unsigned ndfc_data_block_mask : 1;
       unsigned ndfc_data_block_mask : 1;
       unsigned ndfc_data_block_mask : 1;
       unsigned ndfc_data_block_mask : 1;
       unsigned ndfc_data_block_mask : 1;
       unsigned ndfc_data_block_mask : 1;
       unsigned ndfc_data_block_mask : 1;
       unsigned ndfc_data_block_mask : 1;
       unsigned ndfc_data_block_mask : 1;
       unsigned ndfc_data_block_mask : 1;
       unsigned ndfc_data_block_mask : 1;
       unsigned ndfc_data_block_mask : 1;
       unsigned ndfc_data_block_mask : 1;
       unsigned ndfc_data_block_mask : 1;
       unsigned ndfc_data_block_mask : 1;
       unsigned ndfc_data_block_mask : 1;
       unsigned ndfc_data_block_mask : 1;
       unsigned ndfc_data_block_mask : 1;
       unsigned ndfc_data_block_mask : 1;
      } b;
       unsigned long w;
    } NDFC_DATA_BLOCK_MASK
       

  • 9) NDFC_CNT | 0x0020

    typedef union  ndfc_cnt
    {
      struct
      {
       unsigned ndfc_data_cnt : 10;
       unsigned unused0 : 22;
      } b;
       unsigned long w;
    } NDFC_CNT
       

  • 10) NDFC_CMD | 0x0024

    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
       

  • 11) NDFC_CMD_SET0 | 0x0028

    typedef union  ndfc_cmd_set0
    {
      struct
      {
       unsigned ndfc_read_cmd : 8;
       unsigned ndfc_random_read_cmd0 : 8;
       unsigned ndfc_random_read_cmd1 : 8;
       unsigned ndfc_random_cmd2 : 8;
      } b;
       unsigned long w;
    } NDFC_CMD_SET0
       

  • 12) NDFC_CMD_SET1 | 0x002C

    typedef union  ndfc_cmd_set1
    {
      struct
      {
       unsigned ndfc_program_cmd : 8;
       unsigned ndfc_random_write_cmd : 8;
       unsigned ndfc_read_cmd1 : 8;
       unsigned ndfc_read_cmd0 : 8;
      } b;
       unsigned long w;
    } NDFC_CMD_SET1
       

  • 13) NDFC_ECC_CTL | 0x0034

    typedef union  ndfc_ecc_ctl
    {
      struct
      {
       unsigned ndfc_ecc_en : 1;
       unsigned unused0 : 2;
       unsigned ndfc_ecc_pipeline : 1;
       unsigned ndfc_ecc_exception : 1;
       unsigned ndfc_random_en : 1;
       unsigned ndfc_random_direction : 1;
       unsigned ndfc_random_size : 1;
       unsigned ndfc_ecc_mode : 8;
       unsigned ndfc_random_seed : 15;
       unsigned unused1 : 1;
      } b;
       unsigned long w;
    } NDFC_ECC_CTL
       

  • 14) NDFC_ECC_ST | 0x0038

    typedef union  ndfc_ecc_st
    {
      struct
      {
       unsigned ndfc_ecc_err : 1;
       unsigned ndfc_ecc_err : 1;
       unsigned ndfc_ecc_err : 1;
       unsigned ndfc_ecc_err : 1;
       unsigned ndfc_ecc_err : 1;
       unsigned ndfc_ecc_err : 1;
       unsigned ndfc_ecc_err : 1;
       unsigned ndfc_ecc_err : 1;
       unsigned ndfc_ecc_err : 1;
       unsigned ndfc_ecc_err : 1;
       unsigned ndfc_ecc_err : 1;
       unsigned ndfc_ecc_err : 1;
       unsigned ndfc_ecc_err : 1;
       unsigned ndfc_ecc_err : 1;
       unsigned ndfc_ecc_err : 1;
       unsigned ndfc_ecc_err : 1;
       unsigned ndfc_ecc_err : 1;
       unsigned ndfc_ecc_err : 1;
       unsigned ndfc_ecc_err : 1;
       unsigned ndfc_ecc_err : 1;
       unsigned ndfc_ecc_err : 1;
       unsigned ndfc_ecc_err : 1;
       unsigned ndfc_ecc_err : 1;
       unsigned ndfc_ecc_err : 1;
       unsigned ndfc_ecc_err : 1;
       unsigned ndfc_ecc_err : 1;
       unsigned ndfc_ecc_err : 1;
       unsigned ndfc_ecc_err : 1;
       unsigned ndfc_ecc_err : 1;
       unsigned ndfc_ecc_err : 1;
       unsigned ndfc_ecc_err : 1;
       unsigned ndfc_ecc_err : 1;
      } b;
       unsigned long w;
    } NDFC_ECC_ST
       

  • 15) NDFC_DATA_PAT_STA | 0x003C

    typedef union  ndfc_data_pat_sta
    {
      struct
      {
       unsigned pattern0 : 1;
       unsigned pattern1 : 1;
       unsigned pattern2 : 1;
       unsigned pattern3 : 1;
       unsigned pattern4 : 1;
       unsigned pattern5 : 1;
       unsigned pattern6 : 1;
       unsigned pattern7 : 1;
       unsigned pattern8 : 1;
       unsigned pattern9 : 1;
       unsigned pattern10 : 1;
       unsigned pattern11 : 1;
       unsigned pattern12 : 1;
       unsigned pattern13 : 1;
       unsigned pattern14 : 1;
       unsigned pattern15 : 1;
       unsigned pattern16 : 1;
       unsigned pattern17 : 1;
       unsigned pattern18 : 1;
       unsigned pattern19 : 1;
       unsigned pattern20 : 1;
       unsigned pattern21 : 1;
       unsigned pattern22 : 1;
       unsigned pattern23 : 1;
       unsigned pattern24 : 1;
       unsigned pattern25 : 1;
       unsigned pattern26 : 1;
       unsigned pattern27 : 1;
       unsigned pattern28 : 1;
       unsigned pattern29 : 1;
       unsigned pattern30 : 1;
       unsigned pattern31 : 1;
      } b;
       unsigned long w;
    } NDFC_DATA_PAT_STA
       

  • 16) NDFC_EFR | 0x0040

    typedef union  ndfc_efr
    {
      struct
      {
       unsigned ndfc_ecc_debug : 7;
       unsigned unused0 : 1;
       unsigned ndfc_wp_ctrl : 1;
       unsigned unused1 : 7;
       unsigned db_cnt : 8;
       unsigned db_cnt_en : 1;
       unsigned unused2 : 7;
      } b;
       unsigned long w;
    } NDFC_EFR
       

  • 17) NDFC_RDATA_STA_CTL | 0x0044

    typedef union  ndfc_rdata_sta_ctl
    {
      struct
      {
       unsigned ndfc_rdata_sta_th : 19;
       unsigned unused0 : 5;
       unsigned ndfc_rdata_sta_en : 1;
       unsigned unused1 : 7;
      } b;
       unsigned long w;
    } NDFC_RDATA_STA_CTL
       

  • 18) NDFC_RDATA_STA_0 | 0x0048

    typedef union  ndfc_rdata_sta_0
    {
      struct
      {
       unsigned bit_cnt_1 : 32;
      } b;
       unsigned long w;
    } NDFC_RDATA_STA_0
       

  • 19) NDFC_RDATA_STA_1 | 0x004C

    typedef union  ndfc_rdata_sta_1
    {
      struct
      {
       unsigned bit_cnt_0 : 32;
      } b;
       unsigned long w;
    } NDFC_RDATA_STA_1
       

  • 20) NDFC_ERR_CNT_N | 0x0050+0x04*N

    typedef union  ndfc_err_cnt_n
    {
      struct
      {
       unsigned ecc_cor_num0 : 8;
       unsigned ecc_cor_num1 : 8;
       unsigned ecc_cor_num2 : 8;
       unsigned ecc_cor_num2 : 8;
      } b;
       unsigned long w;
    } NDFC_ERR_CNT_N
       

  • 21) NDFC_USER_DATA_LEN_N | 0x0070+0x04*N

    typedef union  ndfc_user_data_len_n
    {
      struct
      {
       unsigned ecc_data_len0 : 4;
       unsigned ecc_data_len1 : 4;
       unsigned ecc_data_len2 : 4;
       unsigned ecc_data_len3 : 4;
       unsigned ecc_data_len4 : 4;
       unsigned ecc_data_len5 : 4;
       unsigned ecc_data_len6 : 4;
       unsigned ecc_data_len7 : 4;
      } b;
       unsigned long w;
    } NDFC_USER_DATA_LEN_N
       

  • 22) NDFC_USER_DATA_N | 0x0080+0x04*N

    typedef union  ndfc_user_data_n
    {
      struct
      {
       unsigned user_data : 32;
      } b;
       unsigned long w;
    } NDFC_USER_DATA_N
       

  • 23) NDFC_EFNAND_STATUS | 0x0110

    typedef union  ndfc_efnand_status
    {
      struct
      {
       unsigned ef_nand_status : 8;
       unsigned unused0 : 24;
      } b;
       unsigned long w;
    } NDFC_EFNAND_STATUS
       

  • 24) NDFC_PAT_ID | 0x0118

    typedef union  ndfc_pat_id
    {
      struct
      {
       unsigned pat_id : 32;
      } b;
       unsigned long w;
    } NDFC_PAT_ID
       

  • 25) NDFC_DDR2_SPEC_CTL | 0x011C

    typedef union  ndfc_ddr2_spec_ctl
    {
      struct
      {
       unsigned unused0 : 1;
       unsigned en_dqs_c : 1;
       unsigned en_re_c : 1;
       unsigned unused1 : 5;
       unsigned dlen_rd : 4;
       unsigned dlen_wr : 4;
       unsigned unused2 : 16;
      } b;
       unsigned long w;
    } NDFC_DDR2_SPEC_CTL
       

  • 26) NDFC_NDMA_MODE_CTL | 0x0120

    typedef union  ndfc_ndma_mode_ctl
    {
      struct
      {
       unsigned delay_cycle : 5;
       unsigned dma_ack_en : 1;
       unsigned dma_act_sta : 2;
       unsigned unused0 : 24;
      } b;
       unsigned long w;
    } NDFC_NDMA_MODE_CTL
       

  • 27) NDFC_MDMA_DLBA_REG | 0x0200

    typedef union  ndfc_mdma_dlba_reg
    {
      struct
      {
       unsigned nfc_mdma_desc_base_addr : 32;
      } b;
       unsigned long w;
    } NDFC_MDMA_DLBA_REG
       

  • 28) NDFC_MDMA_STA | 0x0204

    typedef union  ndfc_mdma_sta
    {
      struct
      {
       unsigned nfc_mdma_trans_finish_int : 32;
      } b;
       unsigned long w;
    } NDFC_MDMA_STA
       

  • 29) NDFC_DMA_INT_MASK | 0x0208

    typedef union  ndfc_dma_int_mask
    {
      struct
      {
       unsigned nfc_mdma_trans_int_enb : 32;
      } b;
       unsigned long w;
    } NDFC_DMA_INT_MASK
       

  • 30) NDFC_MDMA_CUR_DESC_ADDR | 0x020C

    typedef union  ndfc_mdma_cur_desc_addr
    {
      struct
      {
       unsigned cur_desc_addr : 32;
      } b;
       unsigned long w;
    } NDFC_MDMA_CUR_DESC_ADDR
       

  • 31) NDFC_MDMA_CUR_BUF_ADDR | 0x0210

    typedef union  ndfc_mdma_cur_buf_addr
    {
      struct
      {
       unsigned cur_buff_addr : 32;
      } b;
       unsigned long w;
    } NDFC_MDMA_CUR_BUF_ADDR
       

  • 32) NDFC_DMA_CNT | 0x0214

    typedef union  ndfc_dma_cnt
    {
      struct
      {
       unsigned dma_cnt : 16;
       unsigned unused0 : 16;
      } b;
       unsigned long w;
    } NDFC_DMA_CNT
       

  • 33) NDFC_IO_DATA | 0x0300

    typedef union  ndfc_io_data
    {
      struct
      {
       unsigned ndfc_io_data : 32;
      } b;
       unsigned long w;
    } NDFC_IO_DATA
       


  • Allwinner H616 Manual