From patchwork Wed Sep 30 13:16:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1374356 X-Patchwork-Delegate: jagannadh.teki@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=2a01:238:438b:c500:173d:9f52:ddab:ee01; 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=Il2JGDEK; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (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 4C1cJy3Gwtz9sSC for ; Wed, 30 Sep 2020 23:18:42 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3BFA08238C; Wed, 30 Sep 2020 15:18:08 +0200 (CEST) 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="Il2JGDEK"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5E72982322; Wed, 30 Sep 2020 15:18:06 +0200 (CEST) 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-pj1-x1043.google.com (mail-pj1-x1043.google.com [IPv6:2607:f8b0:4864:20::1043]) (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 E6D4C8238C for ; Wed, 30 Sep 2020 15:18:01 +0200 (CEST) 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-pj1-x1043.google.com with SMTP id j19so929703pjl.4 for ; Wed, 30 Sep 2020 06:18:01 -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=+tUr4DLqJ5Ez/uJit87xDsQ+1XaeUWN+STmRQVQ4B8k=; b=Il2JGDEKb/GrOGD77ROyak2ieuV+t5YNuIgx+ObkMWh1NwDBEFLIOwm4+ulApxzk0H 3KB07/D1l/M/c3EzqZt5G0Y1S4qCbF6r+EIZFU6m0NNHwMfI1OBlkISGCUt0k3CAxDXR Pf8n1FP8aA0bFkcHVlr36OE4v4JMPc5gllaEI= 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=+tUr4DLqJ5Ez/uJit87xDsQ+1XaeUWN+STmRQVQ4B8k=; b=mvvysvGSrFWU03teeyfhYsoxy+HKl0fA5rk0Pyji+zp99lgciFqW+A0DXNHghoTr2O Cz3vh66Jk6UhwqC89YbzJYqoMeN8CrfOvesZ6HAHjVQWnq314+FtTxxNbIDI+h3953de PfUZbm6qms54jFIzxYWSxbUaO44W+/IWORiN3XfKk5lRB/pbOVL9yNXxDhEW8j18eIOS pzvm6TYDOtfkg0YHNIynhiNG3pYRrlCkm5vr6mPbEmiRG+baeeVfZRo8eqtEWyrxsbWO +cVvWIJK6Vhd37ExqT8dBIOmNihYzPqpMU9yhLkQjPC75ghtdGefDkTgeTvMNizai3aH /KpA== X-Gm-Message-State: AOAM531d6q9fEi8P8u/PKJM7MWwGf3nJ3+iI/1DMn8XTC+YWJj6Fk/OJ gGCe9t2NwGQydffAt6fNTtsXng== X-Google-Smtp-Source: ABdhPJz18KaQgD48FpDsU6U2qtZho6JgdAmM/SYT5xxNfbeIZbsqbJK55JL2JmNiFmTSGcaaO5s1nw== X-Received: by 2002:a17:902:758f:b029:d2:ac2f:3a79 with SMTP id j15-20020a170902758fb02900d2ac2f3a79mr2393072pll.59.1601471880455; Wed, 30 Sep 2020 06:18:00 -0700 (PDT) Received: from ub-XPS-13-9350.pdxnet.pdxeng.ch ([2405:201:c809:c7d5:91b9:59de:b063:d8ee]) by smtp.gmail.com with ESMTPSA id q4sm2849004pjl.28.2020.09.30.06.17.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Sep 2020 06:17:59 -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 v3 8/8] doc: rockchip: Document Rockchip miniloader flashing Date: Wed, 30 Sep 2020 18:46:26 +0530 Message-Id: <20200930131626.265206-9-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200930131626.265206-1-jagan@amarulasolutions.com> References: <20200930131626.265206-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 --- Changes for v3, v2: - no changes 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