[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<PH8PR11MB796575D608575FAA5233DBD4954A2@PH8PR11MB7965.namprd11.prod.outlook.com>
Date: Mon, 28 Oct 2024 15:02:44 +0000
From: <Ronnie.Kunin@...rochip.com>
To: <andrew@...n.ch>, <Fabi.Benschuh@....de>
CC: <Woojung.Huh@...rochip.com>, <UNGLinuxDriver@...rochip.com>,
<andrew+netdev@...n.ch>, <davem@...emloft.net>, <edumazet@...gle.com>,
<kuba@...nel.org>, <pabeni@...hat.com>, <netdev@...r.kernel.org>,
<linux-usb@...r.kernel.org>
Subject: RE: [PATCH] Add LAN78XX OTP_ACCESS flag support
> From: Andrew Lunn <andrew@...n.ch>
> Sent: Monday, October 28, 2024 8:38 AM
>
> On Sat, Oct 26, 2024 at 01:05:46AM +0200, Fabian Benschuh wrote:
> > With this flag we can now use ethtool to access the OTP:
> > ethtool --set-priv-flags eth0 OTP_ACCESS on ethtool -e eth0 # this
> > will read OTP if OTP_ACCESS is on, else EEPROM
> >
> > When writing to OTP we need to set OTP_ACCESS on and write with the
> > correct magic 0x7873 for OTP
>
> Please can you tell us more about OTP vs EEPROM? Is the OTP internal while the EEPROM is external?
> What is contained in each? How does the device decide which to use when it finds it has both?
>
> Andrew
This is pretty much the same implementation that is already in place for the Linux driver of the LAN743x PCIe device.
OTP (one time programmable) is a configuration memory internal to the device. EEPROM is external.
The internal OTP memory always exists but it may not be programmed. The EEPROM is optional, and if present can also be programmed or not.
A signature byte at offset 0 indicates whether the OTP or EEPROM device is programmed.
If present, EEPROM has higher priority.
More info @ Chapter 10 here;
https://ww1.microchip.com/downloads/aemDocuments/documents/UNG/ProductDocuments/DataSheets/LAN7800-Data-Sheet-DS00001992H.pdf
> I'm just wondering if we even need a private flag, if the hardware will use one or the other exclusively?
>
Yes, both can be present/used, so we need the flag so we can tell the destination of a write or source of a read.
Ronnie
Powered by blists - more mailing lists