From: Johan Jonker Date: Wed, 18 Oct 2023 14:02:19 +0000 (+0200) Subject: rockchip: doc: add rkmtd.rst X-Git-Url: http://git.dujemihanovic.xyz/html/static/git-favicon.png?a=commitdiff_plain;h=73e1f877ce74078f9517ab24c5989fb9adf987d6;p=u-boot.git rockchip: doc: add rkmtd.rst Add documention for Rockchip rkmtd virtual block device. Signed-off-by: Johan Jonker Reviewed-by: Kever Yang Reviewed-by: Simon Glass --- diff --git a/doc/board/rockchip/index.rst b/doc/board/rockchip/index.rst index 0c377e9bbb..9a87a035e9 100644 --- a/doc/board/rockchip/index.rst +++ b/doc/board/rockchip/index.rst @@ -8,3 +8,4 @@ Rockchip :maxdepth: 2 rockchip + rkmtd diff --git a/doc/board/rockchip/rkmtd.rst b/doc/board/rockchip/rkmtd.rst new file mode 100644 index 0000000000..1481380ba6 --- /dev/null +++ b/doc/board/rockchip/rkmtd.rst @@ -0,0 +1,105 @@ +.. SPDX-License-Identifier: GPL-2.0+ +.. Copyright (C) 2023 Johan Jonker + +RKMTD +===== + +Info +---- + +The command rkmtd creates a virtual block device to transfer +Rockchip boot block data to and from NAND with block orientated +tools like "ums" and "rockusb". + +It uses the Rockchip MTD driver to scan for boot blocks and copies +data from the first block in a GPT formatted virtual disk. +Data must be written in U-boot "idbloader.img" format and start at +partition "loader1" offset 64. The data header is parsed +for length and offset. When the last sector is received +it erases up to 5 erase blocks on NAND and writes boot blocks +in a pattern depending on the NAND ID. Data is then verified. +When a block turns out bad the block header is discarded. + +Limitations +----------- + +- Support with CONFIG_ROCKCHIP_NAND MTD driver only. +- Support for Rockchip boot block header type 1 only. +- Pattern for listed NAND IDs only. (Logic still not disclosed by Rockchip) +- The MTD framework driver data and NAND ID must be extracted at a lower level. + +Available rkmtd commands +------------------------ + +.. code-block:: bash + + rkmtd bind