Overview of i.MX8QXP System Controller Unit (SCU)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Overview of i.MX8QXP System Controller Unit (SCU)

Overview of i.MX8QXP System Controller Unit (SCU)

The i.MX 8QXP introduces a concept for manipulating resource allocation, power, clocking and IO configuration and muxing, the System Controller Unit (SCU) has been added to the system. The SCU is an Arm Cortex-M4 core and is the first processor to boot in the i.MX 8QXP design.

It is the responsibility of the SCU to control:

  • Boot management
  • Power management
  • Clock
  • IO and reset management configuration and muxing
  • Resource partitioning / access control
  • DDR Management
  • Temperature monitoring
  • AP watchdog services
  • Low power wakeup

All those subsystems are abstracted thanks to the System Controller Firmware (SCFW) running in the SCU. Other software components communicate with SCU via an Application Programming Interface (API).

This API makes Remote Procedure Calls (RPC) via an underlying Inter-Processor Communication (IPC) mechanism. Each OS distributed by NXP features a library that allows it to interact with the SCFW running on the SCU.

The SCU sub-system is made out of:

  • 1x Arm Cortex-M4 processor running at 266MHz with 256KB of Tightly Coupled Memory (TCM)

It includes the following set of peripherals:

  • 1x TPM
  • 1x UART
  • 1x I2C
  • 8x GPIOs
  • 4x MUs

System Controller Firmware (SCFW)

NXP only releases packages in a majority object code form, however a board.c file is provided in which most of the configuration of the SCFW can be done.

The first main step from SCFW to configure the DDR and start all other cores in the system. The boot flow is described in the image below:

Bio_TICFSL_0-1695839714277.png

 

The i.MX8 boot sequence involves SCU ROM, SCFW, Security Controller (SECO) ROM, and SECO FW:

  • At reset, the SCU ROM and SECO ROM both start execution
  • The SCU ROM reads boot mode pins
  • SCU ROM loads the first container from the boot media; this container always has the SECO FW, signed using the NXP key
  • The SECO FW is loaded into SECO Tightly Coupled Memory (TCM)
  • A message is sent by the SCU via private MU to the SECO ROM to authenticate and run SECO FW
  • The SCU ROM loads the second container from the boot media; this container always has the SCFW and can be signed using the customer key
  • SCFW is loaded to SCU TCM
  • SCU ROM will then configure the DDR
  • SCU ROM will start the SCFW

From this point SCFW takes over and loads any image to the Arm Cortex-M or Cortex-A cores.

 

Downloading and building SCFW

Download the Arm GCC toolchain from here:

https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads

Export the toolchain to compile SCFW:

mkdir ~/gcc_toolchain

cp ~/Downloads/gcc-arm-none-eabi-10.3-2021.10-linux.tar.bz2 ~/gcc_toolchain/

cd ~/gcc_toolchain/

tar -xvjf gcc-arm-none-eabi-10.3-2021.10-linux.tar.bz2

export TOOLS=~/gcc_toolchain/

Download the file IMX-SCFW-PORTING-KIT-1.4.2 from NXP.

After the SCFW porting kit is downloaded and un-tar, navigate into packages and run the binary file inside:

$ cd <download-dir>/packages/

$ chmod a+x imx-scfw-porting-kit-1.4.2.bin

$ ./imx-scfw-porting-kit-1.4.2.bin

Navigate inside the newly created “imx-scfw-porting-kit” and into “src”. Extract the desired SCFW porting kit.

$ cd imx-scfw-porting-kit-1.4.2/

$ tar -xvf src/scfw_export_mx8qx.tar.gz

$ cd scfw_export_mx8qx/

The tar file extracted will be different depending on which board is being used.

All the code that is specific to a board configuration is under “platform/board/mx8qxp_mek/board.c”

To compile SCFW type the following command:

$ make qx B=mek R=B0

All the files resulting from compilation can be found inside build_mx8qx/

No ratings
Version history
Last update:
‎09-27-2023 11:37 AM
Updated by: