]> git.sur5r.net Git - u-boot/blobdiff - drivers/mtd/spi/sf_internal.h
sf: Add quad read/write commands support
[u-boot] / drivers / mtd / spi / sf_internal.h
index 29a14f4df62f8577f0a05e452e81c0ed7ccd9a9a..dcc9014e5f7589757f3aec64a473b582ae713b42 100644 (file)
@@ -4,16 +4,16 @@
  * Copyright (C) 2008 Atmel Corporation
  * Copyright (C) 2013 Jagannadha Sutradharudu Teki, Xilinx Inc.
  *
- * Licensed under the GPL-2 or later.
+ * SPDX-License-Identifier:    GPL-2.0+
  */
 
-#ifndef _SPI_FLASH_INTERNAL_H_
-#define _SPI_FLASH_INTERNAL_H_
+#ifndef _SF_INTERNAL_H_
+#define _SF_INTERNAL_H_
 
 #define SPI_FLASH_16MB_BOUN            0x1000000
 
 /* SECT flags */
-#define SECT_4K                        (1 << 1)
+#define SECT_4K                                (1 << 1)
 #define SECT_32K                       (1 << 2)
 #define E_FSR                          (1 << 3)
 
 #define CMD_PAGE_PROGRAM               0x02
 #define CMD_WRITE_DISABLE              0x04
 #define CMD_READ_STATUS                        0x05
+#define CMD_QUAD_PAGE_PROGRAM          0x32
+#define CMD_READ_STATUS1               0x35
 #define CMD_WRITE_ENABLE               0x06
-#define CMD_READ_CONFIG                0x35
-#define CMD_FLAG_STATUS                0x70
+#define CMD_READ_CONFIG                        0x35
+#define CMD_FLAG_STATUS                        0x70
 
 /* Read commands */
 #define CMD_READ_ARRAY_SLOW            0x03
 #define CMD_READ_ARRAY_FAST            0x0b
+#define CMD_READ_DUAL_OUTPUT_FAST      0x3b
+#define CMD_READ_DUAL_IO_FAST          0xbb
+#define CMD_READ_QUAD_OUTPUT_FAST      0x6b
 #define CMD_READ_ID                    0x9f
 
 /* Bank addr access commands */
@@ -57,7 +62,7 @@
 /* SST specific */
 #ifdef CONFIG_SPI_FLASH_SST
 # define SST_WP                        0x01    /* Supports AAI word program */
-# define CMD_SST_BP                    0x02    /* Byte Program */
+# define CMD_SST_BP            0x02    /* Byte Program */
 # define CMD_SST_AAI_WP                0xAD    /* Auto Address Incr Word Program */
 
 int sst_write_wp(struct spi_flash *flash, u32 offset, size_t len,
@@ -139,4 +144,4 @@ int spi_flash_read_common(struct spi_flash *flash, const u8 *cmd,
 int spi_flash_cmd_read_ops(struct spi_flash *flash, u32 offset,
                size_t len, void *data);
 
-#endif /* _SPI_FLASH_INTERNAL_H_ */
+#endif /* _SF_INTERNAL_H_ */