public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Takahiro Kuwano <tkuw584924@gmail.com>
To: Tudor.Ambarus@microchip.com, linux-mtd@lists.infradead.org
Cc: miquel.raynal@bootlin.com, richard@nod.at, vigneshr@ti.com,
	p.yadav@ti.com, Bacem.Daassi@infineon.com,
	Takahiro.Kuwano@infineon.com
Subject: Re: [PATCH v13 4/4] mtd: spi-nor: spansion: Add s25hl-t/s25hs-t IDs and fixups
Date: Thu, 21 Apr 2022 19:53:21 +0900	[thread overview]
Message-ID: <e4668aba-7159-8481-6634-5e7606246c96@gmail.com> (raw)
In-Reply-To: <a039deda-89f6-288e-071e-f557aaa0bd1a@microchip.com>

On 4/21/2022 7:45 PM, Tudor.Ambarus@microchip.com wrote:
> On 4/21/22 12:40, tkuw584924@gmail.com wrote:
>> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>>
>> From: Takahiro Kuwano <Takahiro.Kuwano@infineon.com>
>>
>> The S25HL-T/S25HS-T family is the Infineon SEMPER Flash with Quad SPI.
>>
>> For the single-die package parts (512Mb and 1Gb), only bottom 4KB and
>> uniform sector sizes are supported. This is due to missing or incorrect
>> entries in SMPT. Fixup for other sector sizes configurations will be
>> followed up as needed.
>>
>> Tested on Xilinx Zynq-7000 FPGA board.
>>
>> Signed-off-by: Takahiro Kuwano <Takahiro.Kuwano@infineon.com>
>> ---
>> Changes in v13:
>>   - Remove part specific set_4byte_addr_mode()
>>   - Revert SNOR_F_4B_OPCODES
>>   - Add post_sfdp to fix 3 byte erase opcode in 4BAIT
>>
>> Changes in v12:
>>   - Cleanup fixups based on other patches in this series
>>   - Add part specific set_4byte_addr_mode()
>>   - Unset SNOR_F_4B_OPCODES flag to let core to call set_4byte_addr_mode
>>
>> Changes in v11:
>>   - Cleanup fixups based on other patches in this series
>>
>> Changes in v10:
>>   - Cleanup fixups and ID table based on other patches in this series
>>
>> Changes in v9:
>>   - Use late_init() hook to fix mode clocks and writesize
>>   - Use PARSE_SFDP instead of NO_SFDP_FLAGS
>>   - Use MFR_FLAGS for USE_CLSR
>>   - Add comment block to explain about addr mode in post_bfpt_fixups()
>>
>> Changes in v8:
>>   - Call write_disable in error case only
>>   - Use spi_nor_read_reg() helper
>>   - Use nor->bouncebuf instead of variable on stack
>>   - Update ID table to use FLAGS macro
>>
>> Changes in v7:
>>   - Add missing device info table in v6
>>
>> Changes in v6:
>>   - Remove 2Gb multi die pacakge support
>>
>> Changes in v5:
>>   - Add NO_CHIP_ERASE flag to S25HL02GT and S25HS02GT
>>
>> Changes in v4:
>>   - Merge block comments about SMPT in s25hx_t_post_sfdp_fixups()
>>   - Remove USE_CLSR flags from S25HL02GT and S25HS02GT
>>
>> Changes in v3:
>>   - Remove S25HL256T and S25HS256T
>>   - Add S25HL02GT and S25HS02GT
>>   - Add support for multi-die package parts support
>>   - Remove erase_map fix for top/split sector layout
>>   - Set ECC data unit size (16B) to writesize
>>
>>  drivers/mtd/spi-nor/spansion.c | 66 ++++++++++++++++++++++++++++++++++
>>  1 file changed, 66 insertions(+)
>>
>> diff --git a/drivers/mtd/spi-nor/spansion.c b/drivers/mtd/spi-nor/spansion.c
>> index 952d4383f9da..e56c48c3280b 100644
>> --- a/drivers/mtd/spi-nor/spansion.c
>> +++ b/drivers/mtd/spi-nor/spansion.c
>> @@ -203,6 +203,56 @@ static int cypress_nor_set_page_size(struct spi_nor *nor)
>>         return 0;
>>  }
>>
>> +static int
>> +s25hx_t_post_bfpt_fixup(struct spi_nor *nor,
>> +                       const struct sfdp_parameter_header *bfpt_header,
>> +                       const struct sfdp_bfpt *bfpt)
>> +{
>> +       /* Replace Quad Enable with volatile version */
>> +       nor->params->quad_enable = cypress_nor_quad_enable_volatile;
>> +
>> +       return cypress_nor_set_page_size(nor);
>> +}
>> +
>> +static void s25hx_t_post_sfdp_fixup(struct spi_nor *nor)
>> +{
>> +       struct spi_nor_erase_type *erase_type =
>> +                                       nor->params->erase_map.erase_type;
>> +       int i;
>> +
>> +       /*
>> +        * In some parts, 3byte erase opcodes are advertised by 4BAIT.
>> +        * Convert them to 4byte erase opcodes.
> 
> this is a fix, those opcodes don't work with 4 byte addresses, right?
Right. If we want to use 3byte opcodes with 4byte address, need to call
set_4byte_addr_mode().

> Looks good!
> Reviewed-by: Tudor Ambarus <tudor.ambarus@microchip.com>
> 
Thank you!


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

      reply	other threads:[~2022-04-21 10:53 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-21  9:40 [PATCH v13 0/4] mtd: spi-nor: Add support for Infineon s25hl-t/s25hs-t tkuw584924
2022-04-21  9:40 ` [PATCH v13 1/4] mtd: spi-nor: Retain nor->addr_width at 4BAIT parse tkuw584924
2022-04-21 10:38   ` Tudor.Ambarus
2022-04-21 10:48     ` Takahiro Kuwano
2022-04-21 11:29     ` Michael Walle
2022-04-21 12:06       ` Tudor.Ambarus
2022-04-21 13:01         ` Michael Walle
2022-04-21 13:13           ` Tudor.Ambarus
2022-04-21 13:42             ` Michael Walle
2022-04-21 13:56               ` Tudor.Ambarus
2022-04-21 14:26                 ` Takahiro Kuwano
2022-04-27  4:16                   ` Takahiro Kuwano
2022-04-27  6:35                     ` Tudor.Ambarus
2022-04-21  9:40 ` [PATCH v13 2/4] mtd: spi-nor: spansion: Add support for volatile QE bit tkuw584924
2022-04-21 10:41   ` Tudor.Ambarus
2022-04-21 10:47     ` Takahiro Kuwano
2022-04-21 10:56       ` Tudor.Ambarus
2022-04-21 11:36         ` Tudor.Ambarus
2022-04-21 11:48           ` Tudor.Ambarus
2022-04-22  9:04             ` Takahiro Kuwano
2022-04-21  9:40 ` [PATCH v13 3/4] mtd: spi-nor: spansion: Add local function to discover page size tkuw584924
2022-04-21 10:43   ` Tudor.Ambarus
2022-04-22  9:14     ` Takahiro Kuwano
2022-04-21  9:40 ` [PATCH v13 4/4] mtd: spi-nor: spansion: Add s25hl-t/s25hs-t IDs and fixups tkuw584924
2022-04-21 10:45   ` Tudor.Ambarus
2022-04-21 10:53     ` Takahiro Kuwano [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e4668aba-7159-8481-6634-5e7606246c96@gmail.com \
    --to=tkuw584924@gmail.com \
    --cc=Bacem.Daassi@infineon.com \
    --cc=Takahiro.Kuwano@infineon.com \
    --cc=Tudor.Ambarus@microchip.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=p.yadav@ti.com \
    --cc=richard@nod.at \
    --cc=vigneshr@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox