Difference between revisions of "Rockusb"
Line 3: | Line 3: | ||
Rockusb is a vendor specific USB class from Rockchip, which is for firmware dowmload for Rockchip SoCs. | Rockusb is a vendor specific USB class from Rockchip, which is for firmware dowmload for Rockchip SoCs. | ||
+ | |||
= Get into Rockusb = | = Get into Rockusb = | ||
Line 9: | Line 10: | ||
*maskrom mode, no firmware found on chip, target run maskrom rockusb driver; | *maskrom mode, no firmware found on chip, target run maskrom rockusb driver; | ||
− | * | + | *miniLoader rockusb mode, target run miniloader rockusb driver. |
+ | *uboot rockusb mode, WIP, only available in Rockchip legacy version U-Boot. | ||
+ | | ||
== Maskrom mode == | == Maskrom mode == | ||
− | If there is no firmware found on board, the SoC will run Rockusb driver automatically, we call it Bootrom mode or Maskrom mode. | + | If there is no bootable firmware found on board, the SoC will run Rockusb driver automatically, we call it Bootrom mode or Maskrom mode. |
If firmware is at somewhere of the board, in order to get into this mode, we can do something to prevent cpu read the firmware successful: | If firmware is at somewhere of the board, in order to get into this mode, we can do something to prevent cpu read the firmware successful: | ||
Line 22: | Line 25: | ||
*for NAND, short the data line or clock line; | *for NAND, short the data line or clock line; | ||
*for SPI, short the spi signal to GND; | *for SPI, short the spi signal to GND; | ||
+ | *By "reboot bootrom" command in U-Boot and Kernel, WIP. | ||
In Maskrom mode, the DRAM is not available, so the download size is limit by the internal memory size. | In Maskrom mode, the DRAM is not available, so the download size is limit by the internal memory size. | ||
− | Use db command in rkdeveloptool, system will init the DRAM and run into usbplug(with rockusb driver) which have no size limitation in download size. | + | Use db command in rkdeveloptool, system will init the DRAM and run into usbplug(with rockusb driver) mode which have no size limitation in download size. |
− | |||
+ | | ||
== Miniloader Rockusb mode == | == Miniloader Rockusb mode == |
Revision as of 11:06, 19 April 2017
Contents
Introduce
Rockusb is a vendor specific USB class from Rockchip, which is for firmware dowmload for Rockchip SoCs.
Get into Rockusb
There are two cases for Rockchip SoCs to get into Rockusb.
- maskrom mode, no firmware found on chip, target run maskrom rockusb driver;
- miniLoader rockusb mode, target run miniloader rockusb driver.
- uboot rockusb mode, WIP, only available in Rockchip legacy version U-Boot.
Maskrom mode
If there is no bootable firmware found on board, the SoC will run Rockusb driver automatically, we call it Bootrom mode or Maskrom mode.
If firmware is at somewhere of the board, in order to get into this mode, we can do something to prevent cpu read the firmware successful:
- for sd-card, unplug the sd-card;
- for eMMC, short the eMMC clock to GND;
- for NAND, short the data line or clock line;
- for SPI, short the spi signal to GND;
- By "reboot bootrom" command in U-Boot and Kernel, WIP.
In Maskrom mode, the DRAM is not available, so the download size is limit by the internal memory size.
Use db command in rkdeveloptool, system will init the DRAM and run into usbplug(with rockusb driver) mode which have no size limitation in download size.
Miniloader Rockusb mode
The miniloader has Rockusb driver inside, system will run rockusb driver after power on if:
- there is no next stage firmware found.
- run "reboot loader" command in kernel.
NOTE: In this miniloader rockusb, the offset for rkdeveloptolol is not the phisical addresss,
the phisical offset 0~0x2000 is no able to write by wl command;
The phisical addres of offset in wl command is the offset plus 0x2000, eg:
"rkdeveloptool wl 0x2000 uboot.img" will write uboot.img to emmc 0x4000 address.
Rockusb driver support in U-Boot is WIP, if done, we can also enter bootloader mode with U-Boot.
Usbplug mode
The usbplug is a firmware used for USB download with rkdeveloptool db command, with rockusb driver inside, the DRAM already initialized in this mode.
USB ID
Rockchip Vendor ID is 0x2207, and the product ID for different SoCs are different.
Rockusb product ID:
- RK3288: 0x320a
- RK3328: 0x320c
- RK3399: 0x330c
Please use lsusb command in Linux PC to check if there is a Rockusb device connect.
Firmware download
rkdeveloptool is the tool to do the firmware upgrade for Rockchip SoCs which is using Rockusb protocol via USB.
Please follow the steps for boot from eMMC for how to use the tool.