Re: [PATCH 1/6] dt-bindings: nvmem: add cell-type to nvmem cells
From: Srinivas Kandagatla <hidden>
Date: 2021-09-22 12:49:36
Also in:
lkml
From: Srinivas Kandagatla <hidden>
Date: 2021-09-22 12:49:36
Also in:
lkml
On 22/09/2021 13:31, Ahmad Fatoum wrote:
quoted
quoted
On 08.09.21 12:02, Joakim Zhang wrote:quoted
From: Srinivas Kandagatla<redacted> Some of the nvmem providers encode data for certain type of nvmem cell, example mac-address is stored in ascii or with delimiter or in reverse order. This is much specific to vendor, so having a cell-type would allow nvmem provider drivers to post-process this before using it.I don't agree with this assessment. Users of the OCOTP so far used this specific encoding. Bootloaders decode the OCOTP this way, but this encoding isn't really an inherent attribute of the OCOTP. A new NXP SoC with a different OTP IP will likely use the same format. Users may even use the same format on an EEPROM to populate a second off-SoC interface, .. etc.That is okay.How would you go about using this same format on an EEPROM?
Am guessing that by the time there are more users for such formats, those post-processing functions should be converted into some library functions. --srini
quoted
quoted
I'd thus prefer to not make this specific to the OCOTP as all: * #define NVMEM_CELL_ENCODING_MAC_ADDRESS_IMX /* ... */