@@ -693,30 +693,35 @@ static int cypress_nor_set_octal_dtr(struct spi_nor *nor, bool enable)
693
693
694
694
static int s28hx_t_post_sfdp_fixup (struct spi_nor * nor )
695
695
{
696
+ struct spi_nor_flash_parameter * params = nor -> params ;
696
697
/*
697
698
* On older versions of the flash the xSPI Profile 1.0 table has the
698
699
* 8D-8D-8D Fast Read opcode as 0x00. But it actually should be 0xEE.
699
700
*/
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 =
702
703
SPINOR_OP_CYPRESS_RD_FAST ;
703
704
704
705
/* 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 ],
706
707
SPINOR_OP_PP_4B , SNOR_PROTO_1_1_1 );
707
708
/*
708
709
* Since xSPI Page Program opcode is backward compatible with
709
710
* Legacy SPI, use Legacy SPI opcode there as well.
710
711
*/
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 ],
712
713
SPINOR_OP_PP_4B , SNOR_PROTO_8_8_8_DTR );
713
714
714
715
/*
715
716
* The xSPI Profile 1.0 table advertises the number of additional
716
717
* address bytes needed for Read Status Register command as 0 but the
717
718
* actual value for that is 4.
718
719
*/
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 ;
720
725
721
726
return cypress_nor_get_page_size (nor );
722
727
}
@@ -916,6 +921,11 @@ static const struct flash_info spansion_nor_parts[] = {
916
921
MFR_FLAGS (USE_CLPEF )
917
922
.fixups = & s28hx_t_fixups ,
918
923
},
924
+ { "s28hs02gt" , INFO (0x345b1c , 0 , 0 , 0 )
925
+ PARSE_SFDP
926
+ MFR_FLAGS (USE_CLPEF )
927
+ .fixups = & s28hx_t_fixups ,
928
+ },
919
929
};
920
930
921
931
/**
0 commit comments