|
170 | 170 | SPI_MEM_DTR_OP_DATA_IN(len, buf, 4), \
|
171 | 171 | SPI_MEM_OP_MAX_FREQ(freq))
|
172 | 172 |
|
| 173 | +#define SPINAND_PAGE_READ_FROM_CACHE_1S_1S_8S_OP(addr, ndummy, buf, len, freq) \ |
| 174 | + SPI_MEM_OP(SPI_MEM_OP_CMD(0x8b, 1), \ |
| 175 | + SPI_MEM_OP_ADDR(2, addr, 1), \ |
| 176 | + SPI_MEM_OP_DUMMY(ndummy, 1), \ |
| 177 | + SPI_MEM_OP_DATA_IN(len, buf, 8), \ |
| 178 | + SPI_MEM_OP_MAX_FREQ(freq)) |
| 179 | + |
| 180 | +#define SPINAND_PAGE_READ_FROM_CACHE_1S_8S_8S_OP(addr, ndummy, buf, len, freq) \ |
| 181 | + SPI_MEM_OP(SPI_MEM_OP_CMD(0xcb, 1), \ |
| 182 | + SPI_MEM_OP_ADDR(2, addr, 8), \ |
| 183 | + SPI_MEM_OP_DUMMY(ndummy, 8), \ |
| 184 | + SPI_MEM_OP_DATA_IN(len, buf, 8), \ |
| 185 | + SPI_MEM_OP_MAX_FREQ(freq)) |
| 186 | + |
| 187 | +#define SPINAND_PAGE_READ_FROM_CACHE_1S_1D_8D_OP(addr, ndummy, buf, len, freq) \ |
| 188 | + SPI_MEM_OP(SPI_MEM_OP_CMD(0x9d, 1), \ |
| 189 | + SPI_MEM_DTR_OP_ADDR(2, addr, 1), \ |
| 190 | + SPI_MEM_DTR_OP_DUMMY(ndummy, 1), \ |
| 191 | + SPI_MEM_DTR_OP_DATA_IN(len, buf, 8), \ |
| 192 | + SPI_MEM_OP_MAX_FREQ(freq)) |
| 193 | + |
173 | 194 | #define SPINAND_PROG_EXEC_1S_1S_0_OP(addr) \
|
174 | 195 | SPI_MEM_OP(SPI_MEM_OP_CMD(0x10, 1), \
|
175 | 196 | SPI_MEM_OP_ADDR(3, addr, 1), \
|
|
188 | 209 | SPI_MEM_OP_NO_DUMMY, \
|
189 | 210 | SPI_MEM_OP_DATA_OUT(len, buf, 4))
|
190 | 211 |
|
| 212 | +#define SPINAND_PROG_LOAD_1S_1S_8S_OP(addr, buf, len) \ |
| 213 | + SPI_MEM_OP(SPI_MEM_OP_CMD(0x82, 1), \ |
| 214 | + SPI_MEM_OP_ADDR(2, addr, 1), \ |
| 215 | + SPI_MEM_OP_NO_DUMMY, \ |
| 216 | + SPI_MEM_OP_DATA_OUT(len, buf, 8)) |
| 217 | + |
| 218 | +#define SPINAND_PROG_LOAD_1S_8S_8S_OP(reset, addr, buf, len) \ |
| 219 | + SPI_MEM_OP(SPI_MEM_OP_CMD(reset ? 0xc2 : 0xc4, 1), \ |
| 220 | + SPI_MEM_OP_ADDR(2, addr, 8), \ |
| 221 | + SPI_MEM_OP_NO_DUMMY, \ |
| 222 | + SPI_MEM_OP_DATA_OUT(len, buf, 8)) |
| 223 | + |
191 | 224 | /**
|
192 | 225 | * Standard SPI NAND flash commands
|
193 | 226 | */
|
|
0 commit comments