[U-Boot] [PATCH 1/4] mtd: spi: spi-nor-core: Add Microchip SFDP parser

Tudor.Ambarus at microchip.com Tudor.Ambarus at microchip.com
Wed Oct 9 15:50:58 UTC 2019


Hi, Vignesh,

On 10/09/2019 03:04 PM, Vignesh Raghavendra wrote:
> External E-Mail
> 
> 
> Hi Tudor,
> 
> On 01/10/19 2:29 PM, Tudor.Ambarus at microchip.com wrote:
>> From: Tudor Ambarus <tudor.ambarus at microchip.com>
>>
>> JESD216 allow vendors to define their own SFDP tables.
>>
>> Add Microchip SFDP parser. The vendor table is allocated using
>> resource-managed kmalloc - the table will be freed on driver detach.
>> It will be accessible by getting the UCLASS_SPI_FLASH's private data.
>>
>> The Michrochip's SFDP table is particularly of interest because contains
>> pre-programmed globally unique EUI-48 and EUI-64 identifiers.
>>
>> Signed-off-by: Tudor Ambarus <tudor.ambarus at microchip.com>
>> ---
>>  drivers/mtd/spi/spi-nor-core.c | 35 +++++++++++++++++++++++++++++++++++
>>  include/linux/mtd/spi-nor.h    |  2 ++
>>  2 files changed, 37 insertions(+)
>>
>> diff --git a/drivers/mtd/spi/spi-nor-core.c b/drivers/mtd/spi/spi-nor-core.c
>> index 1acff745d1a2..bade7d8a9f79 100644
>> --- a/drivers/mtd/spi/spi-nor-core.c
>> +++ b/drivers/mtd/spi/spi-nor-core.c
>> @@ -1417,6 +1417,7 @@ struct sfdp_parameter_header {
>>  
>>  #define SFDP_BFPT_ID		0xff00	/* Basic Flash Parameter Table */
>>  #define SFDP_SECTOR_MAP_ID	0xff81	/* Sector Map Table */
>> +#define SFDP_MICROCHIP_ID	0x01bf	/* Manufacturer specific Table */
>>  
> Is this ID unique enough such that no other vendor will use the same? I
> recall that MSB byte should be assigned to Vendor and 0x01 does not seem
> to be Microchip specific? Or did I miss something?
> 

It is unique.

Quoting form JESD216 rev D, section "6.3.3 Definition of Parameter ID Field":
"The original JESD216 specification used only a one byte ID field to identify
the parameter table owner.
 JESD216 revision A expanded the ID field to two bytes, MSB and LSB, because a
single byte is
 insufficient to uniquely identify all manufacturers ( vendors). The original
single byte parameter ID is
 now referred to as the parameter ID LSB."

In the Microchip's case, 01h is the Parameter ID MSB (respects the 01h-7fh
interval) and bfh is the Parameter ID LSB (has odd parity, which is correct).
Now I'm looking in the JEP106AZ standard (Standard Manufacturer’s
Identification Code): 01h MSB indicates the bank number (one), and bfh LSB
indicates the Manufacturer Identification code (which is bfh for SST).

Cheers,
ta


More information about the U-Boot mailing list