From patchwork Wed Oct 28 13:33:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1389280 X-Patchwork-Delegate: ykai007@gmail.com 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; dmarc=none (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.a=rsa-sha256 header.s=google header.b=hbLyAVAX; 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) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CLqMx6Mq6z9sVw for ; Thu, 29 Oct 2020 00:35:57 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 18BE182508; Wed, 28 Oct 2020 14:34:49 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=amarulasolutions.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=amarulasolutions.com header.i=@amarulasolutions.com header.b="hbLyAVAX"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7542682508; Wed, 28 Oct 2020 14:34:47 +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,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pl1-x643.google.com (mail-pl1-x643.google.com [IPv6:2607:f8b0:4864:20::643]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 4E7DF8250D for ; Wed, 28 Oct 2020 14:34:44 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=jagan@amarulasolutions.com Received: by mail-pl1-x643.google.com with SMTP id b12so2488275plr.4 for ; Wed, 28 Oct 2020 06:34:44 -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=Meh7zQ2a1imDEFiBWXxptjzBWdacC0VbNRyMb7TtM/s=; b=hbLyAVAXrJT3wnLD2PA/vBmyOt22WhQf+2sGUCoq71sOG6yqr1hAsLmQjJrSXjgrSb +kNg59/Mo51YYHWlKcGZ3fa/caPSDyt2lS8+5WhZAxBvE42oFu3lpHv1oJrTTU7JW+JV tpeunY50jTUepWNGk3kygAzoAMwVXXVZY7xlw= 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=Meh7zQ2a1imDEFiBWXxptjzBWdacC0VbNRyMb7TtM/s=; b=lv2+shL7kPabsxsKZ0NZxfwEBFOV9EsdpL7Qnawyr9W8bS5/NnCJIi/ICdvOvwuGUA UP+CPBFtm6EZYY2ChiNx7jKJZDDMiDKAU4+mLiPhSS9dGFKyD0N3tVI0N1a2y9uTyxxI BhFEHQiymGjjJ1brK9/gQfl43eEnRcUc0MObwZ7AOlYjTy8Rq7QWGWTzY7fYqfzawULH nCDk96rx1SBtGjk6UkeqLUdl+YSmax1WcOHROnKdPY3DIA/VgI3dyoN8NOSRAa6ik3t7 dGRgeD4K8tP8q8bTUFIyKUFUTxkNI1py+mXSMzcsbrXWFyv/Xo5RfpAqwEJcyFgNnAfj qoqg== X-Gm-Message-State: AOAM530+w6NADP/fPHOLJyRP1ieb7XDCNNVybbh7+2NjskxxKHXB5oZc bPnijwydeNOPt4tWkmELLGSaVw== X-Google-Smtp-Source: ABdhPJw9ULxNaJiXRN4RIZ8WvJcXZFTEyqV1aU5kvtbvnBWkrg63AZyvXWmSmhGVA9OQMm6z1AG4Yg== X-Received: by 2002:a17:902:b7c6:b029:d6:336:5373 with SMTP id v6-20020a170902b7c6b02900d603365373mr6622943plz.67.1603892082525; Wed, 28 Oct 2020 06:34:42 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c809:c7a4:2d09:2940:d772:8d5]) by smtp.gmail.com with ESMTPSA id u11sm5717073pfk.164.2020.10.28.06.34.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Oct 2020 06:34:41 -0700 (PDT) From: Jagan Teki To: kever.yang@rock-chips.com, philipp.tomsich@theobroma-systems.com, sjg@chromium.org Cc: sunil@amarulasolutions.com, u-boot@lists.denx.de, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v4 8/8] doc: rockchip: Document Rockchip miniloader flashing Date: Wed, 28 Oct 2020 19:03:48 +0530 Message-Id: <20201028133348.241839-9-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201028133348.241839-1-jagan@amarulasolutions.com> References: <20201028133348.241839-1-jagan@amarulasolutions.com> MIME-Version: 1.0 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.3 at phobos.denx.de X-Virus-Status: Clean 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 Reviewed-by: Kever Yang --- Changes for v4: - none 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..955e6858f2 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 +.. Wednesday 28 October 2020 06:47:26 PM IST