Re: [PATCH v3 1/2] dt-bindings: nvmem: add byte-mask property for non-contiguous byte selection

From: Hongmei Xu

Date: Thu Nov 26 2026 - 00:36:01 EST


HI, Srinivas

May I know if you got a chance to check the comments I posted 8 days
ago? Expecting your further feedback, thanks.

Best Regards,
Hongmei Xu

On Wed, Nov 18, 2026 at 11:20 AM Hongmei Xu <hongmei.xu@xxxxxxxxxxxxxxxx> wrote:
>
> On Tue, Nov 17, 2026 at 11:29 PM Srinivas Kandagatla <srini@xxxxxxxxxx> wrote:
> >
> >
> >
> > On 11/17/26 6:04 AM, Hongmei Xu wrote:
> > > Add the byte-mask property to the fixed-cell binding. This allows
> > > selecting non-contiguous physical bytes from an NVMEM region to form
> > > a logical cell value.
> > >
> > > Some SoCs (e.g. Qualcomm efuse controllers) store a logical value such
> > > as a MAC address across non-contiguous physical bytes, with one or more
> > > bytes in between reserved or unused. byte-mask lets the DT describe this
> > > directly in the fixed-cell binding without requiring a device-specific
> > > provider for a common pattern.
> >
> > Pl take a look at layouts, which does exactly what you are trying to do.
> >
> > --srini
> >
> Thanks for the review. Do you mean there is already a driver in
> nvmem/layout that implements the same functionality as byte-mask?
> I looked at all the existing layout drivers. onie-tlv and sl28vpd
> parse proprietary binary formats at runtime — the cell structure is
> unknown until the device is read. fixed-layout just wraps
> nvmem_add_cells_from_dt() for standard cells. None of them handle
> statically-described non-contiguous byte selection.
>
> Or do you mean I should implement byte-mask as a new layout driver? If
> so, the concern with this approach is that byte-mask is
> hardware-agnostic — any NVMEM provider with scrambled byte order could
> benefit from it, just as any provider can use bits for contiguous bit
> selection. A per-platform layout driver would duplicate the same
> byte-compaction logic across every platform that needs it, while
> implementing it in core (similar to bits) makes it universally
> available.
>
> Could you clarify if I'm missing something, or share any concern with
> the core approach?
>
> Best Regards,
> Hongmei Xu