Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The sources are pulled from:

  1. arm-trusted firmware: GitHub - ARM-software/arm-trusted-firmware

  2. mv-ddr-marvell: GitHub - MarvellEmbeddedProcessors/mv-ddr-marvell

  3. u-boot: currently from marvell SDK

  4. linux: GitHub - torvalds/linux: Linux kernel source tree

  5. patches are supplied by Solid-Run in the patches/ directory

  6. binaries are supplied by Solid-Run in the binaries/ directory

    The build script builds the u-boot, atf and linux components, integrate it with Ubuntu rootfs bootstrapped with multistrap. Buildroot is also built aside for future use.

U-Boot based on SDK10 

The CN913x u-boot is not public yet, and was taken from Marvell's SDK10

In order to use use the script with the SDK's 1186 patches, create a directory in ROOTDIR:

...

The board can be configured based on the amount of CP# devices and to which carrier board it will fit. There are a few parameters that must be taken to account:

...

  1. CP_NUM:

    1. CP_NUM=1 - CN9130

    2. CP_NUM=2 - CN9131

    3. CP_NUM=3 - CN9132

  2. BOARD_CONFIG - defines the device tree based on the platform

    1. BOARD_CONFIG=0 - CN9132 CEx7 based on Clearfog Eval Board

    2. BOARD_CONFIG=1 - CN9130 SOM based on Clearfog Base

    3. BOARD_CONFIG=2 - CN9130 SOM based on Clearfog Pro

...

    1. BOARD_CONFIG=3 - CN9131 based on SolidWan

Note: when defining the BOARD_CONFIG, the runme.sh script defines correct CP_NUM related to the platform.

Code Block
BOARD_CONFIG=<#> ./runme

The script will generate a ready to use images at ROOTDIR/images:

  1. flash_image.bin for SPI

...

  1. *.img for eMMC or

...

Burning on SD Card

...

  1. SD card

...

...

sudo dd if=images/cn9132-cex7_config_0_ubuntu.img of=/dev/sdX status=progress

for burning u-boot image only: 

Code Block
sudo dd if=images/flash-image.bin of=/dev/sdX bs=512 seek=4096 status=progress

Boot Select

Before powering up the board  for the first time it is recommended to select the boot media. In order to configure the boot media:

1. CN9130 SOM base on ClearFog Base / Pro:

 

SW1 #1

SW1 #2

SW1 #3

SW1 #4

SW1 #5

SPI

ON

X

OFF

ON

X

SD

OFF

X

ON

OFF

X

eMMC

OFF

X

OFF

ON

X

2.2GHz Core Freq

X

OFF

X

X

X

2GHz Core Freq

X

ON

X

X

X

In Clearfog Pro , the frequency can be reduced to 1.6GHz using SW2

 

SW1 #2

SW2 #5

1.6GHz

OFF

ON

2. CN9132 COM Express Type 7

BOOT MODE

SW1 #1

SW1 #2

SW1 #3

SW1 #4

SW1 #5

SW1 #6

SPI

OFF

ON

ON

OFF

ON

X

SD

ON

OFF

ON

ON

OFF

X

eMMC

ON

OFF

ON

OFF

ON

X

Frequency

SW2 #1

SW2 #1

2.2GHz

ON

OFF

2GHz

OFF

OFF

1.6GHz

OFF

ON

3. CN913x other Platforms (SolidWan and custom platforms)

BOOT MODE

SW1 #1

SW1 #2

SW1 #3

SW1 #4

SW1 #5

SW1 #6

SPI

ON

OFF

ON

X

X

X

SD

OFF

ON

OFF

X

X

X

eMMC

ON

OFF

OFF

X

X

X

2.2GHz Core Freq

X

X

X

OFF

ON

OFF

2GHz Core Freq

X

X

X

OFF

OFF

OFF

1.6GHz

X

X

X

OFF

OFF

ON

DDR Configuration and EEPROM

The atf dram_port.c supports both CN9132 CEx7 SO-DIMM with SPD and CN9130 SOM with DDRs soldered on board which might have various configurations and are set according to boot straps MPPs[11:10]. In order to differentiate, it checks the first 196 Bytes of the EEPROM. If programming data on the EEPROM (address 0x53) is requiered, and is not related to the DDR configuration, it must be after the first 196 Bytes. Otherwise, the boot sequence will be corrupted.

Deploy

In u-boot prompt, to continue booting from SD card:

 

  1. CN9130 SOM

Code Block
setenv get_images "load mmc 1:1 $kernel_addr_r boot/Image; load mmc 1:1 $fdt_addr_r boot/cn9130-cf-pro.dtb; setenv root 'root=/dev/mmcblk1p1 rootwait rw'; setenv ramdisk_addr_r -"

2. CN9132 CEx7

Code Block
setenv get_images "load mmc 1:1 $kernel_addr_r boot/Image; load mmc 1:1 $fdt_addr_r boot/cn9132-cex7.dtb; setenv root 'root=/dev/mmcblk1p1 rootwait rw'; setenv ramdisk_addr_r -"
boot

To active the fan on CN9132 CEx7 run;

...

...

Burning on SD Card

For SD card bootable images:
Plug in a micro SD into your machine and run the following, where sdX is the location of the SD card got probed into your machine -

Code Block
sudo dd if=$ROOTDIR/images/<image name>.img of=/dev/sdX status=progress; sync

for burning u-boot image only: 

Code Block
sudo dd if=$ROOTDIR/images/flash-image.bin of=/dev/sdX bs=512 seek=4096 status=progress; sync

Deploy

Distro boot checks if the SOM’s EEPROM is configured and searches for the SKU. Based on the relevant SKU, it takes the relevant DTB for the platform.

For EEPROM configuration, refer to: https://github.com/SolidRun/Documentation/blob/bsp/cn913x/tlv-eeprom.md

Defalt DTB is based on Clearfog-Pro platfrom

In case EEPROM is not burnt, to continue booting, set environment in u-boot prompt:

Code Block
setenv fdtfile marvell/<dtb file name>.dtb
saveenv
boot