From patchwork Fri Feb 26 10:01:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jaehoon Chung X-Patchwork-Id: 1444886 X-Patchwork-Delegate: xypron.glpk@gmx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=samsung.com header.i=@samsung.com header.a=rsa-sha256 header.s=mail20170921 header.b=mC0Sdi3r; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Dn4tS3HJpz9sCD for ; Fri, 26 Feb 2021 21:01:20 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9789D81FFE; Fri, 26 Feb 2021 11:01:11 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=samsung.com header.i=@samsung.com header.b="mC0Sdi3r"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4F9458201A; Fri, 26 Feb 2021 11:01:10 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mailout4.samsung.com (mailout4.samsung.com [203.254.224.34]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 99F7681F66 for ; Fri, 26 Feb 2021 11:01:05 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=jh80.chung@samsung.com Received: from epcas1p2.samsung.com (unknown [182.195.41.46]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20210226100102epoutp04b5cb00484f68e9551522920e25e6b9fc~nQ_nRgfDi2711927119epoutp04b for ; Fri, 26 Feb 2021 10:01:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20210226100102epoutp04b5cb00484f68e9551522920e25e6b9fc~nQ_nRgfDi2711927119epoutp04b DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1614333662; bh=RwMQllomu4Vk1GjVBxG5au/6UVYIqKmZPD+nMPgJ4ug=; h=From:To:Cc:Subject:Date:References:From; b=mC0Sdi3rAn9Hc6bG5i7z5EzwirxelKtndta2/1KhidvXURLgZyPuozocAmiGshiWa wBOJGTYkdSZkWGqqrLvuTbJeFcmXZrYbcwNtLHEmDfEs/V7p9zWDcgKW3xGoPWvNi8 R1Hk9M+15dOrff658p6oc7DGo0FrErp47uc9e254= Received: from epsnrtp2.localdomain (unknown [182.195.42.163]) by epcas1p3.samsung.com (KnoxPortal) with ESMTP id 20210226100102epcas1p395066ab5d8b4fcb80dccc4617bbf9208~nQ_msDZ1b0596805968epcas1p3d; Fri, 26 Feb 2021 10:01:02 +0000 (GMT) Received: from epsmges1p3.samsung.com (unknown [182.195.40.154]) by epsnrtp2.localdomain (Postfix) with ESMTP id 4Dn4t41T1Zz4x9Px; Fri, 26 Feb 2021 10:01:00 +0000 (GMT) Received: from epcas1p3.samsung.com ( [182.195.41.47]) by epsmges1p3.samsung.com (Symantec Messaging Gateway) with SMTP id E0.A0.09582.BD6C8306; Fri, 26 Feb 2021 19:00:59 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas1p3.samsung.com (KnoxPortal) with ESMTPA id 20210226100058epcas1p3b2ed1a20412b147ed66bd92c367f46c3~nQ_jMpBV80596805968epcas1p3J; Fri, 26 Feb 2021 10:00:58 +0000 (GMT) Received: from epsmgms1p2.samsung.com (unknown [182.195.42.42]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20210226100058epsmtrp19f54d8ce7e85331940b853d7410340b3~nQ_jL7KsS2512725127epsmtrp1V; Fri, 26 Feb 2021 10:00:58 +0000 (GMT) X-AuditID: b6c32a37-8afff7000000256e-c8-6038c6dbd852 Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p2.samsung.com (Symantec Messaging Gateway) with SMTP id 50.C0.08745.AD6C8306; Fri, 26 Feb 2021 19:00:58 +0900 (KST) Received: from jaehoon-DeskTop.10.32.193.11 (unknown [10.113.113.235]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20210226100058epsmtip16545380fd91572cf73cd2db5f50b42f4~nQ_jBiF_V0598005980epsmtip1N; Fri, 26 Feb 2021 10:00:58 +0000 (GMT) From: Jaehoon Chung To: u-boot@lists.denx.de Cc: xypron.glpk@gmx.de, sjg@chromium.org, Jaehoon Chung Subject: [RFC PATCH] doc: mmc man-page Date: Fri, 26 Feb 2021 19:01:37 +0900 Message-Id: <20210226100137.25400-1-jh80.chung@samsung.com> X-Mailer: git-send-email 2.29.0 MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrLKsWRmVeSWpSXmKPExsWy7bCmvu7tYxYJBifvalrc+NXGavFtyzZG i7d7O9ktDk/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anvOTeZVl/aYJpYmbPQ/HFSizFGYmGWsxFxYkAZdurvAAEAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprFLMWRmVeSWpSXmKPExsWy7bCSnO6tYxYJBtNmyFnc+NXGavFtyzZG i7d7O9ktDk/9wOjA4jG74SKLx4ePcR5n7+xg9OjbsooxgCWKyyYlNSezLLVI3y6BK2PrpMts BY9UK+729rI1MP6X6mLk5JAQMJG4vbGTvYuRi0NIYAejxOLZu1ghElISn59OZeti5ACyhSUO Hy6GqPnJKLFs6l9GkBo2AR2J7d+OM4HYIgISEr/6r4LFmQVCJBYdXcYOYgsLqEnM3n4MrIZF QFXi7MJusBpeAWuJCRsmMELskpf4c7+HGSIuKHFy5hMWiDnyEs1bZzNPYOSbhSQ1C0lqASPT KkbJ1ILi3PTcYsMCo7zUcr3ixNzi0rx0veT83E2M4ODT0trBuGfVB71DjEwcjIcYJTiYlUR4 N/8zTRDiTUmsrEotyo8vKs1JLT7EKM3BoiTOe6HrZLyQQHpiSWp2ampBahFMlomDU6qBKSXz F1eRq+mj2Gbn6xy6hQuTc5yXRuefWrwiqtroouo0a1Gv/Avzu/+JTmK7XvHphtn9358mrly4 6sL8B7k/GO7bnIqXzg+wubJv0brXN27cN1vupDndZ+nTuMfWCsnvPJt0OiU5Zz7WejrF8/I/ U5ewHx9tD5dLXWicY9mTv2rfE4mjDa+192fu6T14evURbce9D9e9jDPYI/Thyl2tR8cumGxN nlYdMtd/db6nQfzByq1SJ3jDDx57Vmxr2h/8NLNYpWBVUm5ta6r26SnPFk5fNFtPY3+V28lt LmedRCQ0DFTvx2y9rWl6vf3V79COoLl25WVNkkb5sZG5AdM+/uNcpVn01ofP0zBM+pmkvBJL cUaioRZzUXEiABAylyutAgAA X-CMS-MailID: 20210226100058epcas1p3b2ed1a20412b147ed66bd92c367f46c3 X-Msg-Generator: CA X-Sendblock-Type: SVC_REQ_APPROVE CMS-TYPE: 101P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20210226100058epcas1p3b2ed1a20412b147ed66bd92c367f46c3 References: X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.4 at phobos.denx.de X-Virus-Status: Clean Provide a man-pages for the mmc command. Signed-off-by: Jaehoon Chung --- doc/usage/mmc.rst | 149 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 149 insertions(+) create mode 100644 doc/usage/mmc.rst diff --git a/doc/usage/mmc.rst b/doc/usage/mmc.rst new file mode 100644 index 000000000000..30fee447d409 --- /dev/null +++ b/doc/usage/mmc.rst @@ -0,0 +1,149 @@ +.. SPDX-License-Identifier: GPL-2.0+: + +mmc command +============ + +Synopsis +-------- + +:: + + mmc info + mmc read addr blk# cnt + mmc write addr blk# cnt + mmc erase blk# cnt + mmc rescan + mmc part + mmc dev [dev] [part] + mmc list + mmc wp + mmc bootbus + mmc bootpart-resize + mmc partconf [boot_ack boot_partition partition_access] + mmc rst-function + +Description +----------- + +The mmc command is used to control MMC(eMMC/SD) device + +The *mmc info* displays information (Manufacturer ID, OEM, Name, Bus Speed, Mode, ...) of MMC device + +The *mmc read* command reads raw data to memory address from MMC device with block offset and count + +The *mmc write* write raw data to MMC device from memory address with block offset and count + addr - memory address + + blk# - start block offset + + cnt - block count + +The *mmc erase* erases MMC device from block offset until count + blk# - start block offset + + cnt - block count + +The *mmc rescan* scans the available MMC device + +The *mmc part* displays the list available partition on current mmc device + +The *mmc dev* show or set current mmc device + [dev] + device number to change + [part] + partition number to change + +The *mmc list* displays the list avaiable devices + +The *mmc wp* enables "power on write protect" function about boot partitions + +The *mmc bootbus* sets the BOOT_BUS_WIDTH feild + BOOTU_BUS_WIDTH[177] is one of EXT_CSD register. (*Refer to eMMC specification*) + +The *mmc-bootpart-resize* changes sizes of boot and RPMB partition + dev - device number + + boot part size MB - Size to change boot partition + + RPMB part size MB - Size to chagne RPMB partition + +The *mmc rst-function* change the RST_n_FUNCTION filed + **WARNING**: This is a write-once filed. (*Refer to eMMC specification*) + +Example +------- + +The *mmc info* command displays device's capabilities: +:: + + => mmc info + Device: EXYNOS DWMMC + Manufacturer ID: 45 + OEM: 100 + Name: SDW16 + Bus Speed: 52000000 + Mode: MMC DDR52 (52MHz) + Rd Block Len: 512 + MMC version 5.0 + High Capacity: Yes + Capacity: 14.7 GiB + Bus Width: 8-bit DDR + Erase Group Size: 512 KiB + HC WP Group Size: 8 MiB + User Capacity: 14.7 GiB WRREL + Boot Capacity: 4 MiB ENH + RPMB Capacity: 4 MiB ENH + Boot area 0 is not write protected + Boot area 1 is not write protected + +The raw data can be read/written via *mmc read/write* command: +:: + + => mmc read 0x40000000 0x5000 0x100 + MMC read: dev # 0, block # 20480, count 256 ... 256 blocks read: OK + + => mmc write 0x40000000 0x5000 0x10 + MMC write: dev # 0, block # 20480, count 256 ... 256 blocks written: OK + +The partition list can be shown via *mmc part* command: +:: + + => mmc part + Partition Map for MMC device 0 -- Partition Type: DOS + + Part Start Sector Num Sectors UUID Type + 1 8192 131072 dff8751a-01 0e Boot + 2 139264 6291456 dff8751a-02 83 + 3 6430720 1048576 dff8751a-03 83 + 4 7479296 23298048 dff8751a-04 05 Extd + 5 7481344 307200 dff8751a-05 83 + 6 7790592 65536 dff8751a-06 83 + 7 7858176 16384 dff8751a-07 83 + 8 7876608 22900736 dff8751a-08 83 + +The current device can be shown or set via *mmc dev* command: +:: + + => mmc dev + switch to partitions #0, OK + mmc0(part0) is current device + => mmc dev 2 0 + switch to partitions #0, OK + mmc2 is current device + +The list of available devices can be shown via *mmc list* command: +:: + + => mmc list + mmc list + EXYNOS DWMMC: 0 (eMMC) + EXYNOS DWMMC: 2 (SD) + +Configuration +------------- + +The mmc command is only avaialble if CONFIG_CMD_MMC=y. +Some commands need to enable more configuration. + +* write / erase - CONFIG_MMC_WRITE +* bootbus - CONFIG_SUPPORT_EMMC_BOOT=y