blob: 66437e17e46bbd61f721c82a5fdfc62e15ece377 [file] [log] [blame]
Eddie Cai1c977772017-12-15 08:17:12 +08001Rockusb (Rockchip USB protocol)
2=====================================================
3
4Overview
5--------
6
7Rockusb protocol is widely used by Rockchip SoC based devices. It can
8read/write info, image to/from devices. This document briefly describes how to
9use Rockusb for upgrading firmware (e.g. kernel, u-boot, rootfs, etc.).
10
11Tools
12--------
13There are many tools can support Rockusb protocol. rkdeveloptool
14(https://github.com/rockchip-linux/rkdeveloptool) is open source,
15It is maintained by Rockchip. People don't want to build from source
16can download from here
17(https://github.com/rockchip-linux/rkbin/blob/master/tools/rkdeveloptool)
18
19Usage
20--------
21The Usage of Rockusb command is:
22
23rockusb <USB_controller> <devtype> <dev[:part]>
24
25e.g. rockusb 0 mmc 0
26
27On your U-Boot console, type this command to enter rockusb mode.
28On your host PC. use lsusb command. you should see a usb device
29using 0x2207 as its USB verdor id.
30
31for more detail about the rkdeveloptool. please read the usage.
32
33rkdeveloptool -h
34
35use rkdeveloptool wl command to write lba. BeginSec is the lba on device
36you want to write.
37
38sudo rkdeveloptool wl <BeginSec> <File>
39
40to flash U-Boot image use below command. U-Boot binary is made by mkimage.
41see doc/README.rockchip for more detail about how to get U-Boot binary.
42
43sudo rkdeveloptool wl 64 <U-Boot binary>
44
Alberto Panizzoe4b34a72018-07-12 13:05:42 +020045Current set of rkdeveloptool commands supported:
46- rci: Read Chip Info
47- rfi: Read Flash Id
48- rd : Reset Device
49- td : Test Device Ready
Alberto Panizzoe11f9162018-07-12 13:05:44 +020050- rl : Read blocks using LBA
Alberto Panizzoe4b34a72018-07-12 13:05:42 +020051- wl : Write blocks using LBA
Alberto Panizzof68c8e82018-07-12 13:05:45 +020052- wlx: Write partition
Eddie Cai1c977772017-12-15 08:17:12 +080053
54To do
55-----
56* Fully support Rockusb protocol