From patchwork Fri Apr 26 13:34:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1091543 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=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.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=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b="PvqYNQLo"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 44rFSJ36yKz9s7T for ; Fri, 26 Apr 2019 23:36:00 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id BE36FC21FF1; Fri, 26 Apr 2019 13:35:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id A1432C22010; Fri, 26 Apr 2019 13:34:59 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id E7714C21FA5; Fri, 26 Apr 2019 13:34:52 +0000 (UTC) Received: from mail-pg1-f194.google.com (mail-pg1-f194.google.com [209.85.215.194]) by lists.denx.de (Postfix) with ESMTPS id D5F08C21F01 for ; Fri, 26 Apr 2019 13:34:47 +0000 (UTC) Received: by mail-pg1-f194.google.com with SMTP id z16so1639707pgv.11 for ; Fri, 26 Apr 2019 06:34:47 -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=DOYcE2jBsaACz3HvBKiQdfAKk8BFPbwKPna+LoxS5hk=; b=PvqYNQLosoj/bXKzA7QTPFN106p9HETQbe49/sLhwz+iych70KGnHCXRSjkYP5upwI ht3uQlGoGnlwSR6kmpbyojsVroCfL75OtQK5VZom75yhuSgiaRjBaBwhQgezRnOzETPd mvX5G+RKyS1WZOzfIa9KVaJ+njOgMpkTrgtOM= 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=DOYcE2jBsaACz3HvBKiQdfAKk8BFPbwKPna+LoxS5hk=; b=VEVkSfX5QA+6KbFXbuEufJAb3VDvdIvRpBsbe3vM9QB3obGoou8cDh3laFYV/sfowK PJVg2HmQTyGeAaIChbnoaEL68x3VdOBs9ZGRP4ZUljtzsAYU+8pjlmQKidDUFmlgaupx sX3TXL27lk1OE8i8CdkoIcnH0AdJxyGsOf+rUVf4iJcRj3hglnt7BNhKNtgXkAo8nwQU C9BaVpYLQNusU2+uHLatmktzju2m72/mp51RZarneI9+/8SunlU3V/9YAgEiHB+U8mUm HZ2LBDFxTogixdRjQvvyaJ8U0P0tEX+TuI8NK3G2+/0JHVFiqfjY21jgnUwgtwU1TvTY r7gQ== X-Gm-Message-State: APjAAAXW8KownJ8DaGcarAY5VFM3Z3+7qXqqHxWR21PgKaSRDfylDz/e SuWLPSb1jUyUVnFjkmZ2PVpZwAtvA+c= X-Google-Smtp-Source: APXvYqwrIMCaa9JO46s4MDDWecQpXb2AHph7/4egDQhwjg/GsWKZ3fFdZMIhbSf9E8e6PGY8epIPhg== X-Received: by 2002:a62:5a42:: with SMTP id o63mr48840880pfb.170.1556285686377; Fri, 26 Apr 2019 06:34:46 -0700 (PDT) Received: from localhost.localdomain ([115.97.185.144]) by smtp.gmail.com with ESMTPSA id y19sm36946770pfn.164.2019.04.26.06.34.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 26 Apr 2019 06:34:45 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , Akash Gajjar , Tom Rini , Manivannan Sadhasivam Date: Fri, 26 Apr 2019 19:04:26 +0530 Message-Id: <20190426133430.17802-2-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190426133430.17802-1-jagan@amarulasolutions.com> References: <20190426133430.17802-1-jagan@amarulasolutions.com> MIME-Version: 1.0 Cc: linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, u-boot@lists.denx.de Subject: [U-Boot] [PATCH 1/5] arm64: rockchip: dts: rk3399: Create -u-boot.dtsi files X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 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" We have a base rk3399-u-boot.dtsi which enabled sdmmc for SPL, extend the same with spi1 so-that the SPL spi boot boards can make use of the same. So, to make use of this common rk3399-u-boot.dtsi we have to include this in respective dts files. So, this patch will create all preliminary infrastructure, like - create -u-boot.dtsi - include rk3399-u-boot.dtsi - move sdram dtsi into -u-boot.dtsi - drop sdmmc, u-boot,dm-pre-reloc - drop spi1, u-boot,dm-pre-reloc This would help to - sync the dts(i) files from Linux whenever required instead of adding specific nodes. - easy to add u-boot specific changes like binman node into common -u-boot.dtsi file Signed-off-by: Jagan Teki --- arch/arm/dts/rk3399-evb-u-boot.dtsi | 7 +++++++ arch/arm/dts/rk3399-evb.dts | 2 -- arch/arm/dts/rk3399-ficus-u-boot.dtsi | 7 +++++++ arch/arm/dts/rk3399-ficus.dts | 1 - arch/arm/dts/rk3399-firefly-u-boot.dtsi | 7 +++++++ arch/arm/dts/rk3399-firefly.dts | 2 -- arch/arm/dts/rk3399-gru-bob-u-boot.dtsi | 7 +++++++ arch/arm/dts/rk3399-gru-bob.dts | 1 - arch/arm/dts/rk3399-gru.dtsi | 1 - arch/arm/dts/rk3399-puma-ddr1600.dts | 2 +- arch/arm/dts/rk3399-puma.dtsi | 3 --- arch/arm/dts/rk3399-rock960-u-boot.dtsi | 7 +++++++ arch/arm/dts/rk3399-rock960.dts | 1 - arch/arm/dts/rk3399-u-boot.dtsi | 4 ++++ 14 files changed, 40 insertions(+), 12 deletions(-) create mode 100644 arch/arm/dts/rk3399-evb-u-boot.dtsi create mode 100644 arch/arm/dts/rk3399-ficus-u-boot.dtsi create mode 100644 arch/arm/dts/rk3399-firefly-u-boot.dtsi create mode 100644 arch/arm/dts/rk3399-gru-bob-u-boot.dtsi create mode 100644 arch/arm/dts/rk3399-rock960-u-boot.dtsi diff --git a/arch/arm/dts/rk3399-evb-u-boot.dtsi b/arch/arm/dts/rk3399-evb-u-boot.dtsi new file mode 100644 index 0000000000..20910e744b --- /dev/null +++ b/arch/arm/dts/rk3399-evb-u-boot.dtsi @@ -0,0 +1,7 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2019 Jagan Teki + */ + +#include "rk3399-u-boot.dtsi" +#include "rk3399-sdram-lpddr3-4GB-1600.dtsi" diff --git a/arch/arm/dts/rk3399-evb.dts b/arch/arm/dts/rk3399-evb.dts index ce004d0d18..a506e8da37 100644 --- a/arch/arm/dts/rk3399-evb.dts +++ b/arch/arm/dts/rk3399-evb.dts @@ -7,7 +7,6 @@ #include #include #include "rk3399.dtsi" -#include "rk3399-sdram-lpddr3-4GB-1600.dtsi" / { model = "Rockchip RK3399 Evaluation Board"; @@ -155,7 +154,6 @@ }; &sdmmc { - u-boot,dm-pre-reloc; bus-width = <4>; status = "okay"; }; diff --git a/arch/arm/dts/rk3399-ficus-u-boot.dtsi b/arch/arm/dts/rk3399-ficus-u-boot.dtsi new file mode 100644 index 0000000000..67b63a8352 --- /dev/null +++ b/arch/arm/dts/rk3399-ficus-u-boot.dtsi @@ -0,0 +1,7 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2019 Jagan Teki + */ + +#include "rk3399-u-boot.dtsi" +#include "rk3399-sdram-ddr3-1600.dtsi" diff --git a/arch/arm/dts/rk3399-ficus.dts b/arch/arm/dts/rk3399-ficus.dts index 4af0e4e383..4b2dd82b67 100644 --- a/arch/arm/dts/rk3399-ficus.dts +++ b/arch/arm/dts/rk3399-ficus.dts @@ -8,7 +8,6 @@ /dts-v1/; #include "rk3399-rock960.dtsi" -#include "rk3399-sdram-ddr3-1600.dtsi" / { model = "96boards RK3399 Ficus"; diff --git a/arch/arm/dts/rk3399-firefly-u-boot.dtsi b/arch/arm/dts/rk3399-firefly-u-boot.dtsi new file mode 100644 index 0000000000..67b63a8352 --- /dev/null +++ b/arch/arm/dts/rk3399-firefly-u-boot.dtsi @@ -0,0 +1,7 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2019 Jagan Teki + */ + +#include "rk3399-u-boot.dtsi" +#include "rk3399-sdram-ddr3-1600.dtsi" diff --git a/arch/arm/dts/rk3399-firefly.dts b/arch/arm/dts/rk3399-firefly.dts index f90e7e88db..a4cb64f8bd 100644 --- a/arch/arm/dts/rk3399-firefly.dts +++ b/arch/arm/dts/rk3399-firefly.dts @@ -7,7 +7,6 @@ #include #include #include "rk3399.dtsi" -#include "rk3399-sdram-ddr3-1600.dtsi" / { model = "Firefly-RK3399 Board"; @@ -592,7 +591,6 @@ }; &sdmmc { - u-boot,dm-pre-reloc; bus-width = <4>; status = "okay"; }; diff --git a/arch/arm/dts/rk3399-gru-bob-u-boot.dtsi b/arch/arm/dts/rk3399-gru-bob-u-boot.dtsi new file mode 100644 index 0000000000..f0d31edefd --- /dev/null +++ b/arch/arm/dts/rk3399-gru-bob-u-boot.dtsi @@ -0,0 +1,7 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2019 Jagan Teki + */ + +#include "rk3399-u-boot.dtsi" +#include "rk3399-sdram-lpddr3-samsung-4GB-1866.dtsi" diff --git a/arch/arm/dts/rk3399-gru-bob.dts b/arch/arm/dts/rk3399-gru-bob.dts index 0e3d91fc28..1ee0dc0d9f 100644 --- a/arch/arm/dts/rk3399-gru-bob.dts +++ b/arch/arm/dts/rk3399-gru-bob.dts @@ -7,7 +7,6 @@ /dts-v1/; #include "rk3399-gru-chromebook.dtsi" -#include "rk3399-sdram-lpddr3-samsung-4GB-1866.dtsi" / { model = "Google Bob"; diff --git a/arch/arm/dts/rk3399-gru.dtsi b/arch/arm/dts/rk3399-gru.dtsi index df19263acc..8b3d90fdc6 100644 --- a/arch/arm/dts/rk3399-gru.dtsi +++ b/arch/arm/dts/rk3399-gru.dtsi @@ -545,7 +545,6 @@ ap_i2c_audio: &i2c8 { &spi1 { status = "okay"; - u-boot,dm-pre-reloc; pinctrl-names = "default", "sleep"; pinctrl-1 = <&spi1_sleep>; diff --git a/arch/arm/dts/rk3399-puma-ddr1600.dts b/arch/arm/dts/rk3399-puma-ddr1600.dts index 337e0eabb4..b4fc2457f0 100644 --- a/arch/arm/dts/rk3399-puma-ddr1600.dts +++ b/arch/arm/dts/rk3399-puma-ddr1600.dts @@ -6,5 +6,5 @@ /dts-v1/; #include "rk3399-puma.dtsi" +#include "rk3399-u-boot.dtsi" #include "rk3399-sdram-ddr3-1600.dtsi" - diff --git a/arch/arm/dts/rk3399-puma.dtsi b/arch/arm/dts/rk3399-puma.dtsi index 8304f67192..2712ab6826 100644 --- a/arch/arm/dts/rk3399-puma.dtsi +++ b/arch/arm/dts/rk3399-puma.dtsi @@ -492,7 +492,6 @@ }; &sdmmc { - u-boot,dm-pre-reloc; clock-frequency = <150000000>; max-frequency = <40000000>; supports-sd; @@ -648,8 +647,6 @@ &spi1 { - u-boot,dm-pre-reloc; - status = "okay"; #address-cells = <1>; diff --git a/arch/arm/dts/rk3399-rock960-u-boot.dtsi b/arch/arm/dts/rk3399-rock960-u-boot.dtsi new file mode 100644 index 0000000000..7fb5072a9b --- /dev/null +++ b/arch/arm/dts/rk3399-rock960-u-boot.dtsi @@ -0,0 +1,7 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2019 Jagan Teki + */ + +#include "rk3399-u-boot.dtsi" +#include "rk3399-sdram-lpddr3-2GB-1600.dtsi" diff --git a/arch/arm/dts/rk3399-rock960.dts b/arch/arm/dts/rk3399-rock960.dts index 25c58b4261..7e06bc97e5 100644 --- a/arch/arm/dts/rk3399-rock960.dts +++ b/arch/arm/dts/rk3399-rock960.dts @@ -5,7 +5,6 @@ /dts-v1/; #include "rk3399-rock960.dtsi" -#include "rk3399-sdram-lpddr3-2GB-1600.dtsi" / { model = "96boards Rock960"; diff --git a/arch/arm/dts/rk3399-u-boot.dtsi b/arch/arm/dts/rk3399-u-boot.dtsi index f533ed95eb..0786c1193a 100644 --- a/arch/arm/dts/rk3399-u-boot.dtsi +++ b/arch/arm/dts/rk3399-u-boot.dtsi @@ -6,3 +6,7 @@ &sdmmc { u-boot,dm-pre-reloc; }; + +&spi1 { + u-boot,dm-pre-reloc; +}; From patchwork Fri Apr 26 13:34:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1091544 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=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.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=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b="fv6iqiY3"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 44rFSp2nhxz9s9N for ; Fri, 26 Apr 2019 23:36:26 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 158C8C21FFE; Fri, 26 Apr 2019 13:35:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 1B14DC21FAD; Fri, 26 Apr 2019 13:35:08 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id C8F01C21FC7; Fri, 26 Apr 2019 13:34:59 +0000 (UTC) Received: from mail-pg1-f196.google.com (mail-pg1-f196.google.com [209.85.215.196]) by lists.denx.de (Postfix) with ESMTPS id 2E2AEC21F50 for ; Fri, 26 Apr 2019 13:34:52 +0000 (UTC) Received: by mail-pg1-f196.google.com with SMTP id j26so1654379pgl.5 for ; Fri, 26 Apr 2019 06:34:52 -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=rlO5qGYy6kjT+AKhiquK187CEtLKOidUD7eBDX9VmMA=; b=fv6iqiY3vqiX6p9qN7h53EyhZlkqqaCtWQ2vwqtJ64+ftqv8XcTxRflQHoKHvS0dbw KRFk38auPgbtgQUEirEwAFhiDZBj/4HImYuxz6HW0y4nXmh8b+SqdVZeX0aKufdodkMG k3FvFhrxaLi/KtyXHauzKgPhdoqA2rhr/tVM4= 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=rlO5qGYy6kjT+AKhiquK187CEtLKOidUD7eBDX9VmMA=; b=OtZkUrfPIGGhe4wVfG1kT+JAxCwEI8KRLf6Obxu23ufSGoXe67jSlzHmOZ00GxboiK 9xFr44PgkUsRruyDLV3xVZMGUB5BtLnHIFC6aYbFTv9z5DQWpO2Vf7bfqn3bMaLZlDGB 76Yfxpmg6OeQ4sQppuAvE7w0H9VU3s1d/g/pqX5WcpVt+93R84oLY6u7s/IZRjxweqyy jlhwwfH1Kv8DTowMW8KAwvtuVdYCeMqZsydbITp6ZStwJPaWhMwwuAdq56zWNS2sxOhr DIIrhc1O1TpzZ0VrmB+9KjIb0VGVoCD8ljbC/ReUFQwZOdPiKh21GUoQqnilmk4WfHLk hzzw== X-Gm-Message-State: APjAAAXbHsR3d8BYvCqLCkLh+x2O77M4v/gtS9+6UHGNCZZWMtXC3/nL RLqece3wFTKaGADxwX6fyuFUzQ== X-Google-Smtp-Source: APXvYqzBuceABntJltOnulpc53413kx1N6Heyg6GzdX/DW4Iy0Q5tJjSnNEU7MzoohiWynX2xzd0QA== X-Received: by 2002:a62:4115:: with SMTP id o21mr46870056pfa.153.1556285690767; Fri, 26 Apr 2019 06:34:50 -0700 (PDT) Received: from localhost.localdomain ([115.97.185.144]) by smtp.gmail.com with ESMTPSA id y19sm36946770pfn.164.2019.04.26.06.34.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 26 Apr 2019 06:34:50 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , Akash Gajjar , Tom Rini , Manivannan Sadhasivam Date: Fri, 26 Apr 2019 19:04:27 +0530 Message-Id: <20190426133430.17802-3-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190426133430.17802-1-jagan@amarulasolutions.com> References: <20190426133430.17802-1-jagan@amarulasolutions.com> MIME-Version: 1.0 Cc: linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, u-boot@lists.denx.de Subject: [U-Boot] [PATCH 2/5] rockchip: rk3399: Get bl31.elf via BL31 env X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 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" Right now rockchip platform need to copy bl31.elf into u-boot source directory to make use of building u-boot.itb. So, add environment variable BL31 like Allwinner SoC so-that the bl31.elf would available via BL31. Signed-off-by: Jagan Teki --- arch/arm/mach-rockchip/make_fit_atf.py | 5 ++++- doc/README.rockchip | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-rockchip/make_fit_atf.py b/arch/arm/mach-rockchip/make_fit_atf.py index d1faff1957..99cf6f43dc 100755 --- a/arch/arm/mach-rockchip/make_fit_atf.py +++ b/arch/arm/mach-rockchip/make_fit_atf.py @@ -194,8 +194,11 @@ def get_bl31_segments_info(bl31_file_name): def main(): uboot_elf="./u-boot" - bl31_elf="./bl31.elf" FIT_ITS=sys.stdout + if "BL31" in os.environ: + bl31_elf=os.getenv("BL31"); + else: + sys.exit("ERROR: Please export BL31 file, check doc/README.rockchip") opts, args = getopt.getopt(sys.argv[1:], "o:u:b:h") for opt, val in opts: diff --git a/doc/README.rockchip b/doc/README.rockchip index e8f6a2dfba..0db4771162 100644 --- a/doc/README.rockchip +++ b/doc/README.rockchip @@ -138,8 +138,8 @@ For example: => make realclean => make CROSS_COMPILE=aarch64-linux-gnu- PLAT=rk3399 - (copy bl31.elf U-Boot root dir) - => cp build/rk3399/release/bl31/bl31.elf /path/to/u-boot + (export bl31.elf) + => export BL31=/path/to/arm-trusted-firmware/build/rk3399/release/bl31/bl31.elf - Compile U-Boot From patchwork Fri Apr 26 13:34:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1091545 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=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.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=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b="BdGGz67I"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 44rFVQ6mxQz9s9G for ; Fri, 26 Apr 2019 23:37:50 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 9FA34C22012; Fri, 26 Apr 2019 13:35:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 9793AC21FE4; Fri, 26 Apr 2019 13:35:09 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id E3781C21F9A; Fri, 26 Apr 2019 13:35:01 +0000 (UTC) Received: from mail-pl1-f196.google.com (mail-pl1-f196.google.com [209.85.214.196]) by lists.denx.de (Postfix) with ESMTPS id 9AC7EC2201B for ; Fri, 26 Apr 2019 13:34:56 +0000 (UTC) Received: by mail-pl1-f196.google.com with SMTP id o7so1574469pll.13 for ; Fri, 26 Apr 2019 06:34: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=3N5rNqcMuDowMTD/3vgKU8H5GyxtTI2jCzUXbqadNIQ=; b=BdGGz67I43scUy/bdFGnBN1AiQNHEXop1lc6edh7nyG8rFrbkqyV5engtt4xCdLMpx BGYNJR4Tk7M3KazwVaqq8WrlRx2J4u2xPljUJnif+DhJuBgqpPe28zWu0QwWIB30cx1X PCnFAb1wdbCAVAwQN0DvbDb7MTSF3o96zWOKo= 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=3N5rNqcMuDowMTD/3vgKU8H5GyxtTI2jCzUXbqadNIQ=; b=oluqxgoo7mP/eLBL2JMFkHFLEmQyHNPckyZImZPbZ4p+Ouw/8+EReAt+wKne8E5KdT Nl9TiAJCnjlTyMfvtrYihaBbuE01fp60VVjlY4PafcPYTOsHlbkbA7z+8QR9b8m9Ecyw pS1grb7Ur1QAGNlddF/I4/LfSBp0h2GeCgbGJe4C4qg9ONmtGYp3APBDAC4i5mRBgFON lDLtGPJVgTU44iAAGA+pcff8JLCTdlzw5rUz4mFL9VbhxvohswU+7RKfaSGBr2Y2+tBc tTD+ThGHYgZcxIrgmxqlYaMhzvVv2VwoJ2J4zjAecyfQTfTjnT/pKiq5R+UzViFPmD2u cjiA== X-Gm-Message-State: APjAAAWX+DZotSFceX+ciwwN7SInTAo2VVT3s3w+HCE7Z9GBPSwzu1j2 Z3JlGwJrEEMAEyPDITJgPLU2JA== X-Google-Smtp-Source: APXvYqzHYK5WshCoxt37GbCvx4VhF2eVkQmq6z8cWSvkhFPgi6s2Y3Qr3h24Q6xOUEUAwYwAetSSLQ== X-Received: by 2002:a17:902:6bc5:: with SMTP id m5mr47205006plt.180.1556285695228; Fri, 26 Apr 2019 06:34:55 -0700 (PDT) Received: from localhost.localdomain ([115.97.185.144]) by smtp.gmail.com with ESMTPSA id y19sm36946770pfn.164.2019.04.26.06.34.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 26 Apr 2019 06:34:54 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , Akash Gajjar , Tom Rini , Manivannan Sadhasivam Date: Fri, 26 Apr 2019 19:04:28 +0530 Message-Id: <20190426133430.17802-4-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190426133430.17802-1-jagan@amarulasolutions.com> References: <20190426133430.17802-1-jagan@amarulasolutions.com> MIME-Version: 1.0 Cc: linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, u-boot@lists.denx.de Subject: [U-Boot] [PATCH 3/5] Kconfig: Add u-boot.itb BUILD_TARGET for Rockchip X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 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" Add u-boot.itb BUILD_TARGET for Rockchip platform when SPL_LOAD_FIT is being used. This can get rid of building itb explicitly with 'make u-boot.itb' all required images will now build just by make. Signed-off-by: Jagan Teki --- Kconfig | 2 +- doc/README.rockchip | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Kconfig b/Kconfig index 5679a288ec..46f511123a 100644 --- a/Kconfig +++ b/Kconfig @@ -230,7 +230,7 @@ config BUILD_TARGET default "u-boot-with-spl.sfp" if TARGET_SOCFPGA_GEN5 default "u-boot-spl.kwb" if ARCH_MVEBU && SPL default "u-boot-elf.srec" if RCAR_GEN3 - default "u-boot.itb" if SPL_LOAD_FIT && ARCH_SUNXI + default "u-boot.itb" if SPL_LOAD_FIT && (ARCH_ROCKCHIP || ARCH_SUNXI) default "u-boot.kwb" if KIRKWOOD help Some SoCs need special image types (e.g. U-Boot binary diff --git a/doc/README.rockchip b/doc/README.rockchip index 0db4771162..124efd65e4 100644 --- a/doc/README.rockchip +++ b/doc/README.rockchip @@ -103,7 +103,6 @@ For example: => cd /path/to/u-boot => make nanopi-neo4-rk3399_defconfig => make - => make u-boot.itb - Get the rkbin @@ -146,7 +145,6 @@ For example: => cd /path/to/u-boot => make orangepi-rk3399_defconfig => make - => make u-boot.itb (Get spl/u-boot-spl-dtb.bin, u-boot.itb images and some boards would get spl/u-boot-spl.bin since it doesn't enable CONFIG_SPL_OF_CONTROL) From patchwork Fri Apr 26 13:34:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1091547 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=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.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=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b="qOkD+ffI"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 44rFVd3r3wz9s9G for ; Fri, 26 Apr 2019 23:38:01 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 11CD3C21FF1; Fri, 26 Apr 2019 13:36:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 1C6B7C22004; Fri, 26 Apr 2019 13:35:15 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id C1516C22005; Fri, 26 Apr 2019 13:35:04 +0000 (UTC) Received: from mail-pg1-f193.google.com (mail-pg1-f193.google.com [209.85.215.193]) by lists.denx.de (Postfix) with ESMTPS id EE393C21FC7 for ; Fri, 26 Apr 2019 13:35:00 +0000 (UTC) Received: by mail-pg1-f193.google.com with SMTP id d31so1646453pgl.7 for ; Fri, 26 Apr 2019 06:35:00 -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=M9AJcb/8Dmjs0igPOlr99VUFJEFDN2irpI4FE8JxLWY=; b=qOkD+ffIG9oXuQQPYOpCVcXGPxNKB/BOQXtR5JpcJntlPmjdoriz3iDtjqyrCQFif9 RLHKZiirs4pcznsiZBMHdXdy7FEmtpPkitMLR+FaDO0PA8K6rtVIXVRfOJnYwVDb+KZn GNRqS+A4k3Sa4jywUoNrOcdhzRJgUXKwVw8gM= 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=M9AJcb/8Dmjs0igPOlr99VUFJEFDN2irpI4FE8JxLWY=; b=k30/xaCz/39jXra+URzEqbeeFyl3YFziXkP8hj0mQlmbI2ZA0c7a7fPBL9IlL9mbhj /RHYrhxpSkXil9PjQjnJDWmoQ9Z3JOZbrmXbZel1jJhsWXMFtMCi6RhbYV6tp4qRbIp4 xdBjIxjFzmZRSAby0WASSuMrPBjaQqoyRPAdSSF00wbDehdMPHZBtQ8r62x6AYhYlOU+ YM+dkvphMY1jTp+ezZhshB+be4bF+SalHIuBSJvE2kUT8pZIZLb4Tpum+UuK2Ef9Q+v/ 9AuaCe2y65k1TkiRvaV2XkkzfeeElD2ZfZ4TJuI4AfLBmTAW0k3xYigq8SNaeh1UMKia ZZvA== X-Gm-Message-State: APjAAAXOv4OvH5165qtDfh4JPz4vz15nbmxruoG5Qp8MOmuC0Zi3fXmg b7TgOXwy1a+Ht2eKIGr7aKCy0w== X-Google-Smtp-Source: APXvYqxMH9oRB97+X+QeUshTBIrhukXOEFwnP7LL0xvs2BsYNOR4QF9Idyl1gxceyXxA12R/eZrslw== X-Received: by 2002:a63:2a8f:: with SMTP id q137mr43858721pgq.31.1556285699518; Fri, 26 Apr 2019 06:34:59 -0700 (PDT) Received: from localhost.localdomain ([115.97.185.144]) by smtp.gmail.com with ESMTPSA id y19sm36946770pfn.164.2019.04.26.06.34.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 26 Apr 2019 06:34:58 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , Akash Gajjar , Tom Rini , Manivannan Sadhasivam Date: Fri, 26 Apr 2019 19:04:29 +0530 Message-Id: <20190426133430.17802-5-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190426133430.17802-1-jagan@amarulasolutions.com> References: <20190426133430.17802-1-jagan@amarulasolutions.com> MIME-Version: 1.0 Cc: linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, u-boot@lists.denx.de Subject: [U-Boot] [PATCH 4/5] Makefile.spl: Create u-boot-spl-rockchip.bin for rk3399 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 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" Rockchip platform would require an explicit call to mkimage for creating bootable images which indeed specific to SoC family along with boot devices. Example of creating bootable image for rk3399 family with SD boot device as ₹ mkimage -n rk3399 -T rksd -d ./spl/u-boot-spl-dtb.bin u-boot-spl-rockchip.bin This patch would do the same think via Makefile.spl for rk3399. This would be an initial version and it can easily expand further to support other families of SoC's with variety of boot stages like TPL, SPL. Signed-off-by: Jagan Teki --- arch/arm/mach-rockchip/Kconfig | 8 ++++++++ doc/README.rockchip | 3 +-- scripts/Makefile.spl | 21 +++++++++++++++++++++ 3 files changed, 30 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-rockchip/Kconfig b/arch/arm/mach-rockchip/Kconfig index dbe7f11d39..286c870135 100644 --- a/arch/arm/mach-rockchip/Kconfig +++ b/arch/arm/mach-rockchip/Kconfig @@ -222,6 +222,14 @@ config ROCKCHIP_SPL_RESERVE_IRAM config ROCKCHIP_BROM_HELPER bool +config SPL_ROCKCHIP_IMG_NAME + string "SPL Rockchip image name" + default "rk3399" if ROCKCHIP_RK3399 + help + To create SPL image for rockchip targets the image name would + depends on the SoC family that would pass as an argument as + '-n rk3399' to mkimage for creating Rockchip SPL boot image. + config SPL_ROCKCHIP_EARLYRETURN_TO_BROM bool "SPL requires early-return (for RK3188-style BROM) to BROM" depends on SPL && ENABLE_ARM_SOC_BOOT0_HOOK diff --git a/doc/README.rockchip b/doc/README.rockchip index 124efd65e4..73594dc61d 100644 --- a/doc/README.rockchip +++ b/doc/README.rockchip @@ -397,11 +397,10 @@ Option 2: Package the image with SPL: - Prefix rk3399 header to SPL image => cd /path/to/u-boot - => ./tools/mkimage -n rk3399 -T rksd -d spl/u-boot-spl-dtb.bin out - Write prefixed SPL at 64th sector - => sudo dd if=out of=/dev/sdc seek=64 + => sudo dd if=spl/u-boot-spl-rockchip.bin of=/dev/sdc seek=64 - Write U-Boot proper at 16384 sector diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl index 54b160d72b..49c0641aa2 100644 --- a/scripts/Makefile.spl +++ b/scripts/Makefile.spl @@ -235,6 +235,10 @@ ALL-$(CONFIG_ARCH_ZYNQMP) += $(obj)/boot.bin ALL-$(CONFIG_ARCH_MEDIATEK) += $(obj)/u-boot-spl-mtk.bin +ifdef CONFIG_ROCKCHIP_RK3399 +ALL-$(CONFIG_ARCH_ROCKCHIP) += $(obj)/u-boot-spl-rockchip.bin +endif + all: $(ALL-y) quiet_cmd_cat = CAT $@ @@ -369,6 +373,23 @@ MKIMAGEFLAGS_u-boot-spl-mtk.bin = -T mtk_image \ $(obj)/u-boot-spl-mtk.bin: $(obj)/u-boot-spl.bin FORCE $(call if_changed,mkimage) +# Rockchip specific SPL build +ifeq ($(CONFIG_ROCKCHIP_RK3399),y) + +ifeq ($(CONFIG_SPI_FLASH_SUPPORT),y) +ROCKCHIP_IMG_TYPE := rkspi +else +ROCKCHIP_IMG_TYPE := rksd +endif + +MKIMAGEFLAGS_u-boot-spl-rockchip.bin = -n $(CONFIG_SPL_ROCKCHIP_IMG_NAME) \ + -T $(ROCKCHIP_IMG_TYPE) -d $(MKIMAGEOUTPUT) + +$(obj)/u-boot-spl-rockchip.bin: $(obj)/u-boot-spl.bin FORCE + $(call if_changed,mkimage) + +endif # CONFIG_ROCKCHIP_RK3399 + # Rule to link u-boot-spl # May be overridden by arch/$(ARCH)/config.mk quiet_cmd_u-boot-spl ?= LD $@ From patchwork Fri Apr 26 13:34:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1091546 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=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.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=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b="AD4PoTO5"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 44rFVT33Brz9s9N for ; Fri, 26 Apr 2019 23:37:53 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 10F3BC22029; Fri, 26 Apr 2019 13:36:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id B5535C22003; Fri, 26 Apr 2019 13:35:33 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 0191BC22003; Fri, 26 Apr 2019 13:35:09 +0000 (UTC) Received: from mail-pl1-f194.google.com (mail-pl1-f194.google.com [209.85.214.194]) by lists.denx.de (Postfix) with ESMTPS id D9AF7C21FE4 for ; Fri, 26 Apr 2019 13:35:05 +0000 (UTC) Received: by mail-pl1-f194.google.com with SMTP id w20so976952plq.3 for ; Fri, 26 Apr 2019 06:35:05 -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=/qOgLyzHZqhoMQdBz3HHUNbRncBtz7SI2uhERnn/Y2c=; b=AD4PoTO58PnLaBfuCPEn6gezj+Ie+6Zhs3AEUiJ91dc9JYX4xOfTFNuAb40d4Y3uNQ Vhc9m4HvqC4RSFJgUf1Ga64/1+FkO6zXtGLmUuIuxtNSzJWRxGx5r6sMUiNCtSD6m1vS CJHX6Qr2d78YbsZrPQirgy+rOMVSVcXLpRAvw= 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=/qOgLyzHZqhoMQdBz3HHUNbRncBtz7SI2uhERnn/Y2c=; b=qB0h+L+lZuKe0dmXYiM3jxF0bc0+4IXWGFr4bIypBLI0qdXHen6/Ck8frvYQOiCaxC Eau3cy9Uw9ErUXy2+R7UAbCCxTkN8ggj376uSr1io37PbHcDpJbB4+H2neX01z0ziFia 8GX3L7f7+ZSMnGyAwCY+6Fw8hJbRLCKybm3Vv7ySjkK4ow6RkNlVSO6oDIk+vSf5bMCa 8r/KIzhC23U4f4xhMjE40QkN7Uyg8H41js/2z6f4LOO/kEfzCnEoE8Ho3dlftIbMvkDJ vkp/tRqAp0PEMgNIdOEXN83wNnBZE8ZdyUlbvuaCDjXlFhVFOldtOOH9m73GTBalbueX +22A== X-Gm-Message-State: APjAAAUOw7jJc76YDJYGZOOm7mBMa+0DuALa2t7tNLTau1shD0vbCd4h x8kcYc3+jpbtlNwmYE4qe6o1Ew== X-Google-Smtp-Source: APXvYqw297o/4HUNOACU1stM5yGaij559lQ/r8qoKkQdnFsh+oXrt7sIw/VLK+gQ0HIIGYZr3CYH1Q== X-Received: by 2002:a17:902:26b:: with SMTP id 98mr15887146plc.30.1556285704463; Fri, 26 Apr 2019 06:35:04 -0700 (PDT) Received: from localhost.localdomain ([115.97.185.144]) by smtp.gmail.com with ESMTPSA id y19sm36946770pfn.164.2019.04.26.06.34.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 26 Apr 2019 06:35:03 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , Akash Gajjar , Tom Rini , Manivannan Sadhasivam Date: Fri, 26 Apr 2019 19:04:30 +0530 Message-Id: <20190426133430.17802-6-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190426133430.17802-1-jagan@amarulasolutions.com> References: <20190426133430.17802-1-jagan@amarulasolutions.com> MIME-Version: 1.0 Cc: linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, u-boot@lists.denx.de Subject: [U-Boot] [PATCH 5/5] rockchip: rk3399: Create single image using BINMAN X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 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" RK3399 platform has two stage boot loaders like SPL and U-Boot proper. For each stage we need to burn the image on to flash with respective offsets. This patch create a single image using binman, so that user can get rid of burning different stage boot images. without this patch: ------------------ ₹ sudo dd if=spl/u-boot-spl-rockchip.bin of=/dev/sdc seek=64 ₹ sudo dd if=u-boot.itb of=/dev/sdc seek=16384 with this patch: --------------- ₹ sudo dd if=u-boot-rockchip-with-spl.bin of=/dev/sdc seek=64 This would easily extend if other rockchip family SoC's would make use of single image creation. Signed-off-by: Jagan Teki --- Makefile | 13 +++++++++++++ arch/arm/dts/rk3399-u-boot.dtsi | 17 +++++++++++++++++ arch/arm/mach-rockchip/Kconfig | 1 + doc/README.rockchip | 8 ++------ include/configs/rk3399_common.h | 2 ++ 5 files changed, 35 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 92e04dd689..e7f68d63c7 100644 --- a/Makefile +++ b/Makefile @@ -851,6 +851,11 @@ ifeq ($(CONFIG_ARCH_SUNXI)$(CONFIG_SPL),yy) ALL-y += u-boot-sunxi-with-spl.bin endif +# Build a combined spl + u-boot image for rockchip +ifdef CONFIG_ROCKCHIP_RK3399 +ALL-$(CONFIG_ARCH_ROCKCHIP) += u-boot-rockchip-with-spl.bin +endif + # enable combined SPL/u-boot/dtb rules for tegra ifeq ($(CONFIG_TEGRA)$(CONFIG_SPL),yy) ALL-y += u-boot-tegra.bin u-boot-nodtb-tegra.bin @@ -1366,6 +1371,11 @@ u-boot-sunxi-with-spl.bin: spl/sunxi-spl.bin u-boot.itb FORCE endif endif +ifeq ($(CONFIG_ROCKCHIP_RK3399),y) +u-boot-rockchip-with-spl.bin: spl/u-boot-spl-rockchip.bin u-boot.itb FORCE + @$(call if_changed,binman) +endif # CONFIG_ROCKCHIP_RK3399 + ifneq ($(CONFIG_TEGRA),) ifneq ($(CONFIG_BINMAN),) # Makes u-boot-dtb-tegra.bin u-boot-tegra.bin u-boot-nodtb-tegra.bin @@ -1664,6 +1674,9 @@ spl/u-boot-spl: tools prepare \ spl/sunxi-spl.bin: spl/u-boot-spl @: +spl/u-boot-spl-rockchip.bin: spl/u-boot-spl + @: + spl/sunxi-spl-with-ecc.bin: spl/sunxi-spl.bin @: diff --git a/arch/arm/dts/rk3399-u-boot.dtsi b/arch/arm/dts/rk3399-u-boot.dtsi index 0786c1193a..abd0b091ab 100644 --- a/arch/arm/dts/rk3399-u-boot.dtsi +++ b/arch/arm/dts/rk3399-u-boot.dtsi @@ -3,6 +3,23 @@ * Copyright (C) 2019 Jagan Teki */ +#include + +/ { + binman { + filename = "u-boot-rockchip-with-spl.bin"; + pad-byte = <0xff>; + + blob { + filename = "spl/u-boot-spl-rockchip.bin"; + }; + + u-boot-img { + offset = ; + }; + }; +}; + &sdmmc { u-boot,dm-pre-reloc; }; diff --git a/arch/arm/mach-rockchip/Kconfig b/arch/arm/mach-rockchip/Kconfig index 286c870135..7ac0ee3c2d 100644 --- a/arch/arm/mach-rockchip/Kconfig +++ b/arch/arm/mach-rockchip/Kconfig @@ -130,6 +130,7 @@ endif config ROCKCHIP_RK3399 bool "Support Rockchip RK3399" select ARM64 + select BINMAN select SUPPORT_SPL select SPL select SPL_ATF diff --git a/doc/README.rockchip b/doc/README.rockchip index 73594dc61d..791e528262 100644 --- a/doc/README.rockchip +++ b/doc/README.rockchip @@ -398,13 +398,9 @@ Option 2: Package the image with SPL: => cd /path/to/u-boot - - Write prefixed SPL at 64th sector + - Write single spl + u-boot at 64th sector - => sudo dd if=spl/u-boot-spl-rockchip.bin of=/dev/sdc seek=64 - - - Write U-Boot proper at 16384 sector - - => sudo dd if=u-boot.itb of=/dev/sdc seek=16384 + => sudo dd if=u-boot-rockchip-with-spl.bin of=/dev/sdc seek=64 => sync Put this SD (or micro-SD) card into your board and reset it. You should see diff --git a/include/configs/rk3399_common.h b/include/configs/rk3399_common.h index b412012582..a658f03ade 100644 --- a/include/configs/rk3399_common.h +++ b/include/configs/rk3399_common.h @@ -38,6 +38,8 @@ #define CONFIG_SYS_SDRAM_BASE 0 #define SDRAM_MAX_SIZE 0xf8000000 +#define CONFIG_SPL_PAD_TO 8355840 + #ifndef CONFIG_SPL_BUILD #define ENV_MEM_LAYOUT_SETTINGS \