From patchwork Fri Jul 24 10:51:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 11682981 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8C5BB138A for ; Fri, 24 Jul 2020 10:53:30 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2F1FC2073E for ; Fri, 24 Jul 2020 10:53:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="yRQn8Kf/"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b="mjMEsUJ1" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2F1FC2073E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=NmRTZS7kM79c7ZtQMWrQvJ6HvYB62j1GTsmyiu4NwV4=; b=yRQn8Kf/WHnS9WjtP/IfI8dM/ Bj28LAeFYX4tH2IYKHLSsxfEnkFztKOOdCcOTqAiMPKsCbHz5oAyBBqw2JIilrW/wZH+93Cgc0zx6 XgyrfapXhfHkQfZNBmvJ4otUBx3CLwd+sAhC6V+IJd1nNUhTxGKXJ1OxClS0oycj6czpQtXsl7+kI KGbL7cvQ+mVRHtwRcB1C2XSAGuf6DOfJHs6zQdqhf8aGMQl45jjAHVYwuJXsvRSD7k/7NPa1TRaNa hEL8I9qOMjtwaXPkBYmxfyqdzkdxNVq827JkwWpyMxeiewxrRX7XlGe4YNhQsVtqNdIACgYyzQJTQ kUwyizXBg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jyvKP-0004Ik-Dd; Fri, 24 Jul 2020 10:53:25 +0000 Received: from mail-pf1-x441.google.com ([2607:f8b0:4864:20::441]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jyvIz-0003Xv-5T for linux-rockchip@lists.infradead.org; Fri, 24 Jul 2020 10:52:06 +0000 Received: by mail-pf1-x441.google.com with SMTP id u185so4910067pfu.1 for ; Fri, 24 Jul 2020 03:51:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=sk5ZJKxKyssjzqNzAnZ/okb3UqvqoYsHK8ZxNdUNWZY=; b=mjMEsUJ1wJq1tgzpCjW4nGhLBpCF33MqDoJVyJXeknmVHgCkrniYTYEHqaZ2ywqkuL vxIdsc0wvSkN4xWGmciKsJ1Fv9826M5b+zIyMsI9YjmAQMaI1c4P4q5MxS5Tds40IbVg josgzDD0cNQ3RoxDiXjmUtAUYLXV4ncZvD19M= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=sk5ZJKxKyssjzqNzAnZ/okb3UqvqoYsHK8ZxNdUNWZY=; b=m4pjLouoHuyJTsGckBYgUgoqcWQheqiPqMNAUMOJ7OBsNk7a0gUxpfKBe+1bOhYE+z Wjouf2FuNF3go2M+VJzDBTfdJbz0JmcH43DhO7dFKM3enTN5MT+12g6ONlKPrHZuH53R D1W3i5TxPOqXws6IBDJX2Qv8lywuqdtglYCtMDk1Fgv0/w4u7eI7Ym3AGmcoVkbEoKGx MZ9EJYsyzJROMTmPFNGlJxJbiFN3xdF83WnASrpwrorTAY1lRWcXCdPLJSrQgcEYfef4 106nLHYY5aw1yoGTyVyx4hrWGrvYpb5Q9jML74DHA/fjGQDxz7/Fou5usU7IUriKXy7G jLQA== X-Gm-Message-State: AOAM533rZxSYC7T5z2yvE8wT0YStls+/Y/J960kdf7DHhLInLW/FRghL pSrKGmYBSt50NJbMbjrAn3Yqtw== X-Google-Smtp-Source: ABdhPJyOvTTfc+mE4ib7RFEuWdViGN4KSKaRGWhA4V4ChS6Deg+wwUROYTtZa1zItdm9vMccOWYq4A== X-Received: by 2002:a62:15d1:: with SMTP id 200mr7989200pfv.227.1595587914641; Fri, 24 Jul 2020 03:51:54 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c809:c7d5:cd2a:efcb:83c4:4e50]) by smtp.gmail.com with ESMTPSA id g22sm5595498pgb.82.2020.07.24.03.51.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jul 2020 03:51:53 -0700 (PDT) From: Jagan Teki To: Kever Yang , Philipp Tomsich , Simon Glass Subject: [PATCH 7/7] doc: rockchip: Document Rockchip miniloader flashing Date: Fri, 24 Jul 2020 16:21:19 +0530 Message-Id: <20200724105119.13123-8-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200724105119.13123-1-jagan@amarulasolutions.com> References: <20200724105119.13123-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200724_065157_499177_FAC0A43F X-CRM114-Status: UNSURE ( 9.96 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:441 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: U-Boot-Denx , linux-rockchip@lists.infradead.org, linux-amarula , Jagan Teki , Suniel Mahesh Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org This would be useful and recommended boot flow for new boards which has doesn't have the DDR support yet in mainline. Sometimes it is very useful for debugging mainline DDR support. Documen it for px30 boot flow. Signed-off-by: Jagan Teki --- doc/board/rockchip/rockchip.rst | 40 ++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/doc/board/rockchip/rockchip.rst b/doc/board/rockchip/rockchip.rst index 8c92de0c92..ea061ad171 100644 --- a/doc/board/rockchip/rockchip.rst +++ b/doc/board/rockchip/rockchip.rst @@ -123,6 +123,9 @@ To build rk3399 boards:: Flashing -------- +1. Package the image with U-Boot TPL/SPL +----------------------------------------- + SD Card ^^^^^^^ @@ -187,6 +190,39 @@ Copy SPI boot images into SD card and boot from SD:: sf erase 0x60000 +$filesize sf write $kernel_addr_r 0x60000 ${filesize} +2. Package the image with Rockchip miniloader +--------------------------------------------- + +Image package with Rockchip miniloader requires robin [1]. + +Create idbloader.img + +.. code-block:: none + + cd u-boot + ./tools/mkimage -n px30 -T rksd -d rkbin/bin/rk33/px30_ddr_333MHz_v1.15.bin idbloader.img + cat rkbin/bin/rk33/px30_miniloader_v1.22.bin >> idbloader.img + sudo dd if=idbloader.img of=/dev/sda seek=64 + +Create trust.img + +.. code-block:: none + + cd rkbin + ./tools/trust_merger RKTRUST/PX30TRUST.ini + sudo dd if=trust.img of=/dev/sda seek=24576 + +Create uboot.img + +.. code-block:: none + + rbink/tools/loaderimage --pack --uboot u-boot-dtb.bin uboot.img 0x200000 + sudo dd if=uboot.img of=/dev/sda seek=16384 + +Note: +1. 0x200000 is load address and it's an optional in some platforms. +2. rkbin binaries are kept on updating, so would recommend to use the latest versions. + TODO ---- @@ -195,5 +231,7 @@ TODO - Document SPI flash boot - Add missing SoC's with it boards list +[1] https://github.com/rockchip-linux/rkbin + .. Jagan Teki -.. Tuesday 02 June 2020 12:18:57 AM IST +.. Thursday 23 July 2020 04:50:22 PM IST