xref: /rk3399_rockchip-uboot/doc/README.rockusb (revision 8a3fd8428ed691fa47354b661fde0c468e69c059)
1*8a3fd842SEddie CaiRockusb (Rockchip USB protocol)
2*8a3fd842SEddie Cai=====================================================
3*8a3fd842SEddie Cai
4*8a3fd842SEddie CaiOverview
5*8a3fd842SEddie Cai--------
6*8a3fd842SEddie Cai
7*8a3fd842SEddie CaiRockusb protocol is widely used by Rockchip SoC based devices. It can
8*8a3fd842SEddie Cairead/write info, image to/from devices. This document briefly describes how to
9*8a3fd842SEddie Caiuse Rockusb for upgrading firmware (e.g. kernel, u-boot, rootfs, etc.).
10*8a3fd842SEddie Cai
11*8a3fd842SEddie CaiTools
12*8a3fd842SEddie Cai--------
13*8a3fd842SEddie CaiThere are many tools can support Rockusb protocol. rkdeveloptool
14*8a3fd842SEddie Cai(https://github.com/rockchip-linux/rkdeveloptool) is open source,
15*8a3fd842SEddie CaiIt is maintained by Rockchip. People don't want to build from source
16*8a3fd842SEddie Caican download from here
17*8a3fd842SEddie Cai(https://github.com/rockchip-linux/rkbin/blob/master/tools/rkdeveloptool)
18*8a3fd842SEddie Cai
19*8a3fd842SEddie CaiUsage
20*8a3fd842SEddie Cai--------
21*8a3fd842SEddie CaiThe Usage of Rockusb command is:
22*8a3fd842SEddie Cai
23*8a3fd842SEddie Cairockusb <USB_controller> <devtype> <dev[:part]>
24*8a3fd842SEddie Cai
25*8a3fd842SEddie Caie.g. rockusb 0 mmc 0
26*8a3fd842SEddie Cai
27*8a3fd842SEddie CaiOn your U-Boot console, type this command to enter rockusb mode.
28*8a3fd842SEddie CaiOn your host PC. use lsusb command. you should see a usb device
29*8a3fd842SEddie Caiusing 0x2207 as its USB verdor id.
30*8a3fd842SEddie Cai
31*8a3fd842SEddie Caifor more detail about the rkdeveloptool. please read the usage.
32*8a3fd842SEddie Cai
33*8a3fd842SEddie Cairkdeveloptool -h
34*8a3fd842SEddie Cai
35*8a3fd842SEddie Caiuse rkdeveloptool wl command to write lba. BeginSec is the lba on device
36*8a3fd842SEddie Caiyou want to write.
37*8a3fd842SEddie Cai
38*8a3fd842SEddie Caisudo rkdeveloptool wl  <BeginSec> <File>
39*8a3fd842SEddie Cai
40*8a3fd842SEddie Caito flash U-Boot image use below command. U-Boot binary is made by mkimage.
41*8a3fd842SEddie Caisee doc/README.rockchip for more detail about how to get U-Boot binary.
42*8a3fd842SEddie Cai
43*8a3fd842SEddie Caisudo rkdeveloptool wl  64 <U-Boot binary>
44*8a3fd842SEddie Cai
45*8a3fd842SEddie CaiThere are plenty of Rockusb command. but wl(write lba) and
46*8a3fd842SEddie Caird(reboot) command. These two command can let people flash
47*8a3fd842SEddie Caiimage to device.
48*8a3fd842SEddie Cai
49*8a3fd842SEddie CaiTo do
50*8a3fd842SEddie Cai-----
51*8a3fd842SEddie Cai* Fully support Rockusb protocol
52