Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mtd: spi-nor: micron-st: add SNOR_CMD_PP_8_8_8_DTR sfdp fixup for mt35xu512aba

Find two batches mt35xu512aba has different SFDP but with same
jedec ID. The batch which use the new version of SFDP contain
all the necessary information to support OCT DTR mode. The batch
with old version do not contain the OCT DTR command information,
but in fact it did support OCT DTR mode.

Current mt35xu512aba_post_sfdp_fixup() add some setting including
SNOR_CMD_READ_8_8_8_DTR, but still lack SNOR_CMD_PP_8_8_8_DTR. Meet
issue on the batch mt35xu512aba with old SFDP version. Because no
SNOR_CMD_PP_8_8_8_DTR, micron_st_nor_octal_dtr_en() will not be
called, then use SNOR_CMD_READ_8_8_8_DTR will meet issue.

Fixes: 44dd635cd632 ("mtd: spi-nor: micron-st: use SFDP of mt35xu512aba")
Reviewed-by: Pratyush Yadav <pratyush@kernel.org>
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
Reviewed-by: Michael Walle <mwalle@kernel.org>
[pratyush@kernel.org: touch up the comment a bit]
Signed-off-by: Pratyush Yadav (Google) <pratyush@kernel.org>

authored by

Haibo Chen and committed by
Pratyush Yadav (Google)
6d660fba 3620d67b

+10
+10
drivers/mtd/spi-nor/micron-st.c
··· 167 167 0, 20, SPINOR_OP_MT_DTR_RD, 168 168 SNOR_PROTO_8_8_8_DTR); 169 169 170 + /* 171 + * Some batches of mt35xu512aba do not contain the OCT DTR command 172 + * information, but do support OCT DTR mode. Add the settings for 173 + * SNOR_CMD_PP_8_8_8_DTR here. This also makes sure the flash can switch 174 + * to OCT DTR mode. 175 + */ 176 + nor->params->hwcaps.mask |= SNOR_HWCAPS_PP_8_8_8_DTR; 177 + spi_nor_set_pp_settings(&nor->params->page_programs[SNOR_CMD_PP_8_8_8_DTR], 178 + SPINOR_OP_PP_4B, SNOR_PROTO_8_8_8_DTR); 179 + 170 180 nor->cmd_ext_type = SPI_NOR_EXT_REPEAT; 171 181 nor->params->rdsr_dummy = 8; 172 182 nor->params->rdsr_addr_nbytes = 0;