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: 263 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f198.google.com (mail-pf1-f198.google.com [209.85.210.198]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 6DE263F033 for ; Fri, 26 Apr 2019 15:34:48 +0200 (CEST) Received: by mail-pf1-f198.google.com with SMTP id n63sf2230819pfb.14 for ; Fri, 26 Apr 2019 06:34:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1556285687; cv=pass; d=google.com; s=arc-20160816; b=zcaXtwB0L9rJrvxfOBRlZy3ICOAeCdZ8OagnO0eGhtOpOWOQMLOtdHUWNriE20gguK aUPVhEHDm3HihTZBP0aD3gmF/qGu12ksXgQkNpGD1sLQdHOoW+ENY1MG7uic0v66skio H1MWXoIJmHS9sRP4xl5rU246gkd6AaimQW2ounal/thQDoTEcEN2uN9i1S4PNcgMVMiF UnqB3pjR3LZmNca3y1X8SOO3ZeRgXX8mPPCvfxK4cmak5PMSdA0UR/N555sIaRkLYQ6b LDKSWK+FH5xFsmaaaZ+Wgke8Q9m8UtGiNEL6ZnDdJzVWUL4tXnzfxQzv+HephOWFOB8z Rjrw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=p9rZsRUcrKJpchScabYB33yARn50kFY00f+dvuoaNmI=; b=dLDG2YvYe0yYl8Uq1IQL0jnT3UUpA+mTEPhBlZktC6Licwds0oLk8napwhbyL3XTS2 rdmQLPhaYrXA5bz1IHwUEdM4lEq5Y9wFILKarfweC5Eos5CcTJGzR5lrkA8xaIhAiFa+ 8crT9d1AGW4jlCb5smZtWbtpqoz3rSHIZT+nruBKBKyRJAvi77bEIX8XOMk+5zoZ68aQ 5aXyriQ5apvFBdr6UZgA01Sg+b0c3x5mvIcsgwF32Ulk+MDBtMwM3h4ju/bKAZU2wXBv 2gEq4Dkn9reo00uBOeYED1q8H+WVlgHZLW0eXm4eXTD5yWw7IgQV3YbPzDpxi/tuKGhx zSJg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=PvqYNQLo; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com 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:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=p9rZsRUcrKJpchScabYB33yARn50kFY00f+dvuoaNmI=; b=WPZMFaa2aR/rAwJoyo7mSfjKB6WXqQV1yDVym6IY2taPZ5AXanEzLAptZdoHhqYzLL CpgfTs6822rZT31qKBFwGaaU3KI5vBTC1mb9NfUknDzc1kjmrbb6ejZfx7nTOZDVgW57 TJ4KEIkp75y+DDMMbi688i15hIpQneFKd4aik= 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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=p9rZsRUcrKJpchScabYB33yARn50kFY00f+dvuoaNmI=; b=Nv1oIN3qMHW+b1y04GeVvrYI/Yvfkrj79SwZBEivbwxJOI6c1YVI8qaLTVwtK7zYIu PSDyEiB/K1exFDTlb63iodIjUeL6LCDRA6wKCJjfvuYKwLtpDOwHdUwObqeWfFdeHqEx jFHLOa+cLZ5emi6f1KpZWbvfXw0HC1dKYtS0YYCjU+36vfoyh/EObvV5obC89C11jnk+ pUeoA11VFALfEdM7gS7t5fN8KFjBDivhJqyNPhFHnCchkH2od1fhdkMACo5FZYdBo6TB UotUd7GBKRVM/h08cCZfNeA/TaF3N4aHUuhVBimcMfx9uZegukh8eAnRGorDVNi22Zf1 Ga4g== X-Gm-Message-State: APjAAAW8jTMXsy/EESGzTowxUQBvXwrhHTnRp23JIo2TVkdmnSsUDUWU O96O8gn8tefHazMxNvRWA5eGCsR4 X-Google-Smtp-Source: APXvYqy+fX731++nZS7gtwbUEp2hPyHmJSeVwr/QHwGhCqVhiFZzEWVkjd68hmhaCsKMdpy0/tQOoA== X-Received: by 2002:a62:1d83:: with SMTP id d125mr10563682pfd.74.1556285687210; Fri, 26 Apr 2019 06:34:47 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a65:450d:: with SMTP id n13ls6399350pgq.5.gmail; Fri, 26 Apr 2019 06:34:46 -0700 (PDT) X-Received: by 2002:a65:6108:: with SMTP id z8mr43527325pgu.106.1556285686743; Fri, 26 Apr 2019 06:34:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556285686; cv=none; d=google.com; s=arc-20160816; b=Z8PFhY//RgP7XlmQLL/CTlsEy6lVboXPF3YJofox8xMsx9g6NYKC7F/J8pGAmuFV0i 603LVpjhPwa6pyWcPzDSImGRcORWUpy0/vYyMh78mZNFctCCfN2wioghif+rgcSjBiQI yK4JsqSGXZDn2HLxE4KYbzdoA/nwIpt2xBgH9xwiL7NQxC7HTXTTxIV7FgHyTlPafCr5 JfibigC3Mnv5X8Zol/fa3xtjrEKYrbe+mSZr3gkRIwASnH0fR4Bhk0+vEgUR5FFbq9vG +dNiR8m1RWn4pzGjIeLToR6XPlMr1TaACzyXriMMJSlYR+9hTR55gfupGjIxix9az+KY EaIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=DOYcE2jBsaACz3HvBKiQdfAKk8BFPbwKPna+LoxS5hk=; b=Hyw9+5nkYns5APq6XRt5iNETgNDdnrIUCLwYmbJoS0M6avZy300P3P9TYF81kg0/MJ 2xtZM8ekxCkkhnkUwGntbfC0CqIZmPiYp07hoAfXbYL/eALO7bP7Ab0WMirGZ9pwI1DZ nQRqqGsNsnnLIOJkYZAQft316ez4cxWTSmdZYc4ldcD+uFyicnXFNUW9ZOtSms4YaQw5 hHgA0eWr6u9z7XGYNOnf2BSQFqlOJVmO94RPqvVo/PHEM067QwmIROs/hwRn3GfAHZ+Z 3KSs5LSQwBB0XiQ2P1Vk1I9V+aroj0Mzdke5D2d1VUBRELebe7Xt4bnm+6KgztA3YVog P91w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=PvqYNQLo; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id x18sor28619103pfa.69.2019.04.26.06.34.46 for (Google Transport Security); Fri, 26 Apr 2019 06:34:46 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; 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 Cc: Paul Kocialkowski , linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, u-boot@lists.denx.de, Jagan Teki Subject: [PATCH 1/5] arm64: rockchip: dts: rk3399: Create -u-boot.dtsi files 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 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=PvqYNQLo; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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: 264 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 142983F033 for ; Fri, 26 Apr 2019 15:34:54 +0200 (CEST) Received: by mail-pl1-f197.google.com with SMTP id i35sf2025801plb.7 for ; Fri, 26 Apr 2019 06:34:54 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1556285691; cv=pass; d=google.com; s=arc-20160816; b=m4/LF4cYBx4ZtzQtaOPl4mOE98SHIRprUqDU8NhyIa0GBUp3yDwGE0HkX0AcJjZgC2 TNbJIBQ8zokr+su+hz0MU1rKWaUxNXfPqr+hmhh6/wG0TQfLaF61Yx6rwKL7rhwor7Ml zFTAWY6xf9P/VQQi8KqOnAgP5zTw77zNdmdMP1cbSstLirut9kapaFvuqxWKAyJcFmbP sGzErKyFlo4IwoQsSGF3xaqis9uDi9PL8lpDRuZjEY3pXsLd7wtSixxLv15ICBwUd1xP djpYjuDEEAykJWE7lpsGiWbYhkCC6E3v3QgNH7AWyRxFChhY3Hr6EG2ffB+bnFiduu3h 0bnw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=zSETp9SXFGrIEzRbMH1N7kecwKLCIeExBvhupcyjm+s=; b=z3XZ1quJeMtxHWZd5i/Ft2vvn3X1/O9Kd6wlxvlASV3Uk/xpZXaV5/dXQ05M9Aj8z2 p2PaCxaC93mbwHZwKTSe59HhJnEMStFaq/kQfUAyDvJpo0G8dbAAgzxv8GOhyLptiCdt UNfXDIGkO8enP++ema/s3Fy0A+VKkDwu/O4TcDjDYpGC4V/u0HUd+lCiz0dhuXP84MV1 YZ5AGG/I1mxCLGJjkpWLNGGmPdUTx6RpLVpqZTsvYmAVcGF2uTTHe458yRyZOMvIPN1/ 0BtzbPsTFYG+x+4aLNgqOTNSO4QGHzkHkDs8D8rpoN+A2L2//gzDwz/dMwcyfyd41OtE QK6g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=fv6iqiY3; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com 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:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=zSETp9SXFGrIEzRbMH1N7kecwKLCIeExBvhupcyjm+s=; b=Xy7Uj6bMsCfgtjTW4mMhttLVUUbsv+JuMJxwmawZzxjLoZYRRuESq8O7vlA1G0qIAk /YPV4TkZne9vOpjWmja5YcfUCeVlL80vCVQ3yQ9I8tAKhymIWuitUTWVKGIg+B5BE4Dz DHfq8h/Qz4s5PgBRIRxxQsv7BHa5VR/13YFp8= 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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=zSETp9SXFGrIEzRbMH1N7kecwKLCIeExBvhupcyjm+s=; b=HbuddP8s8fvDnj/hjO1YPIy/WaAUS7eYqs0btPXnCqKkrqQiJ2QFsmE1AB4L+OZJjK dex//19umZF8P0qiuJ7rPmWoqykL9wylYUhxCXDsGn6wF/mzXAg2pwI0l8Xzp/HtBnt0 IQGOzEDidtb3efU1v/aEmyxGhgL5yWGHDwlYElbMTtmEgTeN1NamvVQZiZIYYcN3t2bv JKRKzlv4qa1s9NNR0yJFDg6GVw2wLQrOyoejvVJKgGplcxa69uF/OXdwwrAagSZi0Ext +ZAqNB18+beF3+fy09GQqOYBWHm6lIQWZOsMa52kjjVVwqu4OKsPuY3ABmg3VFnhpuLQ 1lbQ== X-Gm-Message-State: APjAAAUE/Smq1hJ0g5rvdbtm94OFUSthviBm2k5r9N1i0QKFneOW44wG dRPvBy7KZIK43ZoPcBVhoBFcjxNl X-Google-Smtp-Source: APXvYqwq0yFA7OBdQQhOUnfNs+0V5KTqHD5MhCJK3DOCcm5ndups5eUEOTVpttHAjn77CnR/vAF7Gg== X-Received: by 2002:a17:902:b589:: with SMTP id a9mr21642242pls.66.1556285691414; Fri, 26 Apr 2019 06:34:51 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:4104:: with SMTP id o4ls2760015pfa.4.gmail; Fri, 26 Apr 2019 06:34:51 -0700 (PDT) X-Received: by 2002:a63:8bc9:: with SMTP id j192mr121415pge.212.1556285691056; Fri, 26 Apr 2019 06:34:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556285691; cv=none; d=google.com; s=arc-20160816; b=SFtUiRwkYDa443qxBTZXTjNz2CZoSGrwRl99zCvq8ihPk0FSGKBeHvpI/1Ocwnlsx0 bzvZKXq1mUd3QcZ7UhVeKFDolwCWzQAgYDIgpiedb4yvYkK9W/IUL/bmRF/GWytduY5T U/f0rOKYhFugg1NcqDfiocAuBQdSadYHdjX5h+09sV3tZEG69g1WrcD8nrNKpMFQOVn+ ehwX473EUYhjq1S4IvU+g4hP2HEe6U0l3QWo54P9GQcKhMsRHmEe2Bgb13vPsVRUoDpo /ZuL20hPYHsFEJouwJACAJ7DSLwH4dQtn17v8OLwe6U05wpB5kUOjHlSA8B8EwtAiKIS gUaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=rlO5qGYy6kjT+AKhiquK187CEtLKOidUD7eBDX9VmMA=; b=SzcDjnrk/ZIXuUhYJRI3nS1Un/ixrn06tHl7hR99a6aEc7+J1yht5WdFfru8bD1zkT oSCwVRHluWrJgeySwU4WUOMHc8YVgpeMT9sxWXHw07T61QRARb9DduG+Gglg9GoM3Jd2 i1ius3JglFfda5nhm7KS0fxWdHsu9YgHulcuaX1QHonIr+ImnVplr9zcqH8Zz2an+qe+ PrkLp5Vv1kjdlyN4FdTykSEzoOnq2YsJt5MCkyNIl/AB8QYgvuIa9jrIlY5bSuwj3ADv zE/S7nD5yk8LEZOoc6eT1rtyvfwWGiOBsbwlS4n19yJqaT2K9jxLkiX6Rz2TMBYSO5Wz yMxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=fv6iqiY3; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id t11sor595964pfh.36.2019.04.26.06.34.51 for (Google Transport Security); Fri, 26 Apr 2019 06:34:51 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; 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 Cc: Paul Kocialkowski , linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, u-boot@lists.denx.de, Jagan Teki Subject: [PATCH 2/5] rockchip: rk3399: Get bl31.elf via BL31 env 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 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=fv6iqiY3; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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: 265 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f200.google.com (mail-pl1-f200.google.com [209.85.214.200]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 1431D3F033 for ; Fri, 26 Apr 2019 15:34:57 +0200 (CEST) Received: by mail-pl1-f200.google.com with SMTP id i35sf2025899plb.7 for ; Fri, 26 Apr 2019 06:34:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1556285696; cv=pass; d=google.com; s=arc-20160816; b=Wb9dwq5+Owy8FpMHz5iVpgdOv92RUWdnYj7xv4qUy5ysl14CUaaM4PwQ3ULMphnPiR YagprVKDZmLR0Kf5mwMS2giwbPF+utMKzijvtWbSFY8Pa4X/2NLrmnwqDKGy9alEKaPY W3ij9Bg58FiiTZschMN0yp2+o92ArVOEZH6LOhIhkU4ZAGQCcL53wIft6YUJPwWnnq7n sMUqV1zVHs794MTqsuUcSGp0Ksn+TqV8jDi6QtK3mmvcJezRdl57gV2Zki333F9swevV EX2uAYIIcMTlTm+jfcIJPJq1qutJwicCCtYLHxVu05zhmPob+xvXQq8TPzGhnixgSG1s QVaQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=Q2e4FriVXWhhyWWcBZ8AbGhLSbRp9GiPbh/vwAErEKo=; b=zHnNQS2CqQjR9FDXrkbMPVqCtXUx9ND9cuvi4ksQ80Ncrphf4nm195OYH3w/eLC2pZ pu68CMrsHIigSVfZwqzmU+PcTTw4yHtM0sJznBlp51m1h5N9ZU2feHU9l5drU2q6qTBC gyiYXqWO26grGCH91tkmzVFakTur0u6ku8RVJN9wDhacXX7XJ6mKkry8V/UJRLyeOriD MPKFDHETXkLEwO2uDlsOTZK+SomfZ+JD6rKtUp6bclqGaeyNrrEt/uO4DpxDxF4090h0 kyJ5EOdDTO7UkglQuazR6LAWYz5MolzCkjHYVT5sUXG5VOSganRdGQjXW36bPKaQ5HAV t3jA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=BdGGz67I; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com 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:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=Q2e4FriVXWhhyWWcBZ8AbGhLSbRp9GiPbh/vwAErEKo=; b=bGS1jqS+xY0Hviwdl7uoBcKIssadaLzwxJURcRkgJUNXWDa+OTjkSd760Q8/1+3Sgd 0E6tAOR34YX+7yekAyo4mVpfx5A2aMkZ7qf5yNj14T9444U8zyklPBNkbksHHWlXo2bh 4MWCl4empkCo9lEtT1ekqe/vhNfC7mh11CgYQ= 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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=Q2e4FriVXWhhyWWcBZ8AbGhLSbRp9GiPbh/vwAErEKo=; b=VV4T8j32jXH/0NwS3eUOzjsd/u7fbFNN3ygPm8MhwVvGL7cRckZE6XrddDDtu12n0e jrjXl06pcdkzwa0qPWahAZayUVgKR/BpD24A1pPWu0+5uhFPHYKH3TDu8XCsjc9e85BN GskHwc3neQ1UuaHqYy5+8HK8qu0JM8q5vnLs0+tYQlZXRmWlOAAtYQbiORKM7W5N9tg/ VlS3MI2UPHSFDtrzUQa53FcPtschs1e28IXAqY7K/9TpjsjmOmiTscgc6YYzhCimz+Lr 5xr7eIVo126x0cKMC6+yaMLwytcrJrn+Y4RoBTQGUZx5OUYZTk8PpzmExVI5zdW+R7Hm E8WA== X-Gm-Message-State: APjAAAX7O/PBRGq9ucI+/8clxckZ78VOwH1NpeI0ufBIZkWXsNKLCW7F 1nYRifv/mUFeoSpzfWsKrLggfMsq X-Google-Smtp-Source: APXvYqx8wi4vbCUIxgF9pqUZyhOt0gcSZ8c2WXK3oa6SKRs/kk48M3mKObjCgeaSkJhJf3MjwLUu0A== X-Received: by 2002:a65:5148:: with SMTP id g8mr1657248pgq.168.1556285695891; Fri, 26 Apr 2019 06:34:55 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:a7:: with SMTP id a36ls7080039pla.6.gmail; Fri, 26 Apr 2019 06:34:55 -0700 (PDT) X-Received: by 2002:a17:902:801:: with SMTP id 1mr44079443plk.14.1556285695527; Fri, 26 Apr 2019 06:34:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556285695; cv=none; d=google.com; s=arc-20160816; b=kd4KaXOmbwzCrqy4Wzy2I0wBFNH6fMF8l7s6+UhmunI96V0Xn7ZwSLmMwMe4hb/W4o BSf9D9WOGj9ZaGUvnFtYMFSf2ETTPNedjAXTVZovVHTv7iXoHbhB3e26f0siV0E7O3rR mGrg36XNzDLazl3Mnv0nemk575poGTvH6Fdp05Sn5+Q6ufFYf5wSvm7ccb01T4k5qmuY F9IVd0mzWoLxUFUwaY9z3SI8oI16KfOvZTYdurozDIJEELfLFgnpYPa+SmDQ1EboRSw9 GhHT/MexpM0TPKxaF/2LnSFg6LbD7FHHHW9lwx6O70Ig72MSOjHKSYFa+RcEWAvlgbK1 CMMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=3N5rNqcMuDowMTD/3vgKU8H5GyxtTI2jCzUXbqadNIQ=; b=JOwU7ayaahkX+xx7T2a0hzyOMo2JYUQqgbzXL1AY/sBvAOwj620ICoCWa20Ms0kBFW R/Idv10yxaV1LuedtlQ6y8P/aMPuc3g47n6kRJZXzpQJ3MPCAeGzabvI7LwrYA6MguKm Cf285vRCNX3aOHkh5Uw8UY/ekfbPmSgGyfLwUdhqUClDF4yilVKwcfJki242sx2+LdpD UDOjjmSHA/kbE0KosBqHTGBzQKXViO4+mhpZ1Ujo7jq8m7SP1gs9RQN58wqko78ogv44 QRfEzMsHK2owG2Q8FpTMbfNT9B87aTdMDpZg6gLVvi6gJxUSYUiZHfx3BjJpETqaIKSv iYjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=BdGGz67I; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id a8sor24600933pla.29.2019.04.26.06.34.55 for (Google Transport Security); Fri, 26 Apr 2019 06:34:55 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; 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 Cc: Paul Kocialkowski , linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, u-boot@lists.denx.de, Jagan Teki Subject: [PATCH 3/5] Kconfig: Add u-boot.itb BUILD_TARGET for Rockchip 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 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=BdGGz67I; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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: 266 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f199.google.com (mail-pl1-f199.google.com [209.85.214.199]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 714FA3F033 for ; Fri, 26 Apr 2019 15:35:01 +0200 (CEST) Received: by mail-pl1-f199.google.com with SMTP id g11sf281975plt.23 for ; Fri, 26 Apr 2019 06:35:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1556285700; cv=pass; d=google.com; s=arc-20160816; b=ZNjYuxgLV5ts3F1xCRqKF1mbiQcySJhWP3thX31C1oFfSCo4f2QfwsZuGhWh532A2t YTEY7NxYrmuecYv4RFvLkKxFNO7VYfu2ZYOaiYue2PpIT4cnfjhK1zHa4AbdTTL9eILG LlXSGmrti6TvMbB3lud/TJZrQFSfE7HzLwhNbK9WvtzpDFtPRzdxVpmc8XK2PRBZTLJS txXW6MEjlePDqTM2DuXGiKQw+QlqlSuQe19AfKa1XlKaS5MjtZugjidPjSoIDEZgRt7G ZlH8Cs3GfuVSFbpYoqpAi+y6UHzgaVHfMwKiCjUAhccV+GryC9ZospRiqKZhSvocGlIL KTIg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=DVM+knRr7hO8f4vXUcHi61b/xUkRmru4VAA+YWrw9LU=; b=htFu1XG6vrU5TaxOzSCXKmNjJ6X5P6kMTwl7bLM/0DiIFDp/YI7096V89kUgkRGLFh 7bcLB8Rus31zrq7PeNZ4ya6IJHnuJNK4Jp7s6ZAwxGX3pQbqLAfvdHsN0JMRMsx5X27i qsJEEz+bbfYkG0UOPve/ruQGoFgAI9oKrX6m5MQFZIa1C5lB4eMAxsAIknYuo871fY0l UkeL7K9fbIcLlvkYGg6CM02pGzYTdoQEcFdVO49yp50ctz568Phy2BcTpQEefklWkkiO CJdJ2gMGZFjprg9R62xRgmucWiMSPMG30Uu6+TnBHO3kbGDtsUdxwRuDpO3g8HN73wJd yMqw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=qOkD+ffI; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com 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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=DVM+knRr7hO8f4vXUcHi61b/xUkRmru4VAA+YWrw9LU=; b=O8DjiYhN1SMWPyyg7Q6isiqJiiloNUP9NS6Pqf5zcgANvDI+3cnV6WhMF+DztKPRET Qb1LhNB1FwbC9ujqRN+qrEX0bC5Va7imarblLWH9B7Q62n/CEylZ5ny+kAU+NgTYHnPw tu3DMJKdDwoFOE0VEUBVL27Upt+2v1Bu0HAR4= 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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=DVM+knRr7hO8f4vXUcHi61b/xUkRmru4VAA+YWrw9LU=; b=Cp36sjDOv53ZYCoAAPGaEWLLmE0Yvx8mqZhpZQ0ECM0bZV+j8yyNfMHM0IhD5gKZb9 tcIQ3j64MIIPbKiOa8tp+YeXn5RF6QGSa5Na6KGTfTvikBGc/eKIqUYU/n4q4S6gQmGe oFfHgmcbA3W8DhELc2GxGoqFwa7Ra9sFe8ikKXe4WAimobkTn9Bnjs5Mw9maug987oN/ 0ELoD4jm08nMV/EPFOLsOjG9r3ODe5Ggp5q3iFiIg83IR9ClqvUxsl8RIwisdytVPHxH 9LfLMVJc4YwOHQHcg38APmPfcjmiGK+/WY4ul6p1jeUoLI5scT+7QTHtILhfVdLnSnfF tH9g== X-Gm-Message-State: APjAAAU7k8Bcin+ohpPgzZF28918EKM30EgH4ypj9mq7ZJSojJWyM2Dq hCCkOQOs+O92ak1NHAH19yGwzpiq X-Google-Smtp-Source: APXvYqyiXMEoLQviDBf6KIMdmva3VGyu+Fb9GZ+DOsW8PWU7wORu0W8y2RHJ5fTcti0Kla5/5ReVBQ== X-Received: by 2002:a17:902:e101:: with SMTP id cc1mr46385412plb.129.1556285700218; Fri, 26 Apr 2019 06:35:00 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:bb8c:: with SMTP id m12ls7073999pls.16.gmail; Fri, 26 Apr 2019 06:35:00 -0700 (PDT) X-Received: by 2002:a17:902:b592:: with SMTP id a18mr15012214pls.252.1556285699853; Fri, 26 Apr 2019 06:34:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556285699; cv=none; d=google.com; s=arc-20160816; b=taXwz4DDGJhr96dGRCq2pb3uzSvldihC5b0xb0T2Y5Ka9Y1nOj61L8qbMf5OcDYdK8 J+1diUdQodBlHWuBjWPjY5tTDya0QNMwDcfLQZ1njVijm0K+IiTSnbLf1M4EfAA1DE3o V7Uk+S2MFohbkQf0e5ErA1s5KQcekYrpYFx49+YaVI7IYjvDfV7xwtvF3cdfxa/4F3pB wEc2kVEw8cJcaSVZBbCoDoAQ4iI9QtK86h1LHc8HkLIvbu5oTbdWCikFXP+3jNdEFruw tKhWnin7pOoWRBeRWyH7zZNesMQVyoeaWGVeED7SqdVdjXELrG/zHEGGy4eQ8N1T12IB kh9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=M9AJcb/8Dmjs0igPOlr99VUFJEFDN2irpI4FE8JxLWY=; b=BuAElcB2K3X/wNv0EIkVXMOgxjm7bOnj/hNQxlHKNO38OyHqylhrzD9F2ch9fRnuV+ R1hdsCEn/4gPaAL8UQFio8y0/41G+wnSo+hfCTSdXClErjPlyCjul5n0P5ePv3dNBRdC aBS6LC4JJdGuWxdj7HqU1W01iADu3iUHa8xLm2vwLEaynQUTmRjQfxfK4wPJrBd8QLxB K+GSpqqtS9oLoXLOT3Z9Fp8VpB3zIGty7tpGo/N8FukaNdjboyPjfB2TXhNiqWylOpCj t2DayrjubJS+qjPNV7LWfAppf/xb4bb35LCQnIBqwN5xSiY8nUr7zQed2g/g0h6OCpSw MCug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=qOkD+ffI; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id x18sor28619871pfa.69.2019.04.26.06.34.59 for (Google Transport Security); Fri, 26 Apr 2019 06:34:59 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; 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 Cc: Paul Kocialkowski , linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, u-boot@lists.denx.de, Jagan Teki Subject: [PATCH 4/5] Makefile.spl: Create u-boot-spl-rockchip.bin for rk3399 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 Content-Type: text/plain; charset="UTF-8" X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=qOkD+ffI; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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: 267 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 4E9583F033 for ; Fri, 26 Apr 2019 15:35:06 +0200 (CEST) Received: by mail-pl1-f197.google.com with SMTP id b7sf2009142plb.17 for ; Fri, 26 Apr 2019 06:35:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1556285705; cv=pass; d=google.com; s=arc-20160816; b=POx+eem3anOuWudfXZy2QQnJukXRTJBejDK6akZndmRYnBOtSO0Mlwe/Ws1p8bJiIc pEYiFwk+25sMUKY3Vhz4zVQTL5vRPSjuNRHOYJh68YODuQe5H6BRvpsmEla6639b2d3/ NjPHripLvhfJb5l5R9CQCl4pwIe6FLKd3bwwB7xzYCk3BkrmUJpBj1JQdcfGrs5gbGYp 01WSxjOFEj3AH6/3pTYWHICOAxlYR3aUAzDR400hdID1c6Ivz5FU0/aUgHe7qK5vEhQA VcD7t0ICY8C9OfszhgekYXZ0nV5jHgc3GJxP9ngyYJB3KemWX9WMtFPh7LyroJnI3wOo Q8FA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=7FOWY0yAYrEAbqOlRkS4jJ2qXtwtiOJ+/xNjplx8/oQ=; b=0xat18Y8bapuTP0YvmwIxlTLQUx8SrgZ6KH1vu0x3oLnauCXgU/4ucdDdJWhZ+uBlf hTFKR3PNDiE+I1XkE0QrNJmzL2B0h0P6xwz7Y3OD6qGvIzdwqlSmTqhLvb/W/2uDaMSE cMB7H9MI7q4zdYpyNJGLuuYHHYm0fo8nkSRpBwljS3OhT5EGxp2lMzqu37DH1oUf7PQM z2R/oo10ScLwiU2+BJRQbhd6a9VgbMNKo9yWM9a2uryXnOdeDanp0dx8f6ss5Hm++yXJ i9O7VsAC8Gb9mukH3x70zUJqkhfQbrv9sxLsQogTdBxDiWmpxYkyuBao/9oic4lfHFIz 4uyg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=AD4PoTO5; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com 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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=7FOWY0yAYrEAbqOlRkS4jJ2qXtwtiOJ+/xNjplx8/oQ=; b=JCuTclZD0wadNqT5/sOp8bLyBXbQvbrpKh0R3kfDgT6354oSE3vWOC9WPGY2amKMFF +/Zs67RKXbdqVKCz2VR9YPfb5muecgrINJtRvIw7C24DlcEo0QGCB0Vp3sHengn7Dut9 8eEKMHBVptgDvWa3ImXq9eb0qd6YluvR5c8yQ= 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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=7FOWY0yAYrEAbqOlRkS4jJ2qXtwtiOJ+/xNjplx8/oQ=; b=V7kTUWqQv3k+5jd/+vuGxtGa0XpXw65VNd1w3TAxisJIRgayQA/UV9X3n0CCGOLjnd 8qb0KRutluzqss2gkXq7BLXa0KB5tW35Zk0qlJN9MIrfIl8CVuwmeGM7cqlGE5XURtCx NUvCSagyhTg2Jrt7SVr8r+qKkVZimZ8Q83Y18AfwBxnNdNrKw6oa5yRhmZmV2YKGzZp1 n6qsYhnoPbTQb0QzPeCRKYkcOfqNIU88Kw4839IobSF4VLYATKL/JVPslHYgH4d6eiBm CR4T+fWuq+nn4s83uI/rUhHa9zEMPe969ddETMdkochUZu5+FPM9+eDBT6pR/pfXkJXF 6emQ== X-Gm-Message-State: APjAAAW2W2bayTdhPpbxSvaXMZSJE3iF/slS0rDSdTS1ClkaXcr99a7U zjBsGO5hHHnODBjMurssQCxyN466 X-Google-Smtp-Source: APXvYqwkM3eGUHy8F7riVt63cxGAsQIXLvcBzpg7W1S1T47T5ShiJjEiHu6FIvZn1CwXlUez2nMTkg== X-Received: by 2002:a63:5466:: with SMTP id e38mr44375279pgm.340.1556285705115; Fri, 26 Apr 2019 06:35:05 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a65:450d:: with SMTP id n13ls6399520pgq.5.gmail; Fri, 26 Apr 2019 06:35:04 -0700 (PDT) X-Received: by 2002:a63:f513:: with SMTP id w19mr4062879pgh.261.1556285704755; Fri, 26 Apr 2019 06:35:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556285704; cv=none; d=google.com; s=arc-20160816; b=HO/mZ6sOAqjsFP7CvmNH9LctQsh7eVvgTZH2yRGbAFXKJXZzPon5hhV6Dl6QBpDBvJ 6Ke9uKlhUDNHYQSiYHj1i/FwvpsNLMR1eyl8By4jVq1g5muCJS6m/uQ7krx5wdAKVJq9 Q7REJ9mjBmd5Py5OZP7hOZpr4ygstYD7ZaM22G+swie4eEtqQaXq1HSiCxGP9TrON+Gn XtDJIcM7cI10X8NQY4STKjy4OoVHI9BUON3XWEC36VwVYN33nhrLDGdDW0jtU6lFsmdO 07DdNvXWoCM4GTYyePWnzcK708AH3F8xS6JISXLQ59BJwOYbZ1Ab2J/q4irEeJwR2mRu sRgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=/qOgLyzHZqhoMQdBz3HHUNbRncBtz7SI2uhERnn/Y2c=; b=txabsrkgsJaDb/N8hvu9D4mglzcIYWJhNovhvSKFuUA/JpI7eLFmtOVjo9xpqGhmGL nvBaG50P0G6eqiKua4F2S0Nc4AVkUVPfasFdXoKX1fr8Cxnpv3pAOqN6SqKuw8UDpe0w s44pcGD3V9sizn6PfH7v9VTHR1DV5rIwvPgiHnu2IjKSITuBEWdb36L1MB9110KhHPJK QQOebM+57K++eDDC2RTPyi20zselwAta8LUZd+rOCviaYW4fQFF4m7b0d1m5LLsVkV+j TdkVmz1Cqn/CLeoIt8ae15gZXmDd7uRCYTCbMka4JLLx2cjI8tHSP2G3UEheyF4XkIhh fj6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=AD4PoTO5; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id f23sor83645plr.4.2019.04.26.06.35.04 for (Google Transport Security); Fri, 26 Apr 2019 06:35:04 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; 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 Cc: Paul Kocialkowski , linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, u-boot@lists.denx.de, Jagan Teki Subject: [PATCH 5/5] rockchip: rk3399: Create single image using BINMAN 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 Content-Type: text/plain; charset="UTF-8" X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=AD4PoTO5; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 \