Difference between revisions of "ConfigID and UniqueID"

From DAVE Developer's Wiki
Jump to: navigation, search
(DAVE Embedded Systems' hardware implementation)
(Created page with "{{InfoBoxTop}} {{Applies To Diva}} {{Applies To Bora}} {{AppliesToAxel}} {{AppliesToAxelLite}} {{InfoBoxBottom}} == Introduction == === ConfigID === '''ConfigID''' is a new...")
(19 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 
{{InfoBoxTop}}
 
{{InfoBoxTop}}
{{AppliesToAXEL Lite TN}}
 
{{AppliesToAXEL ULite TN}}
 
{{AppliesTo SBC Lynx TN}}
 
{{AppliesTo ORCA TN}}
 
{{AppliesTo ORCA SBC TN}}
 
{{AppliesTo MITO 8M Mini TN}}
 
{{AppliesTo MITO 8M Nano TN}}
 
{{AppliesTo MITO 8M TN}}
 
{{AppliesToETRA TN}}
 
{{AppliesTo ETRA SBC TN}}
 
{{AppliesToBORA TN}}
 
{{AppliesToBORA Lite TN}}
 
 
{{Applies To Diva}}
 
{{Applies To Diva}}
 +
{{Applies To Bora}}
 +
{{AppliesToAxel}}
 +
{{AppliesToAxelLite}}
 
{{InfoBoxBottom}}
 
{{InfoBoxBottom}}
  
<section begin="Body" />
+
== Introduction ==
== ConfigID  and UniqueID==
 
  
 
=== ConfigID ===
 
=== ConfigID ===
  
'''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.'''  
+
'''ConfigID''' is a new feature of DAVE Embedded Systems products. It's main purpose is '''providing an automatic mechanism for the identification of the product model and configuration.'''  
  
 
With ConfigID, we aim at:
 
With ConfigID, we aim at:
Line 41: Line 31:
 
An additional attribute is '''UniqueID''', which is a read-only code which univocally identifies a single product and is used for traceability.
 
An additional attribute is '''UniqueID''', which is a read-only code which univocally identifies a single product and is used for traceability.
  
{{ImportantMessage|text=It is worth remembering that ConfigID and UniqueID are independent from  [[Product_serial_number|product serial number]].}}
+
== Customer's action ==
 
 
=== Customer's action ===
 
  
 
DAVE Embedded Systems <u>recommends to be up-to-date with Official SOM's BSPs</u> for taking advantages of ConfigID/UniqueId features: this is the '''only''' required action.
 
DAVE Embedded Systems <u>recommends to be up-to-date with Official SOM's BSPs</u> for taking advantages of ConfigID/UniqueId features: this is the '''only''' required action.
Line 50: Line 38:
 
* '''UniqueID advantage''': to trace univocally each individual SOMs and, in turn, all the on-the-field equipments
 
* '''UniqueID advantage''': to trace univocally each individual SOMs and, in turn, all the on-the-field equipments
  
=== ConfigID values ===
+
== ConfigID values ==
  
 
ConfigID is a N-bit (typically N>8) signed integer, that can have the following values:
 
ConfigID is a N-bit (typically N>8) signed integer, that can have the following values:
Line 60: Line 48:
 
** values are reported accordingly with the specific product table
 
** values are reported accordingly with the specific product table
  
=== Hardware implementations of the ConfigID ===
+
== Hardware implementation ==
  
The following paragraphs briefly describe the available solutions for storing the ConfigID.
+
The following paragraphs briefly describe the available solution 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. In general, for reliability and/or security reasons, OTP areas used to store ConfigIDs may be locked during the manufacturing process.
+
* typically, a very selective lock can be forced
  
==== OTP 1-wire memory ====
+
=== OTP 1-wire memory ===
  
 
This implementation requires a 1-wire memory chip.
 
This implementation requires a 1-wire memory chip.
  
==== I2C Eeprom ====
+
=== I2C Eeprom ===
  
 
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.
 
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 ====
+
=== NOR Flash SPI ===
  
 
This implementation requires a NOR flash connected to the SPI bus of the SOC.
 
This implementation requires a NOR flash connected to the SPI bus of the SOC.
  
=== DAVE Embedded Systems' hardware implementation ===
+
== DAVE's Hardware implementation ==
  
 
DAVE's SOCs implement the ConfigID feature depending on hardware Capabilities of the SOCs. The following list shows the priority used for its implementation:
 
DAVE's SOCs implement the ConfigID feature depending on hardware Capabilities of the SOCs. The following list shows the priority used for its implementation:
Line 95: Line 83:
 
## DIVA and BORA use the first 32bytes OTP block on NOR SPI to store ConfigID (and its CRC32), UniqueID (and its CRC32)
 
## DIVA and BORA use the first 32bytes OTP block on NOR SPI to store ConfigID (and its CRC32), UniqueID (and its CRC32)
 
# I2C Eeprom
 
# I2C Eeprom
## example: DIVA family processor (AM335x) or BORA Lite processor (ZYNQ) implements ConfigID using I2C Eeprom when NOR SPI is not present (module boots from NAND or SD)
+
## example: DIVA family processor (AM335x) implements ConfigID using I2C Eeprom when NOR SPI is not present (module boots from NAND or SD)
## DIVA and BORA Lite use the first 32bytes on I2C EPROM to store ConfigID (and its CRC32), UniqueID (and its CRC32)
 
 
# 1-wire
 
# 1-wire
## example: latest AXEL Lite, AXEL ULite and BORA/BORA Xpress/BORA Lite Evaluation Kits implement CB ConfigID using the onboard 1-wire device (DS2431)  
+
## example: latest XELK, DIVELK, BELK Carrier Boards implement CB ConfigID using the onboard 1-wire device (DS2431)  
  
==== Software implementation ====
+
=== Software implementation ===
  
===== U-Boot =====
+
==== U-Boot ====
 
u-boot integrates the software routines for reading and displaying the ConfigID: hereunder an example of SOM ConfigID at startup:
 
u-boot integrates the software routines for reading and displaying the ConfigID: hereunder an example of SOM ConfigID at startup:
  
Line 126: Line 113:
 
</pre>
 
</pre>
  
For accessing these information on Linux <code>procfs</code>, the device tree must be modified (using u-boot '''fdt''' command): for example:
+
For accesing these information on Linux <code>procfs</code>, the device tree must be modified (using u-boot '''fdt''' command): for example:
  
 
<pre>
 
<pre>
Line 133: Line 120:
 
</pre>
 
</pre>
  
===== Linux =====
+
==== Linux ====
  
 
It is possible to read the ConfigID/UniqueID via <code>procfs</code>; for example:
 
It is possible to read the ConfigID/UniqueID via <code>procfs</code>; for example:
 
<pre>
 
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:~#
 
</pre>
 
 
Legacy device tree, has a sightly different <code>procfs</code> structure:
 
  
 
<pre>
 
<pre>
Line 154: Line 131:
 
root@axel-lite:~#
 
root@axel-lite:~#
 
</pre>
 
</pre>
 
=== A real case example of ConfigID benefit ===
 
The ConfigID benefit is clear when:
 
* there is a number of products deployed on the field
 
* the products deployed on the field needs a SW update
 
The ideal scenario is that all products are equal and there are no differences on the Bill Of Material (BOM):<gallery caption="All products have the same BOM with a single Config ID">
 
File:Smartphone-icon.png|ConfigID A
 
File:Smartphone-icon.png|ConfigID A
 
File:Smartphone-icon.png|ConfigID A
 
File:Smartphone-icon.png|ConfigID A
 
File:Smartphone-icon.png|ConfigID A
 
File:Smartphone-icon.png|ConfigID A
 
</gallery>In this case there are no problems to deploy a new SW update on the field: all products have the <u>'''same'''</u> HW configuration, then the '''<u>same</u>''' SW configuration.
 
 
Unfortunately, this is an ideal scenario. The reality is that:
 
* component obsolescence
 
* product shortage
 
* second source strategies
 
force to have an on-the-field different version of product (with same functionalities but with different HW configuration) which doesn't permit to realize what proposed in the ideal case.
 
 
{{ImportantMessage|text=The usage of the ConfigID technique, allows the running SW to identify the underlying HW configuration and automatically adapt the BSP (i.e. the driver layer) to properly use the HW subsystems: this, maintaining the overall product features identical to the final User point-of-view.}}
 
 
<gallery caption="All products are similar BUT there are different Config ID between the 2 product versions">
 
File:Smartphone-icon.png|ConfigID A
 
File:Smartphone-icon.png|ConfigID A
 
File:Smartphone-icon-2.png|ConfigID B
 
File:Smartphone-icon-2.png|ConfigID B
 
File:Smartphone-icon.png|ConfigID A
 
File:Smartphone-icon-2.png|ConfigID B
 
</gallery>With a scenario, like the one described above, if you would like to update the SW you need to implement a strategy for understanding what platform version is going to be updated. The Config ID is used exactly for this goal.
 
 
The ConfigID provides to the software update routine the information on which product version is so the update can be adapted to the exact product version.
 
 
In this way, you can distribute one single version of the software update which will automatically adapt itself to the currently running platform.
 
 
==== How to handle After Sales with Config ID ====
 
One of the mos common questions about Config ID is how to handle the Config ID issue. Below is described with an example how to handle it.
 
 
This product is returned from the field with a problem on the display:
 
[[File:Smartphone-icon.png|none|thumb|159x159px|Config ID A]]
 
After Sales Dept analizes the product and decide to substitute the display. The problem is that the existing display is not available - because of is End Of Life (EOL) - and it is required to move to a different display: in the product a different Config ID will be written because of the 2 displays requires a dedicated SW version and cannot be distinguished automatically during the startup. The final result is to have the similar product:
 
[[File:Smartphone-icon-2.png|none|thumb|189x189px|Config ID B]]
 
As indicated, the new display requires a different Config ID (from A to B) so it can be updated with an easy software routine before start the SW update. This Config ID update routine can be implemented in manufacturing facility typically using a dedicated USB pen drive which modify the saved ConfigID to the new one depending on the storage memory in use<section end="Body" />
 

Revision as of 13:31, 20 August 2015

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

Introduction[edit | edit source]

ConfigID[edit | edit source]

ConfigID is a new feature of DAVE Embedded Systems products. It's 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.

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 implementation[edit | edit source]

The following paragraphs briefly describe the available solution 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

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's 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 accesing 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:~#