@@ -693,30 +693,35 @@ static int cypress_nor_set_octal_dtr(struct spi_nor *nor, bool enable)
693693
694694static int s28hx_t_post_sfdp_fixup (struct spi_nor * nor )
695695{
696+ struct spi_nor_flash_parameter * params = nor -> params ;
696697 /*
697698 * On older versions of the flash the xSPI Profile 1.0 table has the
698699 * 8D-8D-8D Fast Read opcode as 0x00. But it actually should be 0xEE.
699700 */
700- if (nor -> params -> reads [SNOR_CMD_READ_8_8_8_DTR ].opcode == 0 )
701- nor -> params -> reads [SNOR_CMD_READ_8_8_8_DTR ].opcode =
701+ if (params -> reads [SNOR_CMD_READ_8_8_8_DTR ].opcode == 0 )
702+ params -> reads [SNOR_CMD_READ_8_8_8_DTR ].opcode =
702703 SPINOR_OP_CYPRESS_RD_FAST ;
703704
704705 /* This flash is also missing the 4-byte Page Program opcode bit. */
705- spi_nor_set_pp_settings (& nor -> params -> page_programs [SNOR_CMD_PP ],
706+ spi_nor_set_pp_settings (& params -> page_programs [SNOR_CMD_PP ],
706707 SPINOR_OP_PP_4B , SNOR_PROTO_1_1_1 );
707708 /*
708709 * Since xSPI Page Program opcode is backward compatible with
709710 * Legacy SPI, use Legacy SPI opcode there as well.
710711 */
711- spi_nor_set_pp_settings (& nor -> params -> page_programs [SNOR_CMD_PP_8_8_8_DTR ],
712+ spi_nor_set_pp_settings (& params -> page_programs [SNOR_CMD_PP_8_8_8_DTR ],
712713 SPINOR_OP_PP_4B , SNOR_PROTO_8_8_8_DTR );
713714
714715 /*
715716 * The xSPI Profile 1.0 table advertises the number of additional
716717 * address bytes needed for Read Status Register command as 0 but the
717718 * actual value for that is 4.
718719 */
719- nor -> params -> rdsr_addr_nbytes = 4 ;
720+ params -> rdsr_addr_nbytes = 4 ;
721+
722+ /* The 2 Gb parts duplicate info and advertise 4 dice instead of 2. */
723+ if (params -> size == SZ_256M )
724+ params -> n_dice = 2 ;
720725
721726 return cypress_nor_get_page_size (nor );
722727}
@@ -916,6 +921,11 @@ static const struct flash_info spansion_nor_parts[] = {
916921 MFR_FLAGS (USE_CLPEF )
917922 .fixups = & s28hx_t_fixups ,
918923 },
924+ { "s28hs02gt" , INFO (0x345b1c , 0 , 0 , 0 )
925+ PARSE_SFDP
926+ MFR_FLAGS (USE_CLPEF )
927+ .fixups = & s28hx_t_fixups ,
928+ },
919929};
920930
921931/**
0 commit comments