diff mbox series

[2/2] mtd: spi-nor: spansion: Add s28hl512t, s28hl01gt, and s28hs01gt info

Message ID 475bdde1b012af8b36f266bca3230c3262f78700.1661392740.git.Takahiro.Kuwano@infineon.com
State Changes Requested
Delegated to: Ambarus Tudor
Headers show
Series mtd: spi-nor: spansion: Add support for s28hl512t, s28hl01gt, and s28hs01gt | expand

Commit Message

Takahiro Kuwano Aug. 25, 2022, 2:20 a.m. UTC
From: Takahiro Kuwano <Takahiro.Kuwano@infineon.com>

Add flash info table entries for s28hl512gt, s28hl01gt, and s28hs01gt.
These devices have the same functionality as s28hs512t.

Signed-off-by: Takahiro Kuwano <Takahiro.Kuwano@infineon.com>
---
 drivers/mtd/spi-nor/spansion.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

Comments

Michael Walle Aug. 25, 2022, 7:57 a.m. UTC | #1
Am 2022-08-25 04:20, schrieb tkuw584924@gmail.com:
> From: Takahiro Kuwano <Takahiro.Kuwano@infineon.com>
> 
> Add flash info table entries for s28hl512gt, s28hl01gt, and s28hs01gt.
> These devices have the same functionality as s28hs512t.
> 
> Signed-off-by: Takahiro Kuwano <Takahiro.Kuwano@infineon.com>
> ---
>  drivers/mtd/spi-nor/spansion.c | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
> 
> diff --git a/drivers/mtd/spi-nor/spansion.c 
> b/drivers/mtd/spi-nor/spansion.c
> index 03f361089a05..76a0e31c8323 100644
> --- a/drivers/mtd/spi-nor/spansion.c
> +++ b/drivers/mtd/spi-nor/spansion.c
> @@ -459,11 +459,26 @@ static const struct flash_info 
> spansion_nor_parts[] = {
>  		.fixups = &s25hx_t_fixups },
>  	{ "cy15x104q",  INFO6(0x042cc2, 0x7f7f7f, 512 * 1024, 1)
>  		FLAGS(SPI_NOR_NO_ERASE) },
> +	{ "s28hl512t",   INFO(0x345a1a,      0, 256 * 1024, 256)
> +		NO_SFDP_FLAGS(SECT_4K | SPI_NOR_OCTAL_DTR_READ |
> +			      SPI_NOR_OCTAL_DTR_PP)

Do you really need the NO_SFDP_FLAGS here? And then the usual:
could you test with
	{ "s28hl512t",   INFO(0x345a1a,      0, 0, 0)
		.fixups = &s28hx_t_fixups,
	},

You might need
https://lore.kernel.org/linux-mtd/20220810220654.1297699-6-michael@walle.cc/

-michael


> +		.fixups = &s28hx_t_fixups,
> +	},
> +	{ "s28hl01gt",   INFO(0x345a1b,      0, 256 * 1024, 512)
> +		NO_SFDP_FLAGS(SECT_4K | SPI_NOR_OCTAL_DTR_READ |
> +			      SPI_NOR_OCTAL_DTR_PP)
> +		.fixups = &s28hx_t_fixups,
> +	},
>  	{ "s28hs512t",   INFO(0x345b1a,      0, 256 * 1024, 256)
>  		NO_SFDP_FLAGS(SECT_4K | SPI_NOR_OCTAL_DTR_READ |
>  			      SPI_NOR_OCTAL_DTR_PP)
>  		.fixups = &s28hx_t_fixups,
>  	},
> +	{ "s28hs01gt",   INFO(0x345b1b,      0, 256 * 1024, 512)
> +		NO_SFDP_FLAGS(SECT_4K | SPI_NOR_OCTAL_DTR_READ |
> +			      SPI_NOR_OCTAL_DTR_PP)
> +		.fixups = &s28hx_t_fixups,
> +	},
>  };
> 
>  /**
Takahiro Kuwano Aug. 26, 2022, 10 a.m. UTC | #2
On 8/25/2022 4:57 PM, Michael Walle wrote:
> Am 2022-08-25 04:20, schrieb tkuw584924@gmail.com:
>> From: Takahiro Kuwano <Takahiro.Kuwano@infineon.com>
>>
>> Add flash info table entries for s28hl512gt, s28hl01gt, and s28hs01gt.
>> These devices have the same functionality as s28hs512t.
>>
>> Signed-off-by: Takahiro Kuwano <Takahiro.Kuwano@infineon.com>
>> ---
>>  drivers/mtd/spi-nor/spansion.c | 15 +++++++++++++++
>>  1 file changed, 15 insertions(+)
>>
>> diff --git a/drivers/mtd/spi-nor/spansion.c b/drivers/mtd/spi-nor/spansion.c
>> index 03f361089a05..76a0e31c8323 100644
>> --- a/drivers/mtd/spi-nor/spansion.c
>> +++ b/drivers/mtd/spi-nor/spansion.c
>> @@ -459,11 +459,26 @@ static const struct flash_info spansion_nor_parts[] = {
>>          .fixups = &s25hx_t_fixups },
>>      { "cy15x104q",  INFO6(0x042cc2, 0x7f7f7f, 512 * 1024, 1)
>>          FLAGS(SPI_NOR_NO_ERASE) },
>> +    { "s28hl512t",   INFO(0x345a1a,      0, 256 * 1024, 256)
>> +        NO_SFDP_FLAGS(SECT_4K | SPI_NOR_OCTAL_DTR_READ |
>> +                  SPI_NOR_OCTAL_DTR_PP)
> 
> Do you really need the NO_SFDP_FLAGS here? And then the usual:
> could you test with
>     { "s28hl512t",   INFO(0x345a1a,      0, 0, 0)
PARSE_SFDP?
>         .fixups = &s28hx_t_fixups,
>     },
> 
With some minor changes in sfdp.c and spansion.c, it's working.
I will do more tests then revise the series.

Thank you!
Takahiro
diff mbox series

Patch

diff --git a/drivers/mtd/spi-nor/spansion.c b/drivers/mtd/spi-nor/spansion.c
index 03f361089a05..76a0e31c8323 100644
--- a/drivers/mtd/spi-nor/spansion.c
+++ b/drivers/mtd/spi-nor/spansion.c
@@ -459,11 +459,26 @@  static const struct flash_info spansion_nor_parts[] = {
 		.fixups = &s25hx_t_fixups },
 	{ "cy15x104q",  INFO6(0x042cc2, 0x7f7f7f, 512 * 1024, 1)
 		FLAGS(SPI_NOR_NO_ERASE) },
+	{ "s28hl512t",   INFO(0x345a1a,      0, 256 * 1024, 256)
+		NO_SFDP_FLAGS(SECT_4K | SPI_NOR_OCTAL_DTR_READ |
+			      SPI_NOR_OCTAL_DTR_PP)
+		.fixups = &s28hx_t_fixups,
+	},
+	{ "s28hl01gt",   INFO(0x345a1b,      0, 256 * 1024, 512)
+		NO_SFDP_FLAGS(SECT_4K | SPI_NOR_OCTAL_DTR_READ |
+			      SPI_NOR_OCTAL_DTR_PP)
+		.fixups = &s28hx_t_fixups,
+	},
 	{ "s28hs512t",   INFO(0x345b1a,      0, 256 * 1024, 256)
 		NO_SFDP_FLAGS(SECT_4K | SPI_NOR_OCTAL_DTR_READ |
 			      SPI_NOR_OCTAL_DTR_PP)
 		.fixups = &s28hx_t_fixups,
 	},
+	{ "s28hs01gt",   INFO(0x345b1b,      0, 256 * 1024, 512)
+		NO_SFDP_FLAGS(SECT_4K | SPI_NOR_OCTAL_DTR_READ |
+			      SPI_NOR_OCTAL_DTR_PP)
+		.fixups = &s28hx_t_fixups,
+	},
 };
 
 /**