The latest development version of this page may be more current than this released 2.1.0 version.

Gordon Peak MRB

Overview

The Intel Gordon Peak Module Reference Board (GP MRB) is used in the automotive industry for the development of in-vehicle applications such as heads-up displays and entertainment systems.

Gordon Peak MRB

Gordon Peak MRB

Hardware

Supported Features

In addition to the standard architecture devices (HPET, local and I/O APICs, etc.), Zephyr supports the following Apollo Lake-specific SoC devices:

  • HSUART

  • GPIO

  • I2C

HSUART High-Speed Serial Port Support

The Apollo Lake UARTs are NS16550-compatible, with “high-speed” capability.

Baud rates beyond 115.2kbps (up to 3.6864Mbps) are supported, with additional configuration. The UARTs are fed a master clock which is fed into a PLL which in turn outputs the baud master clock. The PLL is controlled by a per-UART 32-bit register called PRV_CLOCK_PARAMS (aka the PCP), the format of which is:

[31]

[30:16]

[15:1]

[0]

enable

m

n

toggle

The resulting baud master clock frequency is (n/m) * master.

Typically, the master clock is 100MHz, and the firmware by default sets the PCP to 0x3d090240, i.e., n = 288, m =  15625, which results in the de-facto standard 1.8432MHz master clock and a max baud rate of 115.2k. Higher baud rates are enabled by changing the PCP and telling Zephyr what the resulting master clock is.

Use devicetree to set the value of the PRV_CLOCK_PARAMS register in the UART block of interest. Typically a devicetree overlay file would be present in the application directory (specific to the board, such as up_squared.overlay or gpmrb.overlay), with contents like this:

/ {
    soc {
        uart@0 {
            pcp = <0x3d090900>;
            clock-frequency = <7372800>;
            current-speed = <230400>;
        };
    };
};

The relevant variables are pcp (the value to use for PRV_CLOCK_PARAMS), and clock-frequency (the resulting baud master clock). The meaning of current-speed is unchanged, and as usual indicates the initial baud rate.

Building and Running Zephyr

Use the following procedure to boot a Zephyr application on the Gordon Peak MRB.

Build Zephyr Application

Build a Zephyr application; for instance, to build the hello_world application for the GP MRB:

# From the root of the zephyr repository
west build -b gpmrb samples/hello_world

This will create a standard ELF binary application file named zephyr.elf, and the same binary with debugging information removed named zephyr.strip. Because of the limited firmware flash area on board, we’ll use the smaller, stripped version.

Move the stripped application to your home directory for use in the next steps:

$ cp zephyr/zephyr.strip ~

Get the Leaf Hill Firmware Files

The Slim Bootloader (see the next step) requires binary firmware images specific to the GP MRB: in this instance, the “Leaf Hill” firmware. This can be downloaded from Intel:

$ cd
$ wget https://firmware.intel.com/sites/default/files/leafhill-0.70-firmwareimages.zip
$ unzip leafhill-0.70-firmwareimages.zip

There will now be two files named LEAFHILD.X64.0070.D01.1805070344.bin and LEAFHILD.X64.0070.R01.1805070352.bin or similar in your home directory, which are the debug (D) and release (R) versions of the binary packages, respectively. Make note of the release (*R01*) file name for the next step.

Build Slim Bootloader

Zephyr runs as a direct payload of the Slim Bootloader (SBL). For more complete information on SBL, including comprehensive build instructions, see the Slim Bootloader site.

$ cd
$ git clone https://github.com/slimbootloader/slimbootloader.git
$ cd slimbootloader
$ python BuildLoader.py clean
$ python BuildLoader.py build apl -p ~/zephyr.strip

Now that the SBL has been built with the Zephyr application as the direct payload, we need to “stitch” together SBL with the board firmware package. Be sure to replace the release filename with the one noted in the previous step:

$ python Platform/ApollolakeBoardPkg/Script/StitchLoader.py \
      -i ~/LEAFHILD.X64.0070.R01.1805070352.bin \
      -s Outputs/apl/Stitch_Components.zip \
      -o ~/sbl.bin

Now the file sbl.bin in your home directory contains a firmware image with SBL and the Zephyr application, ready to flash to the GP MRB.

Flash the Image

Connect the IOC to the GP MRB and connect the USB cable to your development machine. Then, using the Intel Platform Flash tools supplied with your board, flash the firmware:

$ sudo /opt/intel/platformflashtool/bin/ias-spi-programmer --write ~/sbl.bin

Note

Refer to the instructions with the IOC and/or GP MRB for further information on flashing the firmware.

Launch Zephyr

Connect to UART 2 on the GP MRB and press the “ignition” button. After initialization messages, you will see the Zephyr banner:

***** Booting Zephyr OS v1.14.0-rc3-1254-g2a086e4c13ef *****
Hello World! gpmrb

You are running a Zephyr application on your Gordon Peak MRB.