Re: [PATCH v2 1/3] nvmem: core: introduce cells parser
From: John Thomson
Date: Mon Sep 27 2021 - 08:39:42 EST
Hi Srinivas,
On Mon, 27 Sep 2021, at 10:12, Srinivas Kandagatla wrote:
> On 21/09/2021 06:50, John Thomson wrote:
>> Hi Srinivas,
>>
>> Can I note here that I would like to parse
>> TLV data from an SPI-NOR device to NVMEM cells.
>> The same general use case (getting mac-address from OEM data).
>>
>> Was planning to base my work on this series, as well as
>> https://lore.kernel.org/all/20210908100257.17833-1-qiangqing.zhang@xxxxxxx/
>
> This series is for post-processing nvmem cell data before it gets to
> consumers.
> Are you referring to parsing nvmem cell information (offset, name) in
> your usecase like:
> https://opencomputeproject.github.io/onie/design-spec/hw_requirements.html
>
> Or
> Are you referring to post-processing nvmem cell data ?
Both.
I have TLV data where I want to parse the tag lengths and tag IDs to map them into offsets and names like a NVMEM cells lookups table.
Then, some of these cell data would need to be post processed to use directly.
I have only a base MAC address available, and would like to specify increments for different network ports.
As an additional example, another TLV tag:value has compressed wifi calibration data. If I could post process this cell data I could then feed it into ath9k with: https://lore.kernel.org/all/f9b732b50a3453fadf3923cc75d365bae3505fe7.1630157099.git.chunkeey@xxxxxxxxx/
In my case, this is all currently done in userspace.
I saw this (ONIE TLV NVMEM parser) series and thought it offered something very similar to
(the first part of) what I would like to do.
Cheers,
--
John Thomson