8.1.7. RK3399#

This BSP family supports the following variants:

  • rk3399_rockpro64

This BSP should also support other boards using the RK3399 SoC. Not all supported boards have a dedicated image generated, in most cases it is sufficient to replace u-boot with the correct one.

The BSP is known to run on these boards:

  • PINE64 RockPro64

  • FriendlyELEC ROM-RK3399

The basic hardware initialization is performed by the BSP. The BSP support the GICv3 interrupt controller present in the RK3399 SoC. The device tree is not supported.

8.1.7.1. Booting a RTEMS image on the PINE64 RockPro64 board#

Disable eMMC#

Please refer to the RockPro64 documentation to select the SD card as the boot device.

Boot via U-Boot#

This BSP supports mainline U-Boot. The U-boot version used when testing this BSP was the master branch 141be72e2a9d43aa4e3d1a6a6e0ab8f9eb8784c6.

Booting via Network#

The BSP can be booted via a TFTP server. To do that using an U-Boot console, use the following commands:

setenv ipaddr 192.168.1.2;
setenv serverip 192.168.1.1;
tftpboot ${pxefile_addr_r} rtems-app.exe;
bootelf -s ${pxefile_addr_r};
go 0x00200000;

This is the entire boot sequence:

U-Boot TPL 2026.01-00510-g141be72e2a9d (Jan 09 2026 - 00:32:27)
lpddr4_set_rate: change freq to 400MHz 0, 1
Channel 0: LPDDR4, 400MHz
BW=32 Col=10 Bk=8 CS0 Row=16 CS=1 Die BW=16 Size=2048MB
Channel 1: LPDDR4, 400MHz
BW=32 Col=10 Bk=8 CS0 Row=16 CS=1 Die BW=16 Size=2048MB
256B stride
lpddr4_set_rate: change freq to 800MHz 1, 0
Trying to boot from BOOTROM
Returning to boot ROM...

U-Boot SPL 2026.01-00510-g141be72e2a9d (Jan 09 2026 - 00:32:27 +0800)
Trying to boot from MMC2
## Checking hash(es) for config config-1 ... OK
## Checking hash(es) for Image atf-1 ... sha256+ OK
## Checking hash(es) for Image u-boot ... sha256+ OK
## Checking hash(es) for Image fdt-1 ... sha256+ OK
## Checking hash(es) for Image atf-2 ... sha256+ OK
## Checking hash(es) for Image atf-3 ... sha256+ OK


U-Boot 2026.01-00510-g141be72e2a9d (Jan 09 2026 - 00:32:27 +0800)

SoC: Rockchip rk3399
Reset cause: POR
Model: Pine64 RockPro64 v2.1
DRAM:  4 GiB (total 3.9 GiB)
PMIC:  RK808 
Core:  323 devices, 35 uclasses, devicetree: separate
MMC:   mmc@fe310000: 3, mmc@fe320000: 1, mmc@fe330000: 0
Loading Environment from SPIFlash... jedec_spi_nor flash@0: unrecognized JEDEC id bytes: ff, ff, ff
*** Warning - spi_flash_probe_bus_cs() failed, using default environment

In:    serial,usbkbd
Out:   serial,vidconsole
Err:   serial,vidconsole
Model: Pine64 RockPro64 v2.1
Net:   eth0: ethernet@fe300000

Hit any key to stop autoboot: 0
=> setenv ipaddr 192.168.1.2;
=> setenv serverip 192.168.1.1;
=> tftpboot ${pxefile_addr_r} ticker.exe; 
Speed: 1000, full duplex
Using ethernet@fe300000 device
TFTP from server 192.168.1.1; our IP address is 192.168.1.2
Filename 'hello.exe'.
Load address: 0xe00000
Loading: #################################################################
         #############################################################
         8.4 MiB/s
done
Bytes transferred = 1847576 (1c3118 hex)
=> bootelf -s ${pxefile_addr_r};
=> go 0x00200000;
## Starting application at 0x00200000 ...


*** BEGIN OF TEST CLOCK TICK ***
*** TEST VERSION: 7.0.0.7b7d56b6aa747e26ad0142ca23ae96e3c3d5da07
*** TEST STATE: EXPECTED_PASS
*** TEST BUILD:
*** TEST TOOLS: 15.2.0 20250808 (RTEMS 7, RSB 3546aa1e5662aa475bc0521ad2d1c66c39fe47ec, Newlib 038afec1)
TA1  - rtems_clock_get_tod - 09:00:00   12/31/1988
TA2  - rtems_clock_get_tod - 09:00:00   12/31/1988
TA3  - rtems_clock_get_tod - 09:00:00   12/31/1988
TA1  - rtems_clock_get_tod - 09:00:04   12/31/1988
TA2  - rtems_clock_get_tod - 09:00:09   12/31/1988
TA1  - rtems_clock_get_tod - 09:00:09   12/31/1988
TA3  - rtems_clock_get_tod - 09:00:14   12/31/1988
TA1  - rtems_clock_get_tod - 09:00:14   12/31/1988
TA2  - rtems_clock_get_tod - 09:00:19   12/31/1988
TA1  - rtems_clock_get_tod - 09:00:19   12/31/1988
TA1  - rtems_clock_get_tod - 09:00:24   12/31/1988
TA3  - rtems_clock_get_tod - 09:00:29   12/31/1988
TA2  - rtems_clock_get_tod - 09:00:29   12/31/1988
TA1  - rtems_clock_get_tod - 09:00:29   12/31/1988
TA1  - rtems_clock_get_tod - 09:00:34   12/31/1988

*** END OF TEST CLOCK TICK ***


[ RTEMS shutdown ]

8.1.7.2. Clock Driver#

The clock driver uses the ARM Generic Timer.

8.1.7.3. Console Driver#

The console driver supports the on-chip NS16550 compatible UARTs. Only UART2 is supported.