xref: /openbmc/u-boot/doc/README.rockusb (revision cdec3ea7e4b80856718a019251d4df7d0db142d0)
11c977772SEddie CaiRockusb (Rockchip USB protocol)
21c977772SEddie Cai=====================================================
31c977772SEddie Cai
41c977772SEddie CaiOverview
51c977772SEddie Cai--------
61c977772SEddie Cai
71c977772SEddie CaiRockusb protocol is widely used by Rockchip SoC based devices. It can
81c977772SEddie Cairead/write info, image to/from devices. This document briefly describes how to
91c977772SEddie Caiuse Rockusb for upgrading firmware (e.g. kernel, u-boot, rootfs, etc.).
101c977772SEddie Cai
111c977772SEddie CaiTools
121c977772SEddie Cai--------
131c977772SEddie CaiThere are many tools can support Rockusb protocol. rkdeveloptool
141c977772SEddie Cai(https://github.com/rockchip-linux/rkdeveloptool) is open source,
151c977772SEddie CaiIt is maintained by Rockchip. People don't want to build from source
161c977772SEddie Caican download from here
171c977772SEddie Cai(https://github.com/rockchip-linux/rkbin/blob/master/tools/rkdeveloptool)
181c977772SEddie Cai
191c977772SEddie CaiUsage
201c977772SEddie Cai--------
211c977772SEddie CaiThe Usage of Rockusb command is:
221c977772SEddie Cai
231c977772SEddie Cairockusb <USB_controller> <devtype> <dev[:part]>
241c977772SEddie Cai
251c977772SEddie Caie.g. rockusb 0 mmc 0
261c977772SEddie Cai
271c977772SEddie CaiOn your U-Boot console, type this command to enter rockusb mode.
281c977772SEddie CaiOn your host PC. use lsusb command. you should see a usb device
291c977772SEddie Caiusing 0x2207 as its USB verdor id.
301c977772SEddie Cai
311c977772SEddie Caifor more detail about the rkdeveloptool. please read the usage.
321c977772SEddie Cai
331c977772SEddie Cairkdeveloptool -h
341c977772SEddie Cai
351c977772SEddie Caiuse rkdeveloptool wl command to write lba. BeginSec is the lba on device
361c977772SEddie Caiyou want to write.
371c977772SEddie Cai
381c977772SEddie Caisudo rkdeveloptool wl  <BeginSec> <File>
391c977772SEddie Cai
401c977772SEddie Caito flash U-Boot image use below command. U-Boot binary is made by mkimage.
411c977772SEddie Caisee doc/README.rockchip for more detail about how to get U-Boot binary.
421c977772SEddie Cai
431c977772SEddie Caisudo rkdeveloptool wl  64 <U-Boot binary>
441c977772SEddie Cai
45e4b34a76SAlberto PanizzoCurrent set of rkdeveloptool commands supported:
46e4b34a76SAlberto Panizzo- rci: Read Chip Info
47e4b34a76SAlberto Panizzo- rfi: Read Flash Id
48e4b34a76SAlberto Panizzo- rd : Reset Device
49e4b34a76SAlberto Panizzo- td : Test Device Ready
50e11f9166SAlberto Panizzo- rl : Read blocks using LBA
51e4b34a76SAlberto Panizzo- wl : Write blocks using LBA
52*f68c8e82SAlberto Panizzo- wlx: Write partition
531c977772SEddie Cai
541c977772SEddie CaiTo do
551c977772SEddie Cai-----
561c977772SEddie Cai* Fully support Rockusb protocol
57