@@ -1012,7 +1012,7 @@ static int flash_flexspi_nor_check_jedec(struct flash_flexspi_nor_data *data,
1012
1012
kFLEXSPI_Command_SDR , kFLEXSPI_1PAD , SPI_NOR_CMD_SE_4B ,
1013
1013
kFLEXSPI_Command_RADDR_SDR , kFLEXSPI_1PAD , 32 );
1014
1014
flexspi_lut [ERASE_BLOCK ][0 ] = FLEXSPI_LUT_SEQ (
1015
- kFLEXSPI_Command_SDR , kFLEXSPI_1PAD , 0xDC ,
1015
+ kFLEXSPI_Command_SDR , kFLEXSPI_1PAD , SPI_NOR_CMD_BE_4B ,
1016
1016
kFLEXSPI_Command_RADDR_SDR , kFLEXSPI_1PAD , 32 ),
1017
1017
/* Read instruction used for polling is 0x05 */
1018
1018
data -> legacy_poll = true;
@@ -1043,7 +1043,7 @@ static int flash_flexspi_nor_check_jedec(struct flash_flexspi_nor_data *data,
1043
1043
kFLEXSPI_Command_SDR , kFLEXSPI_1PAD , SPI_NOR_CMD_SE_4B ,
1044
1044
kFLEXSPI_Command_RADDR_SDR , kFLEXSPI_1PAD , 32 );
1045
1045
flexspi_lut [ERASE_BLOCK ][0 ] = FLEXSPI_LUT_SEQ (
1046
- kFLEXSPI_Command_SDR , kFLEXSPI_1PAD , 0xDC ,
1046
+ kFLEXSPI_Command_SDR , kFLEXSPI_1PAD , SPI_NOR_CMD_BE_4B ,
1047
1047
kFLEXSPI_Command_RADDR_SDR , kFLEXSPI_1PAD , 32 ),
1048
1048
/* Read instruction used for polling is 0x05 */
1049
1049
data -> legacy_poll = true;
@@ -1074,7 +1074,7 @@ static int flash_flexspi_nor_check_jedec(struct flash_flexspi_nor_data *data,
1074
1074
kFLEXSPI_Command_SDR , kFLEXSPI_1PAD , SPI_NOR_CMD_SE_4B ,
1075
1075
kFLEXSPI_Command_RADDR_SDR , kFLEXSPI_1PAD , 32 );
1076
1076
flexspi_lut [ERASE_BLOCK ][0 ] = FLEXSPI_LUT_SEQ (
1077
- kFLEXSPI_Command_SDR , kFLEXSPI_1PAD , 0xDC ,
1077
+ kFLEXSPI_Command_SDR , kFLEXSPI_1PAD , SPI_NOR_CMD_BE_4B ,
1078
1078
kFLEXSPI_Command_RADDR_SDR , kFLEXSPI_1PAD , 32 ),
1079
1079
/* Read instruction used for polling is 0x05 */
1080
1080
data -> legacy_poll = true;
@@ -1083,6 +1083,43 @@ static int flash_flexspi_nor_check_jedec(struct flash_flexspi_nor_data *data,
1083
1083
kFLEXSPI_Command_READ_SDR , kFLEXSPI_1PAD , 0x01 );
1084
1084
/* Device uses bit 6 of status reg 1 for QE */
1085
1085
return flash_flexspi_nor_quad_enable (data , flexspi_lut , JESD216_DW15_QER_VAL_S1B6 );
1086
+ case 0x19ba20 : /* MT25QL256 */
1087
+ case 0x20ba20 : /* MT25QL512 */
1088
+ case 0x21ba20 : /* MT25QL01G */
1089
+ case 0x22ba20 : /* MT25QL02G */
1090
+ case 0x19bb20 : /* MT25QU256 */
1091
+ case 0x20bb20 : /* MT25QU512 */
1092
+ case 0x21bb20 : /* MT25QU01G */
1093
+ case 0x22bb20 : /* MT25QU02G */
1094
+ /* MT25Q flash with more than 32MB, use 4 byte read/write */
1095
+ flexspi_lut [READ ][0 ] = FLEXSPI_LUT_SEQ (
1096
+ kFLEXSPI_Command_SDR , kFLEXSPI_1PAD , SPI_NOR_CMD_4READ_4B ,
1097
+ kFLEXSPI_Command_RADDR_SDR , kFLEXSPI_4PAD , 32 );
1098
+ /* Flash needs 10 dummy cycles */
1099
+ flexspi_lut [READ ][1 ] = FLEXSPI_LUT_SEQ (
1100
+ kFLEXSPI_Command_DUMMY_SDR , kFLEXSPI_4PAD , 10 ,
1101
+ kFLEXSPI_Command_READ_SDR , kFLEXSPI_4PAD , 0x04 );
1102
+ /* Update PROGRAM commands for 4 byte 1S-4S-4S mode */
1103
+ flexspi_lut [PAGE_PROGRAM ][0 ] = FLEXSPI_LUT_SEQ (
1104
+ kFLEXSPI_Command_SDR , kFLEXSPI_1PAD , SPI_NOR_CMD_PP_1_4_4_4B ,
1105
+ kFLEXSPI_Command_RADDR_SDR , kFLEXSPI_4PAD , 32 );
1106
+ flexspi_lut [PAGE_PROGRAM ][1 ] = FLEXSPI_LUT_SEQ (
1107
+ kFLEXSPI_Command_WRITE_SDR , kFLEXSPI_4PAD , 0x4 ,
1108
+ kFLEXSPI_Command_STOP , kFLEXSPI_1PAD , 0x0 );
1109
+ /* Update ERASE commands for 4 byte mode */
1110
+ flexspi_lut [ERASE_SECTOR ][0 ] = FLEXSPI_LUT_SEQ (
1111
+ kFLEXSPI_Command_SDR , kFLEXSPI_1PAD , SPI_NOR_CMD_SE_4B ,
1112
+ kFLEXSPI_Command_RADDR_SDR , kFLEXSPI_1PAD , 32 );
1113
+ flexspi_lut [ERASE_BLOCK ][0 ] = FLEXSPI_LUT_SEQ (
1114
+ kFLEXSPI_Command_SDR , kFLEXSPI_1PAD , SPI_NOR_CMD_BE_4B ,
1115
+ kFLEXSPI_Command_RADDR_SDR , kFLEXSPI_1PAD , 32 ),
1116
+ /* Read instruction used for polling is 0x05 */
1117
+ data -> legacy_poll = true;
1118
+ flexspi_lut [READ_STATUS_REG ][0 ] = FLEXSPI_LUT_SEQ (
1119
+ kFLEXSPI_Command_SDR , kFLEXSPI_1PAD , SPI_NOR_CMD_RDSR ,
1120
+ kFLEXSPI_Command_READ_SDR , kFLEXSPI_1PAD , 0x01 );
1121
+ /* Device has no QE bit, 1-4-4 and 1-1-4 is always enabled */
1122
+ return 0 ;
1086
1123
default :
1087
1124
return - ENOTSUP ;
1088
1125
}
0 commit comments