1 /**************************************************************************** 2 **************************************************************************** 3 *** 4 *** This header was automatically generated from a Linux kernel header 5 *** of the same name, to make information necessary for userspace to 6 *** call into the kernel available to libc. It contains only constants, 7 *** structures, and macros generated from the original header, and thus, 8 *** contains no copyrightable information. 9 *** 10 *** To edit the content of this header, modify the corresponding 11 *** source file (e.g. under external/kernel-headers/original/) then 12 *** run bionic/libc/kernel/tools/update_all.py 13 *** 14 *** Any manual change here will be lost the next time this script will 15 *** be run. You've been warned! 16 *** 17 **************************************************************************** 18 ****************************************************************************/ 19 #ifndef __ONENAND_REG_H 20 #define __ONENAND_REG_H 21 #define ONENAND_MEMORY_MAP(x) ((x) << 1) 22 #define ONENAND_BOOTRAM ONENAND_MEMORY_MAP(0x0000) 23 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 24 #define ONENAND_DATARAM ONENAND_MEMORY_MAP(0x0200) 25 #define ONENAND_SPARERAM ONENAND_MEMORY_MAP(0x8010) 26 #define ONENAND_REG_MANUFACTURER_ID ONENAND_MEMORY_MAP(0xF000) 27 #define ONENAND_REG_DEVICE_ID ONENAND_MEMORY_MAP(0xF001) 28 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 29 #define ONENAND_REG_VERSION_ID ONENAND_MEMORY_MAP(0xF002) 30 #define ONENAND_REG_DATA_BUFFER_SIZE ONENAND_MEMORY_MAP(0xF003) 31 #define ONENAND_REG_BOOT_BUFFER_SIZE ONENAND_MEMORY_MAP(0xF004) 32 #define ONENAND_REG_NUM_BUFFERS ONENAND_MEMORY_MAP(0xF005) 33 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 34 #define ONENAND_REG_TECHNOLOGY ONENAND_MEMORY_MAP(0xF006) 35 #define ONENAND_REG_START_ADDRESS1 ONENAND_MEMORY_MAP(0xF100) 36 #define ONENAND_REG_START_ADDRESS2 ONENAND_MEMORY_MAP(0xF101) 37 #define ONENAND_REG_START_ADDRESS3 ONENAND_MEMORY_MAP(0xF102) 38 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 39 #define ONENAND_REG_START_ADDRESS4 ONENAND_MEMORY_MAP(0xF103) 40 #define ONENAND_REG_START_ADDRESS5 ONENAND_MEMORY_MAP(0xF104) 41 #define ONENAND_REG_START_ADDRESS6 ONENAND_MEMORY_MAP(0xF105) 42 #define ONENAND_REG_START_ADDRESS7 ONENAND_MEMORY_MAP(0xF106) 43 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 44 #define ONENAND_REG_START_ADDRESS8 ONENAND_MEMORY_MAP(0xF107) 45 #define ONENAND_REG_START_BUFFER ONENAND_MEMORY_MAP(0xF200) 46 #define ONENAND_REG_COMMAND ONENAND_MEMORY_MAP(0xF220) 47 #define ONENAND_REG_SYS_CFG1 ONENAND_MEMORY_MAP(0xF221) 48 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 49 #define ONENAND_REG_SYS_CFG2 ONENAND_MEMORY_MAP(0xF222) 50 #define ONENAND_REG_CTRL_STATUS ONENAND_MEMORY_MAP(0xF240) 51 #define ONENAND_REG_INTERRUPT ONENAND_MEMORY_MAP(0xF241) 52 #define ONENAND_REG_START_BLOCK_ADDRESS ONENAND_MEMORY_MAP(0xF24C) 53 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 54 #define ONENAND_REG_END_BLOCK_ADDRESS ONENAND_MEMORY_MAP(0xF24D) 55 #define ONENAND_REG_WP_STATUS ONENAND_MEMORY_MAP(0xF24E) 56 #define ONENAND_REG_ECC_STATUS ONENAND_MEMORY_MAP(0xFF00) 57 #define ONENAND_REG_ECC_M0 ONENAND_MEMORY_MAP(0xFF01) 58 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 59 #define ONENAND_REG_ECC_S0 ONENAND_MEMORY_MAP(0xFF02) 60 #define ONENAND_REG_ECC_M1 ONENAND_MEMORY_MAP(0xFF03) 61 #define ONENAND_REG_ECC_S1 ONENAND_MEMORY_MAP(0xFF04) 62 #define ONENAND_REG_ECC_M2 ONENAND_MEMORY_MAP(0xFF05) 63 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 64 #define ONENAND_REG_ECC_S2 ONENAND_MEMORY_MAP(0xFF06) 65 #define ONENAND_REG_ECC_M3 ONENAND_MEMORY_MAP(0xFF07) 66 #define ONENAND_REG_ECC_S3 ONENAND_MEMORY_MAP(0xFF08) 67 #define ONENAND_DEVICE_DENSITY_SHIFT (4) 68 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 69 #define ONENAND_DEVICE_IS_DDP (1 << 3) 70 #define ONENAND_DEVICE_IS_DEMUX (1 << 2) 71 #define ONENAND_DEVICE_VCC_MASK (0x3) 72 #define ONENAND_DEVICE_DENSITY_512Mb (0x002) 73 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 74 #define ONENAND_VERSION_PROCESS_SHIFT (8) 75 #define ONENAND_DDP_SHIFT (15) 76 #define ONENAND_FPA_MASK (0x3f) 77 #define ONENAND_FPA_SHIFT (2) 78 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 79 #define ONENAND_FSA_MASK (0x03) 80 #define ONENAND_BSA_MASK (0x03) 81 #define ONENAND_BSA_SHIFT (8) 82 #define ONENAND_BSA_BOOTRAM (0 << 2) 83 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 84 #define ONENAND_BSA_DATARAM0 (2 << 2) 85 #define ONENAND_BSA_DATARAM1 (3 << 2) 86 #define ONENAND_BSC_MASK (0x03) 87 #define ONENAND_CMD_READ (0x00) 88 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 89 #define ONENAND_CMD_READOOB (0x13) 90 #define ONENAND_CMD_PROG (0x80) 91 #define ONENAND_CMD_PROGOOB (0x1A) 92 #define ONENAND_CMD_UNLOCK (0x23) 93 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 94 #define ONENAND_CMD_LOCK (0x2A) 95 #define ONENAND_CMD_LOCK_TIGHT (0x2C) 96 #define ONENAND_CMD_ERASE (0x94) 97 #define ONENAND_CMD_RESET (0xF0) 98 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 99 #define ONENAND_CMD_OTP_ACCESS (0x65) 100 #define ONENAND_CMD_READID (0x90) 101 #define ONENAND_CMD_BUFFERRAM (0x1978) 102 #define ONENAND_SYS_CFG1_SYNC_READ (1 << 15) 103 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 104 #define ONENAND_SYS_CFG1_BRL_7 (7 << 12) 105 #define ONENAND_SYS_CFG1_BRL_6 (6 << 12) 106 #define ONENAND_SYS_CFG1_BRL_5 (5 << 12) 107 #define ONENAND_SYS_CFG1_BRL_4 (4 << 12) 108 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 109 #define ONENAND_SYS_CFG1_BRL_3 (3 << 12) 110 #define ONENAND_SYS_CFG1_BRL_10 (2 << 12) 111 #define ONENAND_SYS_CFG1_BRL_9 (1 << 12) 112 #define ONENAND_SYS_CFG1_BRL_8 (0 << 12) 113 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 114 #define ONENAND_SYS_CFG1_BRL_SHIFT (12) 115 #define ONENAND_SYS_CFG1_BL_32 (4 << 9) 116 #define ONENAND_SYS_CFG1_BL_16 (3 << 9) 117 #define ONENAND_SYS_CFG1_BL_8 (2 << 9) 118 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 119 #define ONENAND_SYS_CFG1_BL_4 (1 << 9) 120 #define ONENAND_SYS_CFG1_BL_CONT (0 << 9) 121 #define ONENAND_SYS_CFG1_BL_SHIFT (9) 122 #define ONENAND_SYS_CFG1_NO_ECC (1 << 8) 123 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 124 #define ONENAND_SYS_CFG1_RDY (1 << 7) 125 #define ONENAND_SYS_CFG1_INT (1 << 6) 126 #define ONENAND_SYS_CFG1_IOBE (1 << 5) 127 #define ONENAND_SYS_CFG1_RDY_CONF (1 << 4) 128 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 129 #define ONENAND_CTRL_ONGO (1 << 15) 130 #define ONENAND_CTRL_LOCK (1 << 14) 131 #define ONENAND_CTRL_LOAD (1 << 13) 132 #define ONENAND_CTRL_PROGRAM (1 << 12) 133 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 134 #define ONENAND_CTRL_ERASE (1 << 11) 135 #define ONENAND_CTRL_ERROR (1 << 10) 136 #define ONENAND_CTRL_RSTB (1 << 7) 137 #define ONENAND_CTRL_OTP_L (1 << 6) 138 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 139 #define ONENAND_CTRL_OTP_BL (1 << 5) 140 #define ONENAND_INT_MASTER (1 << 15) 141 #define ONENAND_INT_READ (1 << 7) 142 #define ONENAND_INT_WRITE (1 << 6) 143 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 144 #define ONENAND_INT_ERASE (1 << 5) 145 #define ONENAND_INT_RESET (1 << 4) 146 #define ONENAND_INT_CLEAR (0 << 0) 147 #define ONENAND_WP_US (1 << 2) 148 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 149 #define ONENAND_WP_LS (1 << 1) 150 #define ONENAND_WP_LTS (1 << 0) 151 #define ONENAND_ECC_1BIT (1 << 0) 152 #define ONENAND_ECC_2BIT (1 << 1) 153 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 154 #define ONENAND_ECC_2BIT_ALL (0xAAAA) 155 #define ONENAND_OTP_LOCK_OFFSET (14) 156 #endif 157