Difference between revisions of "ConfigID and UniqueID"

From DAVE Developer's Wiki
Jump to: navigation, search
(Hardware implementations of the ConfigID)
Line 54: Line 54:
 
== Hardware implementations of the ConfigID ==
 
== Hardware implementations of the ConfigID ==
  
The following paragraphs briefly describe the available solution for storing the ConfigID.
+
The following paragraphs briefly describe the available solutions for storing the ConfigID.
  
 
=== OTP on the SOC ===
 
=== OTP on the SOC ===
  
Some SOCs provides programmable OTPs (eg. for security, mac address, boot modes, etc). Usually some of these are general purpose registers and can be managed by the user.
+
Some SOCs provides programmable OTPs (eg. for security, MAC address, boot modes, etc). Usually, some of these are general purpose registers and can be managed by the user.
  
 
This is the ideal implementation, because:
 
This is the ideal implementation, because:
 
* ConfigID is stored in the most important component of the SOM
 
* ConfigID is stored in the most important component of the SOM
 
* the component that hosts the ConfigID is NOT optional
 
* the component that hosts the ConfigID is NOT optional
* typically, a very selective lock can be forced
+
* typically, a very selective lock can be forced. In general, for reliability and/or security reasons, OTP areas used to store ConfigIDs may be locked during the manufacturing process.
  
 
=== OTP 1-wire memory ===
 
=== OTP 1-wire memory ===

Revision as of 09:41, 26 November 2018

Info Box
Diva-am335x-overview.png Applies to Diva
Bora5-small.jpg Applies to Bora
Axel-04.png Applies to Axel Ultra
Axel-lite 02.png Applies to Axel Lite
AXEL ULite-top.png Applies to AXEL ULite
SBC Lynx-top.png Applies to SBC Lynx

Introduction[edit | edit source]

ConfigID[edit | edit source]

ConfigID is a new feature of DAVE Embedded Systems products. Its main purpose is providing an automatic mechanism for the identification of the product model and configuration.

With ConfigID, we aim at:

  • completing the hardware configuration information that the software can't normally auto-detect (i.e. RAM chip version,...), implementing a dedicated reliable detect procedure
  • when required, overriding the auto-detected hardware configuration information

When implemented, this mechanism allows for:

  • initializing in the proper way the hardware platform, based on the specific features and parameters of the product, using a common software base (eg: a typical case is the SDRAM controller parameters, which must be configured by U-Boot depending on the particular memory chip, which can be different for the various SOM models)
  • getting the complete hardware configuration (combining ConfigID with the information collectable at runtime) of a product deployed on the field

In simple words, model identification means the capability of reading a numerical code, stored in an available device (SOC's OTP , I2C EEPROM, 1-wire memories, protected NOR flash, etc.)

There are two ConfigIDs:

  • SOM ConfigID: which reflects the characteristics of the SOM (stored on the SOM itself)
  • Carrier Board (CB) ConfigID: which reflects the characteristics of the carrier board that hosts the SOM (stored on the carrier board itself and read by the SOM at boot time)

UniqueID[edit | edit source]

An additional attribute is UniqueID, which is a read-only code which univocally identifies a single product and is used for traceability.


200px-Emblem-important.svg.png

It is worth remembering that ConfigID and UniqueID are independent from product serial number.

Customer's action[edit | edit source]

DAVE Embedded Systems recommends to be up-to-date with Official SOM's BSPs for taking advantages of ConfigID/UniqueId features: this is the only required action.

  • ConfigID advantage: to allow U-Boot bootloader to be executed only with the correct configuration (if the U-Boot loaded is not the proper one, it may stop execution avoiding incorrect behaviour)
  • UniqueID advantage: to trace univocally each individual SOMs and, in turn, all the on-the-field equipments

ConfigID values[edit | edit source]

ConfigID is a N-bit (typically N>8) signed integer, that can have the following values:

  • < 0: error
    • -1: not initialized
  • = 0: ConfigID legacy
    • for prototypes (ConfigID not yet defined) or for products manufactured before the introduction of the ConfigID feature
  • > 0: valid ConfigID
    • values are reported accordingly with the specific product table

Hardware implementations of the ConfigID[edit | edit source]

The following paragraphs briefly describe the available solutions for storing the ConfigID.

OTP on the SOC[edit | edit source]

Some SOCs provides programmable OTPs (eg. for security, MAC address, boot modes, etc). Usually, some of these are general purpose registers and can be managed by the user.

This is the ideal implementation, because:

  • ConfigID is stored in the most important component of the SOM
  • the component that hosts the ConfigID is NOT optional
  • typically, a very selective lock can be forced. In general, for reliability and/or security reasons, OTP areas used to store ConfigIDs may be locked during the manufacturing process.

OTP 1-wire memory[edit | edit source]

This implementation requires a 1-wire memory chip.

I2C Eeprom[edit | edit source]

This implementation requires connecting an EEPROM to an I2C bus of the SOC. Moreover, routing a write protect pin to the SOM connector is required.

NOR Flash SPI[edit | edit source]

This implementation requires a NOR flash connected to the SPI bus of the SOC.

DAVE Embedded Systems' hardware implementation[edit | edit source]

DAVE's SOCs implement the ConfigID feature depending on hardware Capabilities of the SOCs. The following list shows the priority used for its implementation:

  1. OTPs
    1. example: AXEL family processor (i.MX6) implements ConfigID using processor's OTP
    2. AXEL uses GP1 eFuse register to store ConfigID
  2. NOR Flash SPI
    1. example: DIVA family processor (AM335x) implements ConfigID using NOR SPI (if present)
    2. DIVA and BORA use the first 32bytes OTP block on NOR SPI to store ConfigID (and its CRC32), UniqueID (and its CRC32)
  3. I2C Eeprom
    1. example: DIVA family processor (AM335x) implements ConfigID using I2C Eeprom when NOR SPI is not present (module boots from NAND or SD)
  4. 1-wire
    1. example: latest XELK, DIVELK, BELK Carrier Boards implement CB ConfigID using the onboard 1-wire device (DS2431)

Software implementation[edit | edit source]

U-Boot[edit | edit source]

u-boot integrates the software routines for reading and displaying the ConfigID: hereunder an example of SOM ConfigID at startup:

U-Boot 2013.04-00010-gcb05b30 (Jun 26 2015 - 12:49:26)-xelk-2.1.0

CPU:   Freescale i.MX6Q rev1.5 at 792 MHz
CPU:   Temperature 47 C, limits (-40 C, 125 C), calibration data: 0xc0
Reset cause: POR
Environment: SPI Flash
I2C:   ready
DRAM:  2 GiB
Now running in RAM - U-Boot at: 8ff35000
NAND:  512 MiB
MMC:   FSL_SDHC: 0, FSL_SDHC: 1
SF: Detected S25FL256S with page size 64 KiB, total 32 MiB
In:    serial
Out:   serial
Err:   serial
Power: found PFUZE100 (devid=10, revid=21)
SOM ConfigID#: 00000003
SOM UniqueID#: df646299:0b0579d4

For accessing these information on Linux procfs, the device tree must be modified (using u-boot fdt command): for example:

DIVA# setenv fdtfixup 'fdt addr ${fdtaddr}; run fdtfixup_configid'
DIVA# setenv fdtfixup_configid 'fdt set / som_configid ${som_configid#}; fdt set / som_uniqueid ${som_uniqueid#}; fdt set / cb_configid ${cb_configid#}; fdt set / cb_uniqueid ${cb_uniqueid#}'

Linux[edit | edit source]

It is possible to read the ConfigID/UniqueID via procfs; for example:

root@axel-lite:~# cat /proc/device-tree/som/configid && echo
00000003
root@axel-lite:~# cat /proc/device-tree/som/uniqueid && echo
df646299:0b0579d4
root@axel-lite:~#

Legacy device tree, has a sightly different procfs structure:

root@axel-lite:~# cat /proc/device-tree/som_configid && echo
00000003
root@axel-lite:~# cat /proc/device-tree/som_uniqueid && echo
df646299:0b0579d4
root@axel-lite:~#