Netdev List
 help / color / mirror / Atom feed
From: Ivan Vecera <ivecera@redhat.com>
To: Mike Frandsen <michael@cambrianworks.com>
Cc: Vadim Fedorenko <vadim.fedorenko@linux.dev>,
	Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>,
	netdev@vger.kernel.org
Subject: Re: zl3073x flash: utility "family" register — 0x7C (driver) vs 0x7D (Microchip ZLS30733 reference)?
Date: Wed, 8 Jul 2026 20:09:19 +0200	[thread overview]
Message-ID: <e7517908-f02c-4c5a-ac63-34a4d26edf41@redhat.com> (raw)
In-Reply-To: <CANEVyMq03cwnhjc_H5hWMXwC1CH=V8OZDQFNT+ufzpHOOYJaaw@mail.gmail.com>

Hi Mike,

On 7/8/26 7:08 PM, Mike Frandsen wrote:
> Hi Ivan,
> 
> While porting the zl3073x flash sequence to a small userspace tool for the
> ZL80732 (Azurite), we noticed a discrepancy between the mainline driver and
> Microchip's own reference flasher about which register holds the flash
> utility's "family" byte:
> 
> - drivers/dpll/zl3073x/flash.c (as of 01e0e8b6a2d7) reads the family from
>    register 0x7C and checks for 0x21;
> - Microchip's ZLS30733 reference code (shipped in their AZFB firmware
>    bundle) reads the family from 0x7D (masking the low 7 bits) and treats
>    0x7C as a different field.

In the reference code there is a confusion... There are the following
constants defined:

static const Uint32T HOST_REG_VERSION = 0x007C;
static const Uint32T HOST_REG_FAMILY = 0x007D;

These constants are nowhere referenced and the code uses hardcoded
values:

     utilityHash = HostRegister_read(pContext, 0x78, 4);
     utilityFam = HostRegister_read(pContext, 0x7c, 1);
     utilityRel = HostRegister_read(pContext, 0x7d, 1);
     ...
     if (utilityFam != 0x21)
     {
           status = ZL303XX_INVALID_OPERATION;
           ...
     }

So the family code reported by the utility at register address 0x7c and
should contain the value of 0x21.

> We have not yet confirmed on hardware which location reports 0x21 after
> the utility loads (our port defensively accepts either). Do you know
> which location is authoritative per Microchip's documentation — and if it
> is 0x7D, whether flash.c's check works today by coincidence of the utility
> images it has been used with?

There is no official documentation for this :-( but according my test,
all known utility versions reports 0x21 in reg 0x7c.

Thanks,
Ivan


           reply	other threads:[~2026-07-08 18:09 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <CANEVyMq03cwnhjc_H5hWMXwC1CH=V8OZDQFNT+ufzpHOOYJaaw@mail.gmail.com>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e7517908-f02c-4c5a-ac63-34a4d26edf41@redhat.com \
    --to=ivecera@redhat.com \
    --cc=arkadiusz.kubalewski@intel.com \
    --cc=michael@cambrianworks.com \
    --cc=netdev@vger.kernel.org \
    --cc=vadim.fedorenko@linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox