You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

Overview


This application note details the use of the PHYTEC EEPROM Flashtool with PHYTEC AM572x SOMs. This application note describes the structure of the prerequisite configuration files, the EEPROM data layout for use with PHYTEC BSPs, and the process of using the tool from first boot with a SOM that does not have the EEPROM programmed. This application note also gives some examples of how PHYTEC uses the EEPROM data to facilitate hardware bring-up.

Configuration Files Format


The EEPROM Flashtool configuration files are text files comprised of sections, properties, and values. For this application note, we will use the PCM-057.ini configuration file to detail the function and population options of each section. A section is indicated by a set of brackets that enclose the name of that section. A property and value pair in any given section is formed as property: value.

Important Configuration File Sections:

In each section, a description of the section and its options will follow.

PHYTEC
This section and all of the following properties are required for all configuration files to specify the basic configuration of the SOM and how to properly parse the rest of the configuration file.

  • i2c_bus: This is the I2C bus on which the EEPROM resides in decimal format.
  • i2c_dev: This is the I2C device ID for the EEPROM in hex format.
  • eeprom_offset: This is the offset at which the EEPROM data will be written. This should be set to zero for use with PHYTEC BSPs. Decimal format.
  • kit_options: This is the number of possible kit options for any given PHYTEC SOM. AM572x-based PHYTEC SOMs have nine kit options. Decimal format.
  • mod_version: This is the number associated with the module type. Zero is PCM, one is PFL, two is PCA. AM572x-based PHYTEC SOMs are of the PCM type. Decimal format.

Kit
This section is required for all configuration files to specify the names of the kit options for each given configuration file. The number of options in this section should match the kit_options property in the PHYTEC section above. Each property in this section must be a number that corresponds to the zero-based index of the kit options specified by the BOM. The value for each property corresponds to the plain-text name for a kit option. For AM572x-based PHYTEC SOMs, there are nine properties in this section: 0 through 8, the values of which are DDR, ECC, eMMC/NAND, SPI, Controller, EEPROM, Ethernet, RTC, and Temp.

Known

This section is required for all configuration files to specify the known (and allowed) kit options and BOM revisions to be used with the EEPROM Flashtool. Each property in this section is a string that represents a set of kit options and the value for each property represents the maximum known BOM revision for that set of kit options. A property in this section can be a KSP number, such as KSP01, but the following KSP section must be populated with the same KSP number or the EEPROM Flashtool will fail.

KSP

This section is required for all configuration files that have KSP properties in the above Known section. Each property in this section is a string that corresponds to the KSP number and the value for each property is a string that represents the kit options for the KSP. The value for all properties in this section should exactly match a property in the Known section.

EEPROM Data Layout


The PHYTEC EEPROM data layout is a 32-byte structure located at offset 0 on the EEPROM. The following table details each entry in the structure for the PHYTEC AM572x SOM EEPROM layout.

ByteNameDescription
1-4headerPHYTEC EEPROM header. Unsigned 4-byte integer.
5api_versionPHYTEC EEPROM layout API version. Unsigned 1-byte integer.
6mod_version0: PCM, 1: PFL, 2: PCA. Unsigned 1-byte integer.
7som_pcb_revPHYTEC SOM PCB revision. Unsigned 1-byte integer.
8-13macMAC ID for primary ethernet port. Six unsigned 1-byte hex values.
14ksp0: No KSP, 1: KSP, 2: KSM. Unsigned 1-byte integer.
15kspnoNumber for KSP/KSM module. Unsigned 1-byte integer.
16-26kit_optSet of kit options. For the AM572x, this is an 11-character ASCII string with no null termination.
27-31reservedReserved bytes that may be utilized by customers or by PHYTEC in a newer PHYTEC EEPROM API version.
32bsThe number of bits set in all of the preceding bytes. Unsigned 1-byte integer.

Using the EEPROM Flashtool


If you are working with a custom SOM or a SOM with an EEPROM that hasn't been programmed, you will want to flash your EEPROM using the EEPROM Flashtool. This section will detail where the EEPROM Flashtool and default configuration files are located and how to properly use the tool.

If you need guidance on booting into Linux on your board, please refer to the latest Yocto BSP Quickstart listed here.

In the PHYTEC Linux BSP filesystem, the EEPROM Flashtool is located in /usr/bin/phytec-eeprom-flashtool/ and its configuration files are located in /usr/bin/phytec-eeprom-flashtool/configs/. By default, the EEPROM Flashtool directory is not present in the root user's path. Run the following command to add the EEPROM Flashtool directory to your path:

export PATH=/usr/bin/phytec-eeprom-flashtool:$PATH

The use of the EEPROM Flashtool is simple. From the README:

Use of this tool requires a properly-formatted configuration file for each
target PHYTEC platform (PCM-057.ini for PCM-057 boards, for example).
By default, this tool looks for configuration files in a 'configs' subdirectory
to where the script is currently located.

Usage:

	phytec_eeprom_flashtool.py [(-d|--dir) DIR] <command>

	-d or --dir <DIR> overrides the config directory (relative or absolute)

Commands:

	read <SOM>

	Description:
	Read command reads the EEPROM and prints the EEPROM contents and kit
	options described by the <SOM>.ini file.

	display <BOM> <PCB revision>

	Description:
	Display command parses the kit options, BOM revision, and PCB revision
	and prints the resulting EEPROM contents without writing to the EEPROM.
	This command is intended as a "dry run" for the write command.

	write <BOM> <PCB revision>

	Description:
	Write command parses the kit options, BOM revision, and PCB revision
	and writes them to the EEPROM.

Examples:

	phytec_eeprom_flashtool.py read PCM-057

	phytec_eeprom_flashtool.py display PCM-057-40201111I.A0 3

	phytec_eeprom_flashtool.py write PCM-057-KSP01.A2 4


Using the EEPROM Data



  • No labels