aboutsummaryrefslogtreecommitdiffstats
path: root/mpm/tools/eeprom-init.c
Commit message (Collapse)AuthorAgeFilesLines
* mpm: eeprom: Fix default values in EEPROM utilitiesMartin Braun2022-02-241-30/+71
| | | | | | | | | | | | | | | | | | | | | | | | When executing eeprom-init on E320 (which was originally written for N310), it would use defaults from N310, potentially causing issues. These issues would have arisen if we letter-revved the E320 one more time (because at rev 5, N310 had a compatibility cutover). Summary of changes: - eeprom-init will now read values *not* given on the command line from the existing content of the EEPROM, if it contains valid data. This means that DT, MCU, and rev compat values will no longer get auto-derived if the EEPROM already contained "good" values. - If the EEPROM is empty or corrupted, eeprom-init will no longer run if the pid value is not provided. This is to avoid N310 defaults being written to E320 EEPROMs. - A README is added to explain which devices use which utilities. - PID checks are more strict now. It is unlikely we'll build new devices using the old EEPROM format (prior to TLV), so we can check specifically for E320, N3x0. - The hard-coded list of PIDs for the EEPROM tools are moved to a central location (eeprom-pids.h). - The code to derive values for DT/MCU/rev compat from the rev is now pid-specific and no longer device-agnostic.
* mpm: Add MB-EEPROMv3Martin Braun2019-05-101-6/+22
| | | | | | | | | | This includes a rev_compat field, which we can use to identify the last hardware revision this hardware is compatible with. Example: Say the current hardware revision is 7, but it is compatible with version 5, then we store 7 as the current rev, and 5 as the rev_compat. Software can now check the rev_compat rather than the current rev for compatibility. This makes MPM more future-proof against minor, compatible hardware changes.
* mpm: tools: eeprom-init: Fix issue with dt/mcu-compat numberMoritz Fischer2018-07-121-4/+8
| | | | | | | | | | | Fix issue with dt-compat and mcu-compat numbers not working for the case where 0 is a legitimate dt/mcu compat number. This can happen if a Rev2 board (1 in hardware) shares a DT or MCU firmware with the Rev1 board (0 in hardware). Fixes 91a5518443f ("mpm: tools: Introduce dt-compat ...") Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com>
* mpm: tools: Introduce dt-compat and mcu-compat fieldsMoritz Fischer2018-06-201-8/+44
| | | | | | | | | | | | | | | | Introduce dt-compat and mcu-compat fields into the eeprom structure. For the motherboard eeprom this is straightforward, since there's still padding bytes that could be (ab)used for this. On the dboard side more creativity is required and the original revision field of 2 bytes is reduced to only one byte revision and one byte dt-compat. Since this will only affect new units being backwards compatible with older versions of the bootloader is not an issue. Reviewed-by: Brent Stapleton <brent.stapleton@ettus.com> Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com>
* mpm: Update EEPROM tools to allow setting PIDMartin Braun2018-03-051-5/+15
| | | | | | Default behaviour is to fall back to writing the N310 PID (0x4242). Reviewed-by: Moritz Fischer <moritz.fischer@ettus.com>
* mpm: Update all license headersMartin Braun2018-02-191-1/+1
| | | | | - Fix typo in company name (missing 'a') - Updated SPDX license identifier to version 3.0
* mpm: Add EEPROM utilities for N310Martin Braun2018-01-121-0/+42
Actually-written-by: Moritz Fischer <moritz.fischer@ettus.com>