It should be marked sense_data error when r/w vendor storage failed.
Change-Id: I7e298d4f700ac3ca9648e973258cff521c41ec03
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Extract keymaster CA module from OpteeClientInterface
refactoring code for keymaster reads and writes form caller module
Change-Id: I1069fce0d29d9d9815f71e7f3b4d231754382acd
Signed-off-by: Jian Qiu <qiujian@rock-chips.com>
This patch implements the Binary Device Object Store (BOS)
Descriptor for SuperSpeed. It also add SuperSpeed Endpoint
Descriptors for fastboot and rockusb gadget.
Change-Id: I7d858e1b5117d403919f5fdacb40072a5fad336f
Signed-off-by: William Wu <william.wu@rock-chips.com>
invoke function:
write_keybox_to_secure_storage(uint8_t *uboot_data, uint32_t len).
it only work when the chip support OPTEE_V1
Change-Id: If010b7cab6bab87485d9542af8c04544d27162cc
Signed-off-by: tony.xu <tony.xu@rock-chips.com>
At present the vendor storage partition is small than 64K in the
design, so vendor storage r/w commands do not take multi-packet
into consideration, if it is needed, the codes should do a little
change in future. Besides, the RPMB r/w support need to be added
when its APIs get ready.
Change-Id: I621604c99b44c69eb3aff3e01b28a18f35303040
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
The definition of cmnd[7] is different for different cmd, so
we can not use the fixup for all cmd.
Change-Id: I0020de4974ecca6075e0512456787089139a67fd
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Update data size for get_flash_id() and do_bad_block_test() so that
legacy tool can till work;
Add warning log for those not supported cmds from legacy tool;
Change-Id: I40e7f5d82a138bef6f8b0cef237c04483e663931
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Legacy upgrade tool may not set correct transfer size for cmds,
and for get flash info there no size in cmnd[7], fix it.
Change-Id: I4060d72bb1f814903ed3c5b6b13689609dc905c8
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Using Google's VID and PID default for fastboot command.
Change-Id: I8deb275f0f6a925b8e0b9668b6ba59abd44b74a5
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
This change adds getting chip-info command support for rockusb.
Change-Id: Ie158c94eb0591e658947f3b0c47f4fc0ec0333d1
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Follow the subcode in reset command and add resetting to maskrom support.
Change-Id: I15bedef6b83b7282f3e1a9ff3663ec56cd3affc8
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Add more flash type support for rockusb command.
Change-Id: I8f2a2f6b5d1c3c5fb8824ce726cc3f0b6443d8ef
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Correct the current capacity to support the different storage
devices upgrade.
Change-Id: I2c96183f317f42944887d02af097ff8a8d29cd4e
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
This change amend USB VID & PID to Rockchip for rockusb.
Change-Id: I3c94e442cc0190d2d3f13424470dd2d84af55eb0
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
This patch add a new rockusb gadget driver function.
For the design, simply embeding rockusb code into USB Mass Storage
function as using UMS framework can prominently improve upgrade speed
and devices stability.
This change does not affect the original USB Mass Storage function,
the rockusb process are just checked by IS_RKUSB_UMS_DNL macro which
only run when CONFIG_CMD_ROCKUSB was defined and rkusb_ums_dnl
composite driver was registed.
Change-Id: I9c2723200c7e02d947587037abcd7d3badf4256c
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Instead of using fastboot framework it is better to use ums framework
to improve firmware upgrade speed. Will add a new rockusb driver next.
This reverts commit c7cd0ba("usb: rockchip: add the rockusb gadget").
Change-Id: Ie578ee94e247780d6f9b56156b0ccf737fa18cb9
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
this patch implement rockusb protocol on the device side. this is based on USB
download gadget infrastructure. the rockusb function implements the rd, wl, rid
commands. it can work with rkdeveloptool
Signed-off-by: Eddie Cai <eddie.cai.linux@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Changes in v7:
-none
Changes in v6:
-move some data to f_rockusb structure
Changes in v5:
-fix build error when build non-rockchip board
-fix checkpatch error
Changes in v4:
-use enum instead of macro define
-move some structure define and macro to f_rockusb.h
-add some function comment as Simon required
-address other comment from Simon
-fix build error as Lukasz point out
Changes in v3:
-split the macro to f_rockusb.h
-use ALLOC_CACHE_ALIGN_BUFFER to define cache safe struct inside the function.
-fix checkpatch error