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: 10919205 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 186471398 for ; Fri, 26 Apr 2019 13:34:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0373F28BAD for ; Fri, 26 Apr 2019 13:34:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EB6B528C61; Fri, 26 Apr 2019 13:34:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5614B28BAD for ; Fri, 26 Apr 2019 13:34:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=/oP4T6EJH2ifM37sn1hQYucr0PCIuA1vSHrfYPjDnfo=; b=M4A6zVc6nbmxqQ u1z8QeiZq66WEP4aX+vM0gaDQnIWnmt9seGlN0Bx8iDhTEpIY1RdOj9Xo9jkmbYznqUg0tP0YZTrh tZckrBTUNYAAJ8qA+gSbZYfKe0SSeS6mdnIgbTPcENYB94AIKbfrEGlA0mW7cA7gFLKtrscISTa3U es25hsnHr0WRTVc2JIYEqXnM/arlQmJ+3sofeY++jaxuZDivMx/vTaCmWD4lJeYCcLCF+sfEvTxA1 CkgXtBQD6fURHAERew+DomrckP3V2UW2BIxkX0c87h/giADY7pudn3Hl3fHg6H7D7aADo1D5x2k4I 6nxwmizjOuBdjyQ6ysvQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hK109-0005GY-By; Fri, 26 Apr 2019 13:34:53 +0000 Received: from mail-pg1-x541.google.com ([2607:f8b0:4864:20::541]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hK104-0005By-Uv for linux-rockchip@lists.infradead.org; Fri, 26 Apr 2019 13:34:50 +0000 Received: by mail-pg1-x541.google.com with SMTP id h1so1663735pgs.2 for ; Fri, 26 Apr 2019 06:34:46 -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=GzpZBjuQQDJJtoreoma3OzXVwiayz4RQQDGvwcDmutUAkdyoR4L0DGmnrdI5gDyKis l0s9eKGyF6Du/3+/MoZ0b7RC+1WxmAPtpyoWGB4qK2C69v6MYzH9HPtREAckl9HOgCke mdHHhMdyEJLr5L7dLfTCTxSxJzmY8d3MxCQsPxK2mbVKrdnGfTsdK8OmADISkKcn2jkO OhRVMx7fJm0bjp42lmWNV3osfxUQNdqtYV5KjcBuRYp3UhQE5L7IaiWbnLiBv9+Nl+Yc Ah54JxNNfRHIjzxPOnS/2bWfkTTGspeYnW9m8RSYGnim7QTyLwVK2Ad2b14nCsjT0AV9 godw== X-Gm-Message-State: APjAAAUeDTLHnsg/aAJOyNm/024kW1BFXN/gV9zqH3tRh4NR6GFhdnYW qyk1QfhJhAchA5SR+MFl8STtsA== 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 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190426_063448_996922_189CD7F5 X-CRM114-Status: GOOD ( 15.74 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paul Kocialkowski , linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki , u-boot@lists.denx.de Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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: 10919207 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7C18B912 for ; Fri, 26 Apr 2019 13:34:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6947C28BAD for ; Fri, 26 Apr 2019 13:34:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5D89F28C42; Fri, 26 Apr 2019 13:34:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 0E44428CC7 for ; Fri, 26 Apr 2019 13:34:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=1G6jihYoVY6Jd7FdBTkF/1YKgRjrdaAfF8ZMPW1SZpQ=; b=Sb/jPfmUoggcqL IPOqfVFISHKVK78qoKsMsxi1I/+iwTcWP+JmY1Wrw891z3gExRSDDTAth8XMmEzIH68tvfvfdfIQ6 xy/zUXb2WCsWCRBXEZtYI1BDSjS+oSVpBTvtmfErgz1Lac0dmsJVB8pq3wo+q2lDbsgjVlFzCYWKM 9dVPwIxozasViSkBOUIahCHGHUuf4gG/KDirnetMsJBysaxRoXdjgv/X4IvcXwIJ7m/OpLKESBRl6 qw5LEmOxpGTYdnESd+5eACQjfPeyIyf8Oci8srYeE6E2OoHZ0MhravBivgYMcLISkfa+k7ZfR0LnA gH17gotNH1bT3GY4sRcQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hK10A-0005HC-1O; Fri, 26 Apr 2019 13:34:54 +0000 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hK107-0005El-K4 for linux-rockchip@lists.infradead.org; Fri, 26 Apr 2019 13:34:52 +0000 Received: by mail-pf1-x444.google.com with SMTP id 188so1739179pfd.8 for ; Fri, 26 Apr 2019 06:34:51 -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=BIRBP+y2pCWO130Fn9Ao93bK763gYzKCBKBe//LtLqce/yIq6NGubh9gtdZkO2U1ED SN860DwsUEC0wBOvrYxhiqYp81c+19yiPKEMPrUSYWr3aICtDazV11gt17hSBWlGuHI4 iLZh5CHS36hyP2Z+5BS/h9S+AAURriHmPuVh11CmqumuI/SOlE+iJ4AFvytAAnwvZpZD 85tr4CjFZG5vqpYT+yiqzDISI+MRuVrXR8xLFG0MNYZ1NOAP0NIM0tQWcRJ5MWudfGAp DiZ5Ue8aw7BdeapzaAQKRi3D3LXRRvwLj+A7zpf67GuVa/ARvlPh3Q0YkGJQiRtc0T6s jKpQ== X-Gm-Message-State: APjAAAVJrHK5xRhKCTABHB4J1C61pY8YeB6Z3XjUy7Lho5YPd9coLeJj GFIEaoP68dLs9YBQ7PMm3OR6rg== 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 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190426_063451_658688_B42AE26A X-CRM114-Status: GOOD ( 10.14 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paul Kocialkowski , linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki , u-boot@lists.denx.de Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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: 10919209 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2DDA6912 for ; Fri, 26 Apr 2019 13:35:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1BD7728CC7 for ; Fri, 26 Apr 2019 13:35:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0F87A28CDD; Fri, 26 Apr 2019 13:35:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B092928CE1 for ; Fri, 26 Apr 2019 13:35:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=mSnhi0WTkK8pUGxElZFXUYTgdrRg9RGoq0FBsXy90xA=; b=pn03my6Pjp+WOK QE6LQU5yW5YSox+JW6S2G+GBpJ+LYBSPCUdRd9V2qKwb2+ULUcBBd5lmClDkDMmOV0z6iAek+GRof YxS2dBP11l03ughG+mkCxI0BmJJtNy0ZaPPKyk/KJkKTUHmvLc6oN0n4Y190ehE5wg5XU+McKMynI bj8/MDVosyGm+l/yAUlfpqp1F54OxPTnkMPsw4i41uQfxUbYQAPcByE1VncWK7fNp0E8i5eCVryUM BoaZQHIp7R1n3QknRsM/GWdFQdhhgqcukskWfZi4eWjXsMAUbxx20fcBzZtReyFsBQbBimf3YJYlH UEch2hI9zbVGwxFPK9Bg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hK10E-0005L4-NP; Fri, 26 Apr 2019 13:34:58 +0000 Received: from mail-pl1-x644.google.com ([2607:f8b0:4864:20::644]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hK10C-0005JI-4c for linux-rockchip@lists.infradead.org; Fri, 26 Apr 2019 13:34:57 +0000 Received: by mail-pl1-x644.google.com with SMTP id z8so1603366pln.4 for ; Fri, 26 Apr 2019 06:34:55 -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=esMsDHV8Uea/3fFWYKCr1094DUtnGreYuirY4rYGIsJxufDgSJ5RoLmpJwvFbLaKf7 cQ9eea7KJd8LrhIbZ87RuDiKY5TnT9rsi4xgjULYs/QFo2Z0bcIqVkp4D1WyOODMkCiS PP17UfC4eUusQ+8Y2V9vnLaPU4wMZpBgSnqmuM/7Pbkzs/4zWWZ8skdeCnMuJiQU740k pF5LqPU0hPM6ogdzEnAXPnupSRpWqbiJQ3xBDYS+Fsx9CSFRX5Idk/wpsowh4fCr4haq Lxjuu00yaHOGXTHuFYY4VYgnPiuPacLYj28ai4UnYKa7LhFGxVjbPKY+50dRqVXA2rZh CTxw== X-Gm-Message-State: APjAAAWJ3GbTCQDhphqo+qiGnxocUsMDiNFbkIC4fksnSlOKTzfxw9GF gmo8jG+M6+CcGtIw+/16iPtD6nRSGt8= 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 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190426_063456_181725_72A21ADE X-CRM114-Status: GOOD ( 11.12 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paul Kocialkowski , linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki , u-boot@lists.denx.de Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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: 10919211 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D473F1398 for ; Fri, 26 Apr 2019 13:35:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C128728BAD for ; Fri, 26 Apr 2019 13:35:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B551028C61; Fri, 26 Apr 2019 13:35:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 20F2928BAD for ; Fri, 26 Apr 2019 13:35:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=h0oAa3UHSYih9KD8rq6E20JBo91kiQV7/1ZSKX4zXxg=; b=YAGli6RJ8A/kAN AA3R5naAWxCK4ldG6kRfj1Z1ufQgpb2fVmvKg+y0ih0krE6+rPoyBNQ0uvMCVOP7D4lswctaAlVlY d4JaEAPdcIINiXAnYtULtj9hkfZpQxApCalQmNSsIzOdE5ig6GGR1PsVkInzbN9zFjbEnspzad+b+ ZNbRkqDAcbfbZONh9Fle/6XxJ3P6Z8NofKZNPldS9XbnZGDVM2S5W7ksU9+Uu1Uo5VSarRwd2TlNO 5Yk9s/af1A2qCAVYgqPbJ0aeo3mP9gwsisNOeH54pCGPE+QEO0Ke5crkaZ9O8b6isQarCMqKZrUmL wNYAG30zDo550SfrjTlg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hK10J-0005aQ-6m; Fri, 26 Apr 2019 13:35:03 +0000 Received: from mail-pf1-x441.google.com ([2607:f8b0:4864:20::441]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hK10G-0005MF-2r for linux-rockchip@lists.infradead.org; Fri, 26 Apr 2019 13:35:01 +0000 Received: by mail-pf1-x441.google.com with SMTP id s4so1742687pfh.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=VvQOyxXPKq86h0RE0JK8qqnfABLDeQqOHjJ2qPvm7tiNg8Y6D7rcyMDrLD679dBVvw DmZ3wZsxaR5TXt/ukuQlUWFDbPaGGwVi7G7HfGxsubhJcKLFGywwCK/lrid/TaygLh7l HsTS4q5gNzEBtLinSpW1TOp4TN5W53tmvYoedw3Vk6iUYId3BZVpg+IeJu6pvAaGAANC 9csGw1VuIjBXrTADi1aMD/m+LC0NOtge00S9VZZSIpCtwtM/N22psATzIBKheuYnqaJ4 Yz2SlwwEzmCmRk26NLAiarineT3WAokeI3B3T+zJkDGga7Ta5t44r9kJAUmPUuQnWvtJ s+Yg== X-Gm-Message-State: APjAAAVphjOt+BCwf78mjSu7TDiVvvbGoO0moWAYxlf6tQCs5xnQ/FlL qJW5F7mpno7QifdHCqy5pZiRkQ== 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190426_063500_121575_2AF10214 X-CRM114-Status: GOOD ( 11.80 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paul Kocialkowski , linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki , u-boot@lists.denx.de Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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: 10919213 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C23621398 for ; Fri, 26 Apr 2019 13:35:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AFCFD28BAD for ; Fri, 26 Apr 2019 13:35:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A3DE928C61; Fri, 26 Apr 2019 13:35:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3494F28BAD for ; Fri, 26 Apr 2019 13:35:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=6noIrBLYCy6qPbCXqpdsgrP1TpFoMkRQpj9QCcf9sQs=; b=HaZGD257Ov2Idr yGip2OrlS8+8gxivY4vf+tho7L+iNe5bKkpfcbS+HsvHYcT9GqqQRFijPKbb9eFus8n7Q9vJFv87b aescI+heqELSwFfYLOea0fmI6tJHenHOcqO0nndLOJ9jntI+UtzyWou81PqqCmsDlYMbCCCInR14Z TLL1p+lW1NY7y1QfnujRwqCymXY/QgUi3Iu83/T5vuNZLMpGTZrUKQs7X9gUXS4L1R3CgYNBtLTUD HH0EJDoXaAvI90QvmbYOfxRm9DMTjgjSTL6O81iNcT37OxV2OSMxu194QsirXch0DDn32lt0XFg6r 4TtK6Zl7jjFGVKaKL8Aw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hK10O-0006P1-8z; Fri, 26 Apr 2019 13:35:08 +0000 Received: from mail-pl1-x643.google.com ([2607:f8b0:4864:20::643]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hK10L-0005ow-BR for linux-rockchip@lists.infradead.org; Fri, 26 Apr 2019 13:35:06 +0000 Received: by mail-pl1-x643.google.com with SMTP id o5so1582791pls.12 for ; Fri, 26 Apr 2019 06:35:04 -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=k7x4BQGHm86wPdVWuTIX1gc/mi4VDNSDsLLwbATtBQOdF4pdH3In9eGT2MxSYJqDXv WYLKO2S8ZmAP6Tb1eSf1z4arEx4t/XQ103FeCeVbP8mNjpGQBlkK7BUGkBSh5KPk2jab 2Psu9jD6R4BQB/GQ4ZjbtZb2yjavDB1PkDCdoHah4F5VFf1xZT4GZFt0dAKCXJqFIQmA GT0Dfu88aR193snORBFfVycQKg4TSlwVMpzSOwv1DUI8LRsoV1Jxz+RkcZ/CtMC4njFj z4Sdd9WRNu/2kr9JPGqLNF6tqU3WqtmA12niVZXy/7Rb9DhCa9WzpXrhdrfQEtJI7TWf 8Llw== X-Gm-Message-State: APjAAAUHXR/aRk3LmHw1zP0hbKgEDmdLMCj/h0+FfJMaPJYboQQSjiyR wagrGTSstXfFrgjC+7dA+8rlLg== 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190426_063505_458409_4997DA3D X-CRM114-Status: GOOD ( 11.52 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paul Kocialkowski , linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki , u-boot@lists.denx.de Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 \